tags:

views:

175

answers:

1

I am using struts1.. my code is something like below.. When I try to delete any row from next pages.. the index starts from 1st once again.. how to get the actual row number???

Delete <% java.util.ArrayList< beanPackage.CustomerBean> al=new java.util.ArrayList< beanPackage.CustomerBean>(); daoPackage.DAOClass dao=new daoPackage.DAOClass(); al = dao.viewCustomerDetails(); %> <% request.setAttribute("CustomerTable",al); int i=0; // String currentPageNo=request.getParameter("page");

// int i=Integer.parseInt(currentPageNo);*/ // System.out.println((Integer.parseInt(request.getParameter((new ParamEncoder(tab).encodeParameterName(TableTagParameters.PARAMETER_PAGE)))))); %>

<display:table
name="CustomerTable" pagesize="6" export="true" requestURI="#" class="displayTable" >
<display:column title="Select" media="html">
 <input type="checkbox" name="check" class="menuFont" value="<%=al.get(i++).getCustomerId()%>"> </display:column>
<display:column property="customerId" title="ID" paramId="customerId" href="modify_Customer.jsp?${row.id}" />
<display:column property="customerName" class="menuFont" title="Name" />
<display:column property="city" class="menuFont" title="City" />
<display:column property="state" class="menuFont" title="State" />
<display:column property="country" class="menuFont" title="Country" />
<display:column property="primaryContact" class="menuFont" title="Primary Contact" />
<display:column property="secondaryContact" class="menuFont" title="Secondary Contact" />
<display:column property="emailId" autolink="true" class="menuFont" title="EmailId" />
<display:column property="altEmailId" autolink="true" class="menuFont" title="Alternate EmailId" media="excel" />

<display:setProperty name="paging.banner.placement">bottom</display:setProperty>

A: 

I had same error(1 year later), i find a solution passing the displaytag parameters on form jsp... somthing like this: '/> '/> '/>

Rodrigo Soares