struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nanduri, Amarnath" <Amarnath.Nand...@Agilquest.com>
Subject RE: pager tag , iterate tag and displaying data as rows in a tabl e
Date Wed, 16 May 2001 22:25:41 GMT
Look at my other posting Iterate and Radio tags. You should find it in the
mailing list .

cheers,
Amar..

-----Original Message-----
From: Sheikh, Jawwad [mailto:Jawwad.Sheikh@BellSouth.com]
Sent: Wednesday, May 16, 2001 5:27 PM
To: 'struts-user@jakarta.apache.org'
Subject: RE: pager tag , iterate tag and displaying data as rows in a
tabl e


so how did you do it?

-----Original Message-----
From: Nanduri, Amarnath [mailto:Amarnath.Nanduri@Agilquest.com]
Sent: Wednesday, May 16, 2001 3:58 PM
To: 'struts-user@jakarta.apache.org'
Subject: RE: pager tag , iterate tag and displaying data as rows in a
table


Never mind. figured it out myself and it works just fine....

cheers,
Amar..

-----Original Message-----
From: Nanduri, Amarnath [mailto:Amarnath.Nanduri@Agilquest.com]
Sent: Wednesday, May 16, 2001 2:30 PM
To: 'struts-user@jakarta.apache.org'
Subject: pager tag , iterate tag and displaying data as rows in a table



Hi All,

      I am using a pager tag that i got from jsptags.com 
I am using it in conjunction with the struts  logic:iterate tag to spit
out
a bunch of rows.

The question i have is.. Is it possible to get the index of the current
element in the iteration ? The reason for asking this is that i am using
a
unique index for every item in the row ( I am using a Radio Button for
this). When i page back and forth i want to make sure that the unique id
the
client is getting (for every row) is the index to the current element in
the
Collection. If i am paging forward, i should get rows in ascending
order,
and if i am paging backward i should get rows in descending order. 

Can anybody help me out here. Thanks  a lot.  

I am attaching some code (which is not working proplery) here which
should
give people some pointers....


  
<pg:pager>
  <pg:param name="keywords"/>

  <logic:iterate id="groupsList" name="statesBean" property="states">
    <pg:item>
        <html:radio name="statesBean" property="selectedIndex"
value="<%=
statesBean.getIndex() %>" />
   		<bean:write name="groupsList" property="countryName" />

   		<html:link page='<%= "/someAction.do?selectedIndex=" +
statesBean.getIndex() %>' > <bean:write name="groupsList"
property="description" /> </html:link>   
   		<BR>     
    </pg:item>
    
  </logic:iterate>

  </pg:param>
</pg:pager>



cheers,
Amar..

Mime
View raw message