selectOneMenu in dataTable row
mvlach Jul 3, 2009 8:49 PMHi, I have problem with this.
I would like to display a table. In the last column I displaying the action buttons. When user click on the row action a new rich:modalPanel is displayed. In this modalPanel is some text and the h:selectOneMenu.
My problem is I can't get valid selected value from the combobox. I think there is problem with table row iteration.
<h:column> <h:outputLink value="#" id="link"> move to category <rich:componentControl for="panel" attachTo="link" operation="show" event="onclick"/> </h:outputLink> <a4j:commandLink value="Smazat" action="#{manageTicketsInCategories.deleteContentOfCategory(t)}" reRender="manageTicketsInCategoriesTable"> </a4j:commandLink> <rich:modalPanel id="panel" width="350" height="100"> <f:facet name="controls"> <h:panelGroup> <h:graphicImage value="/img/error.png" styleClass="hidelink" id="hidelink"/> <rich:componentControl for="panel" attachTo="hidelink" operation="hide" event="onclick"/> </h:panelGroup> </f:facet> <p> <h:selectOneMenu id="categorySelect" value="#{manageTicketsInCategories.selectedCategory}"> <s:selectItems value="#{categorySelectBean.categoriesNative}" var="tt" label="#{tt.name}" /> <s:convertEntity /> </h:selectOneMenu> <a4j:commandButton action="#{manageTicketsInCategories.moveToCategory(t)}" value="Provést" queue="q1" reRender="manageTicketsInCategoriesTable" /> </p> </rich:modalPanel> </h:column>
I have played with this:
@In(create=false) Category selectedCategory;
no succesfully.
When i try
<h:selectOneMenu id="categorySelect" value="#{t.selectedCategory}">
All selectOneMenu send their value to this property.
Know somebory how to solve my problem ? Can I use anythink different (but I would like to use the modalPanel, I wouldn't like to use another redirect to page).
Thanks Mila