Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using display tag in struts

 
Sreek Gupta
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi , I have following code in JSP to display a table.

<display:table id="cp" class="datatable" name="sessionScope.myList" pagesize="5" cellpadding="0" cellspacing="0" requestURI="/myPayment.do">
<% i = 1;%>
<display:column>
<html:radio property="selectedRow" value="<%=String.valueOf(i)%>" />
</display:column>
<display:column property="empName" title="Employee Name" sortable="true" />
<display:column property="paymentAmount" title="Payment Amount"/>
<% i = i+1;%>
</display:table>

Intension is when i select radio button, depending on the selection i want to read the selected values in my Action.
I have getters and setters in my Form bean. But when i am saying getEmpName() in action it is returning me 'null'.

My question is how to extract the selected row of a table (that is using display tag library) in my action class?

Please help me with sample code if possible.

Regds,
Sreek
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic