You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Mauricio T. Ferraz" <ma...@cilix.com.br> on 2003/11/14 23:20:08 UTC

Iterate a Collection inside a bean of session???

I have a produtoBean on session and this has a property ArrayList formatosArquivos

How I put the value of option to the same name of  <bean:write name="formato"/>  ?



<logic:iterate id="formato" name="produtoView" property="formatosArquivos" indexId="index" scope="session" >

<html:option value="?????"><bean:write name="formato"/></html:option>

</logic:iterate>





Re: Iterate a Collection inside a bean of session???

Posted by "Mauricio T. Ferraz" <ma...@cilix.com.br>.
I put the bean on the method execute on myAction

ArrayList formatosArquivos = new ArrayList();

formatosArquivos.add("CSV");

formatosArquivos.add("XML");

formatosArquivos.add("Algorithmics");

ProdutoView produto = new ProdutoView();
produto.setFormatosArquivos(formatosArquivos);

session.setAttribute("produtoView",produto);


So, How I generate a drop-down list on the next Jsp page???



----- Original Message -----
From: "Shivanjali Bhutkar" <bh...@comcast.net>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Friday, November 14, 2003 8:37 PM
Subject: RE: Iterate a Collection inside a bean of session???


> hello-where can i find more information on session beans?
>
> -----Original Message-----
> From: Vic Cekvenich [mailto:cekvenich_vic@baseBeans.com]
> Sent: Friday, November 14, 2003 2:27 PM
> To: struts-user@jakarta.apache.org
> Subject: Re: Iterate a Collection inside a bean of session???
>
>
> For option tag, you might want to use the optionCollection tag instead
> for a collection.
> .V
>
> Mauricio T. Ferraz wrote:
>
> > I have a produtoBean on session and this has a property ArrayList
> formatosArquivos
> >
> > How I put the value of option to the same name of  <bean:write
> name="formato"/>  ?
> >
> >
> >
> > <logic:iterate id="formato" name="produtoView"
property="formatosArquivos"
> indexId="index" scope="session" >
> >
> > <html:option value="?????"><bean:write name="formato"/></html:option>
> >
> > </logic:iterate>
> >
> >
> >
> >
> >
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Iterate a Collection inside a bean of session???

Posted by Shivanjali Bhutkar <bh...@comcast.net>.
hello-where can i find more information on session beans?

-----Original Message-----
From: Vic Cekvenich [mailto:cekvenich_vic@baseBeans.com]
Sent: Friday, November 14, 2003 2:27 PM
To: struts-user@jakarta.apache.org
Subject: Re: Iterate a Collection inside a bean of session???


For option tag, you might want to use the optionCollection tag instead
for a collection.
.V

Mauricio T. Ferraz wrote:

> I have a produtoBean on session and this has a property ArrayList
formatosArquivos
>
> How I put the value of option to the same name of  <bean:write
name="formato"/>  ?
>
>
>
> <logic:iterate id="formato" name="produtoView" property="formatosArquivos"
indexId="index" scope="session" >
>
> <html:option value="?????"><bean:write name="formato"/></html:option>
>
> </logic:iterate>
>
>
>
>
>




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Iterate a Collection inside a bean of session???

Posted by Vic Cekvenich <ce...@baseBeans.com>.
For option tag, you might want to use the optionCollection tag instead 
for a collection.
.V

Mauricio T. Ferraz wrote:

> I have a produtoBean on session and this has a property ArrayList formatosArquivos
> 
> How I put the value of option to the same name of  <bean:write name="formato"/>  ?
> 
> 
> 
> <logic:iterate id="formato" name="produtoView" property="formatosArquivos" indexId="index" scope="session" >
> 
> <html:option value="?????"><bean:write name="formato"/></html:option>
> 
> </logic:iterate>
> 
> 
> 
> 
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org