How to dynamically create a list?

后端 未结 1 1674
一整个雨季
一整个雨季 2020-12-15 07:34

Is there a way to dynamically create a selectItem list? I dont really want to have to create lots of bean code to make my lists return List.

1条回答
  •  佛祖请我去吃肉
    2020-12-15 08:02

    Use instead. It accepts next to List and SelectItem[] also a Map as value where the map key is the item label and map value is the item value. Or if you're already on JSF 2.0, then you can use a List instead where the current item can be referenced by the var attribute.

    
    

    See also:

    • Our wiki page

    0 讨论(0)
提交回复
热议问题