ah

<logic:iterate id="client" name="listClients" offset="5" length="1">
        <bean:write name="client" property="name"/>
</logic:iterate>

does this help?

tomK


> -----Original Message-----
> From: Rubens Gama [mailto:[EMAIL PROTECTED]] 
> Sent: donderdag 10 januari 2002 16:56
> To: Struts Users Mailing List
> Subject: RES: RES: RES: <bean:write.../>
> 
> 
> thak you, but it's wrong.
> i want write a property 'prop3' of an object without going through the
> 'ArrayList'.
> For example:
> 
> <bean:write collection="listClients"
> objectCollection="listClients.client[5]" propertyObject="name"/>
> 
> detail: '5' == fifth object in the 'ArrayList'.
> 
> is this already implemmented?
> 
> -----Mensagem original-----
> De: Keith Bacon [mailto:[EMAIL PROTECTED]]
> Enviada em: quinta-feira, 10 de janeiro de 2002 13:19
> Para: Struts Users Mailing List
> Assunto: Re: RES: RES: <bean:write.../>
> 
> 
> 
> Do you mean you want this?
>    <logic:iterate id="eachRow" name="DATASET" scope="request">
>      <tr><td> <bean:write name="eachRow" property="field1" /> </td>
>      <tr><td> <bean:write name="eachRow" property="field2" /> 
> </td></tr>
> 
> where you array list contains objects eachRow, which has 
> methods String
> getMyField1(), getMyField2
> etc.
> K.
> 
> 
> --- Rubens Gama <[EMAIL PROTECTED]> wrote:
> > i'm not doing nested ArrayLists.
> > It4s an ArrayList of objects.
> > the objects have simple properties as String properties..
> > i want write one property of one object of ArrayList.... or
> > two property of the one object of ArrayList...or
> > three property of the three object of ArrayList.....
> >
> > i cannot use 'iterate' because i want write a single 
> property of a single
> > object of a ArrayList.....
> > how can i do it?
> >
> > thanks in advance....
> >
> > -----Mensagem original-----
> > De: Geoffrey Mroz [mailto:[EMAIL PROTECTED]]
> > Enviada em: quinta-feira, 10 de janeiro de 2002 12:21
> > Para: [EMAIL PROTECTED]
> > Assunto: Re: RES: <bean:write.../>
> >
> >
> > Are you doing nested ArrayLists?
> >
> > If so then try something like:
> > <html>
> >   <body>
> >     Use of the Struts iterate tag with nested ArrayLists 
> representing
> > rows/cols:<p>
> >     <%@ page import="java.util.ArrayList" %>
> >     <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> >     <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> >
> >     <%
> >       ArrayList rows = new ArrayList();
> >       ArrayList rowOne = new ArrayList();
> >       rowOne.add("bob");
> >       rowOne.add("jones");
> >       rowOne.add("[EMAIL PROTECTED]");
> >       ArrayList rowTwo = new ArrayList();
> >       rowTwo.add("ted");
> >       rowTwo.add("Walters");
> >       rowTwo.add("[EMAIL PROTECTED]");
> >       ArrayList rowThree = new ArrayList();
> >       rowThree.add("Mary");
> >       rowThree.add("Smith");
> >       rowThree.add("[EMAIL PROTECTED]");
> >
> >       rows.add(rowOne);
> >       rows.add(rowTwo);
> >       rows.add(rowThree);
> >
> >       request.setAttribute("DATASET",rows);
> >     %>
> >     <table border="1">
> >       <logic:iterate id="eachRow" name="DATASET" scope="request">
> >         <tr>
> >            <logic:iterate id="eachCol" name="eachRow">
> >              <td>
> >                <bean:write name="eachCol" />
> >              </td>
> >            </logic:iterate>
> >         </tr>
> >       </logic:iterate>
> >     </table>
> >   </body>
> > </html>
> >
> >
> > If not, then try this:
> > <html>
> >   <body>
> >     Use of the Struts iterate tag:<p>
> >     <%@ page import="java.util.ArrayList" %>
> >     <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
> >     <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> >
> >     <%
> >       ArrayList myList = new ArrayList();
> >       myList.add("Item One");
> >       myList.add("Item Two");
> >       myList.add("Item Three");
> >       request.setAttribute("MYLIST",myList);
> >     %>
> >     <table>
> >       <logic:iterate id="row" name="MYLIST" scope="request">
> >       <tr><td>
> >         <bean:write name="row" />
> >       </td></tr>
> >       </logic:iterate>
> >     </table>
> >   </body>
> > </html>
> >
> > Sorry for the excessive code, but these do work.
> >
> > Hope that helps.
> >
> > -- Geoff
> >
> > > thanks for the fast reply but...
> > > for example:
> > > listClients - collection of client's
> > > objects(ArrayList for example)
> > > client - object
> > > code - client object property
> > >
> > > i want write code in html form.
> > > how can i do it?
> > >
> > > -----Mensagem original-----
> > > De: Olivier Dinocourt
> > > [mailto:[EMAIL PROTECTED]]
> > > Enviada em: quinta-feira, 10 de janeiro de 2002 11:56
> > > Para: Struts Users Mailing List
> > > Assunto: Re: <bean:write.../>
> > >
> > >
> > > <bean:write name="..." property="pty[index]" />
> > >
> > > hope I'm not wrong.... :)
> > >
> > > ----- Original Message -----
> > > From: "Rubens Gama" <[EMAIL PROTECTED]>
> > > To: "Struts-User" <[EMAIL PROTECTED]>
> > > Sent: Thursday, January 10, 2002 2:52 PM
> > > Subject: <bean:write.../>
> > >
> > >
> > > > How can i write an object's property that belongs
> > > to an 'ArrayList' object
> > > > using the clause <bean:write.../>?
> > > >
> > > > Thanks in advance
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > Sent via jApache.org
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to