If you use JBoss-Seam, there is an annotation that you use a normal
list (not of select items) to build a drop down [1]

[1] http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamSelectItems

On 10/31/06, Ernst Fastl <[EMAIL PROTECTED]> wrote:
You could write a method:

List<SelectItem> retval = new ArrayList<SelectItem>();

for(A a:list)
  retval.add(new SelectItem(a.getAttr1() + a.getAttr2() ) )

return retval;

and use this as value for a selecItems-component

hope that helps

Ernst

On 10/31/06, ying lcs <[EMAIL PROTECTED]> wrote:
> i have a list of object , A. And object A has 2 string attributes: attr1, 
attr2.
>
> How can i create a dropdown select list by combining the string of
> attr1 and string of attr2?
>
> i.e. I want to create a select value option of
> [attr1, attr2]  // for each A in the list of A.
>
> Thank you for any help.
>

Reply via email to