You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Paulo Silveira <pa...@caelum.com.br> on 2006/07/17 23:17:21 UTC

SelectItem madness... anyway to avoid it?

hello user list...

it is not about the myfaces implementation, but I am just getting mad
about using SelectItem all over my managed beans...

some frameworks let me create POJOs agnostic to the API, using JSF I
need to create getters that encapsulate my view info in SelectItem
objects... is there *any* way to avoid it? It would be nice if
f:selectItems had itemLabel and itemValue as its singular form...

thanks

-- 
Paulo E. A. Silveira
Caelum Ensino e Soluções em Java
http://www.caelum.com.br/

Re: SelectItem madness... anyway to avoid it?

Posted by Cagatay Civici <ca...@gmail.com>.
Yes,

Today, I've updated the patches of this brand new  component and Martin
committed afterwards,

Hope that it would end the select item pain.

Also released at jsf-comp with a slightly different implementation;

http://jsf-comp.sourceforge.net/components/easysi/index.html

Regards,

Cagatay

On 7/18/06, Rogerio Pereira <ro...@gmail.com> wrote:
>
> Take a look in the brand new sandbox selectItens tag. That do this:
>
> <s:selectItens value="#{bean.carList}" var="car" itemLabel="#{car.id}"
> itemValue="#{ car.name}"/>
>
> 2006/7/17, Paulo Silveira <pa...@caelum.com.br>:
>
> > hello user list...
> >
> > it is not about the myfaces implementation, but I am just getting mad
> > about using SelectItem all over my managed beans...
> >
> > some frameworks let me create POJOs agnostic to the API, using JSF I
> > need to create getters that encapsulate my view info in SelectItem
> > objects... is there *any* way to avoid it? It would be nice if
> > f:selectItems had itemLabel and itemValue as its singular form...
> >
> > thanks
> >
> > --
> > Paulo E. A. Silveira
> > Caelum Ensino e Soluções em Java
> > http://www.caelum.com.br/
> >
>
>
>
> --
> Yours truly (Atenciosamente),
>
> Rogério
>

Re: SelectItem madness... anyway to avoid it?

Posted by Rogerio Pereira <ro...@gmail.com>.
Take a look in the brand new sandbox selectItens tag. That do this:

<s:selectItens value="#{bean.carList}" var="car" itemLabel="#{car.id}"
itemValue="#{car.name}"/>

2006/7/17, Paulo Silveira <pa...@caelum.com.br>:
>
> hello user list...
>
> it is not about the myfaces implementation, but I am just getting mad
> about using SelectItem all over my managed beans...
>
> some frameworks let me create POJOs agnostic to the API, using JSF I
> need to create getters that encapsulate my view info in SelectItem
> objects... is there *any* way to avoid it? It would be nice if
> f:selectItems had itemLabel and itemValue as its singular form...
>
> thanks
>
> --
> Paulo E. A. Silveira
> Caelum Ensino e Soluções em Java
> http://www.caelum.com.br/
>



-- 
Yours truly (Atenciosamente),

Rogério