displaytag

Display tag export to excel with the css formatting of the HTML page

喜你入骨 提交于 2019-12-11 02:26:55
问题 I am using display tag in my web application. I am successfully able to export the data displayed by display tag to excel. The problem is I also want the header and data row styles and css to be included in the exported excel. e.g. Header row is bold with gray background and columns in data rows are colored depending on the value. But this is not getting exported to excel. EDIT 1:- Below is the display tag code in my JSP. The list is shown properly with all the css applied to headers and data

dispalay tag table pass value to requestURI

假如想象 提交于 2019-12-08 12:06:12
问题 How do I set value to requestURI by action class in Struts2 or another form. I need to change value of requestURI according to tile. 回答1: Option 1: Pass value from action (Better way) In yourAction.java private String myActionName; public String execute() { myActionName="action1.action"; return SUCCESS; } public void setMyActionName(String myActionName) { this.myActionName = myActionName; } public String getMyActionName() { return myActionName; } In jsp file <display:table id="u" name=

How to get enum when i have just a short display name?

可紊 提交于 2019-12-08 07:17:05
问题 I get a Short Diplay name and i need to get enum value using it? [Display(Name = "Alabama", ShortName = "AL")] Alabama = 1, i just get AL from outside database. I need to read somehow my enum and get a proper value. Thanks for any help guys. 回答1: @jasel i modify your code a little bit. this fits just fine what i need. public static T GetValueByShortName<T>(this string shortName) { var values = from f in typeof(T).GetFields(BindingFlags.Static | BindingFlags.Public) let attribute = Attribute

How to show nested array lists using display tag on JSP?

≯℡__Kan透↙ 提交于 2019-12-07 18:45:53
问题 I have two array lists. Employee List and Allocation List. Each employee has allocation list. Employee class is as follows. public class Employee { private int id; private String firstname; private String lastname; private List<Allocation> allocationList ; // geters and setters } and Allocation class is as follows public class Allocation { private int categoryId; private String categoryName; private float allocation; // getters and setters } Lets say we have three allocation categories named

How to pass values in JavaScript Function in Display tag in Struts

自作多情 提交于 2019-12-06 15:35:28
<display:table export="false" id="data" name="helpdeskTickets" requestURI="/dofetchassignedtickets.action" pagesize="5" > <div id="tabheadM" class="tableHeader"></div> <display:column property="id" title="Ticket ID" sortable="true" /> <display:column property="subject" title="Subject" sortable="true" /> <display:column property="module.name" title="Module" sortable="true" /> <display:column property="subModule.name" title="SubModule" sortable="true" /> <display:column property="createDate" title="Created At" sortable="true" /> <display:column property="priority" title="Priority" sortable="true

How to show nested array lists using display tag on JSP?

北慕城南 提交于 2019-12-06 12:21:35
I have two array lists. Employee List and Allocation List. Each employee has allocation list. Employee class is as follows. public class Employee { private int id; private String firstname; private String lastname; private List<Allocation> allocationList ; // geters and setters } and Allocation class is as follows public class Allocation { private int categoryId; private String categoryName; private float allocation; // getters and setters } Lets say we have three allocation categories named X, Y and Z. Each employee will have corresponding values for each of these categories. Employee erik

How can i create a link in displaytag?

自古美人都是妖i 提交于 2019-12-06 04:47:00
问题 I want to create edit , delete link in display tag with struts2. How can i do so ? If anybody knows please help me .... i am doing this. <display:column property="id" title="ID" href="details.jsp" paramId="id" /> but the link is not going to details.jsp .It doesn't go anywhere . what can be the possible reason 回答1: You can write your stuff within the tag like this: <display:table id="row" > <display:column property="id" title="ID" paramId="id" > <a href="details.jsp?${row.id}">Details</a> <

How can i create a link in displaytag?

柔情痞子 提交于 2019-12-04 11:25:37
I want to create edit , delete link in display tag with struts2. How can i do so ? If anybody knows please help me .... i am doing this. <display:column property="id" title="ID" href="details.jsp" paramId="id" /> but the link is not going to details.jsp .It doesn't go anywhere . what can be the possible reason You can write your stuff within the tag like this: <display:table id="row" > <display:column property="id" title="ID" paramId="id" > <a href="details.jsp?${row.id}">Details</a> </display:column> </display:table> It is done by the following code. <display:column title="Edit"> <s:url id=

display tag with struts2

♀尐吖头ヾ 提交于 2019-12-02 20:06:48
问题 I am trying to use display tag for my ArrayList passed from action class. Action Class public List<AccessLog> getAccessLogList() throws ParseException { AccessLogManager am = new AccessLogManager(Config.getInstance()); ArrayList<AccessLog> accessLogList = new ArrayList<AccessLog>(); accessLogList = am.getAccessLog(userId, actionId, searchStartDate, searchEndDate); HttpSession sessAccessLog = req.getSession(); sessAccessLog.setAttribute("accessLogListSession", accessLogList); return

Using the POST Method with HTML Anchor Tags

杀马特。学长 韩版系。学妹 提交于 2019-12-02 19:03:24
I am certain the answer will be 'NO', but I wanted to ask anyway just incase I have missed something. Everyone knows that one pass data to a page in an anchor tag by using the GET method: What I am wondering is if there was a way to do the same thing, but use the POST Method instead? My purpose in doing so is to keep the URLs the user sees clean by not putting anything in them that they do not need to see. This has nothing to do with security concerns as I already know there would be ways to obtain the data being passed. If the answer is indeed no, then what methods do people use to pass data