struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Tinnemeyer <marc-...@gmx.net>
Subject Re: <html:option /> and co
Date Thu, 22 Apr 2004 15:49:28 GMT
Thanks for your response Henrique,

I already tried your solution, but there is a problem with it. 
I don't want to get all objects from that collection only those that
have an attribute that matches a certain value.

for example:
in my collection I have three objects with the following attributes:

object 1:
id=1
property=country
value=Brazil

object 2:
id=2
property=sex
value=female

object 3:
id=3
property=country
value=France

now i have a comboxbox that shall display all my countries but not the
sexes. that's why I tried to do it using <logic:equal...>. so I need to
find a way to get only those objects from the collection that all have
the same "property"-field.

Marc



On Thu, 22 Apr 2004 11:52:39 -0300
"Henrique VIECILI" <viecili@softplan.com.br> wrote:

> Hi Marc,
> 
> if you have a collection, it would be nice to use the <html:options>
> tag, which iterates over a collection rendering <option> tags (you
> shall place inside<html:select> or <select> to make sense)
> 
> in your case:
> 
> <html:options collection="PROPERTIES" property="id"
> labelProperty="value" />
> 
> i guess it will work!
> 
> []_s
> Henrique Viecili

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


Mime
View raw message