Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to merge 2 columns in display tag

 
aman thind
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am using Struts 2 and display tag. I need to display something like this in one column:

From: <startDate> To: <endDAte>.

startDAte and endDate are coming from a DTO. How to achieve this in display tag. I also need to use different id's for startdate and end date column in display tag. Is that possible.

Here is the code i had written earlier using struts and html:

<td >From: <span id="startTimeSpan<s:property value="id"/>"><s:property value="startDate"/></span> - To:
<span id="endTimeSpan<s:property value="id"/>"> <s:property value="endDate"/></span></td>

Here for both spans, i am appending the id value so that id generated is unique.

Thanks in advance.
 
aman thind
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If anybody is looking for similar thing, i used span and EL to achieve the soln.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic