Marc,

i think the best way, according to the MVC pattern (JSP is the View), you should
split the collection in 2 collections leaving the Control to your Action. But if
you donīt wanna do this you can try to use just <option value='<bean:write ....
/>' > instead of <html:option>

Henrique

----- Original Message ----- 
From: "Marc Tinnemeyer" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 2004 12:49 PM
Subject: Re: <html:option /> and co


> 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" <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


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

Reply via email to