This content has been marked as final.
Show 3 replies
-
1. Re: Dropdown menu
ralf Aug 17, 2009 2:48 PM (in response to palani.palanivelsway.gmail.com)I think, that what you are doing there is a misunderstood approach.
Ui:repeat is something like adatatable
for a dynamic rerendering of single rows.I think you have to create/manipulate the component in your bean, if you need the dynamic aspect.
-
2. Re: Dropdown menu
jamesjmp Aug 17, 2009 5:20 PM (in response to palani.palanivelsway.gmail.com)Try with c:forEach tag. In this case, neither ui:repeat nor a4j:repeat would work because rich:dropDownMenu is expecting a menuItem, and repeat tags iterate, but don´t provide that.
For instance:
<rich:dropDownMenu event="onclick"> <f:facet name="label"> <h:outputText value="Categories" /> </f:facet> <c:forEach var="item" items="#{dropDownMenuBean.items}"> <rich:menuItem submitMode="ajax" value="#{item}" /> </c:forEach> </rich:dropDownMenu>
And this is the code for dropDownMenuBean:
public class DropDownMenuBean { private String [] menu = new String[]{"Category 1", "Category 2", "Category 3"}; public String[] getItems() { return menu; } public DropDownMenuBean() {} }
-
3. Re: Dropdown menu
palani.palanivelsway.gmail.com Aug 18, 2009 6:34 AM (in response to palani.palanivelsway.gmail.com)Hi Jaime Martin very very thanks for you,
now i got that dropdown menu,
regards
jack