Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem with display tag

 
hemadri vepati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a problem is struts display tag. I am having dynamic text box inside display table.i am using String array
as text box property. I am facing issues while capturing textbox values.The problem here is, say I have 10 records in a list which is rendered in a display table.The page size set was 5. while I am capturing 7th text box value it is throwing ArrayindexOutOfBoundsException.I am executing a for loop against the list size. while loop executes for the sixth record it is throwing excepton.Can any one help.
 
K Dombroski
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My initial guess would be that you trying to print a list item with an index from the string array. If you could post a sample from your jsp, perhaps I could see more.
 
hemadri vepati
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by K Dombroski:
My initial guess would be that you trying to print a list item with an index from the string array. If you could post a sample from your jsp, perhaps I could see more.


see the below jsp sample code


<tr>
<td height="25" colspan="13" align="left"
class="TDBorderLeftbottomwhiteline"><strong><bean:message
key="corporateaction.UnConfirmedAccountSection" /></strong></td>
</tr>
<tr>
<td height="12" colspan="2" align="left" class="TableBordergray">
<display:table cellspacing="0" cellpadding="0"
name="${caDetailsForm.unConfAccDisplayList}" class="displaytag"
pagesize="5" sort="list" requestURI="/cancleInputDividendDetail"
defaultorder="descending" id="table" excludedParams="*">
<display:setProperty name="css.tr.even" value="TDBGlightgray" />
<display:setProperty name="css.tr.odd" value="TDBGgray" />
<td width="3%"><display:column media="html" title="Select"
headerClass="checkBox UnconfirmCheckBoxList"
class="checkBox UnconfirmCheckBoxList">
<html:multibox title="Select safekeeping account" property="unconfirmCheckBoxList"
<bean:write name="table_rowNum" />
</html:multibox>
</display:column></td>

<td width="3%"><display:column property="acctNum"
title="Safekeeping A/C" sortable="true"
sortName="safekeepingAcctNum"
class="${table.rejFieldMap.acctNum}" headerClass="TH.width40" /></td>
<td width="5%"><display:column
property="availableShareBal" title="Available Balance"
sortable="true" sortName="availableShareBal" format="{0,number,#,##0.00}" style="text-align: left;"
class="TxtVer10black" headerClass="TH.width40" /></td>

<td width="5%"><display:column title="New Share Amount"
sortable="true" sortName="newShareQuantity" class="TxtVer10black"
headerClass="TH.width40">
<html:text property="newShareQuantityList"
value="${table.electedShare}"
styleClass="${table.rejFieldMap.shareQty}" />
</display:column></td>

<td width="5%"><display:column property="reconcileStatus"
title="Reconciliation Status" sortable="true"
sortName="reconcileStatus" class="TxtVer10black"
headerClass="TH.width40" /></td>
</display:table>
</td>
</tr>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic