struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Klaasen (TeleRelay)" <tom.klaa...@telerelay.com>
Subject RE: how to get the position when iterating over a vector?
Date Fri, 19 Oct 2001 13:51:37 GMT
_and_ it should say: "... If true then ...", because indexed="yes" does
not work!

tomK

> -----Original Message-----
> From: dhay@lexmark.com [mailto:dhay@lexmark.com] 
> Sent: woensdag 17 oktober 2001 19:02
> To: struts-user@jakarta.apache.org
> Subject: Re: how to get the position when iterating over a vector?
> 
> 
> 
> 
> You could also use the indexed link tag, available in the 
> nightly builds, which
> adds the current index as a parameter automatically.  Adding 
> 'indexed="true"' to
> the tag, adds a parameter in the link named index ie 
> mylink?index=0, or you can
> specify the name with indexId.
> 
> Please note, whoever keeps up the documentation - the 
> description for the
> indexed property on the link tag is confusing.  A better description
> would be:
> 
>      Valid only inside of logic:iterate tag. If yes then a 
> parameter holding the
>  current iteration index will be added to the query string.
>      By default this parameter is named "index", but may be 
> changed using the
> "indexId" attribute.  The iteration index is taken from the
>      ancester logic:iterate tag.[RT Expr]
> 
> Can someone change it, please?
> 
> Cheers,
> 
> Dave
> 
> 
> 
> 
> 
> DUPRAT Alexandre <ADUPRAT%unedic.fr@interlock.lexmark.com> on 
> 10/17/2001
> 03:43:13 AM
> 
> Please respond to struts-user%jakarta.apache.org@interlock.lexmark.com
> 
> To:   "'struts-user@jakarta.apache.org'"
>       <struts-user%jakarta.apache.org@interlock.lexmark.com>
> cc:    (bcc: David Hay/Lex/Lexmark)
> Subject:  how to get the position when iterating over a vector?
> 
> 
> 
> Hi all,
> 
> I would like to know how I can get the position of an object 
> in a vector
> when iterating on that vector?
> 
> <logic:iterate id="currentItem" name="aBean" property="listItems">
> <bean:write name="currentItem" property="aProperty"/>
> </logic:iterate>
> 
> I want to have the position as parameter of a link in each 
> row cause i would
> like to edit the current row or delete it.
> 
> I think i can have an action for edition or suppression and a 
> parameter for
> the row number (index of the currentItem).
> My problem is i don't know how to get this index.
> 
> I'm using struts release 1.0 (patch jasper for VAJ 3.5.2).
> 
> Any help would be great.
> 
> Alexandre Duprat
> SOPRA. Direction France Sud. Bordeaux
> tel : 05 57 26 54 19
> aduprat@unedic.fr
> 
> 
> 
> +----------------------------------------------------------------+
> | Ce courrier ainsi que les fichiers joints sont confidentiels.  |
> | Si vous avez recu ce courrier par erreur, veuillez en informer |
> | l'administrateur du systeme : exp-iris@unedic.fr               |
> |                          ---------                             |
> | Ce message confirme que le courrier a passe le controle        |
> | antivirus du relais de messagerie Internet avec succes.        |
> +----------------------------------------------------------------+
> 
> 
> 
> 
> 
> 
> 

Mime
View raw message