Dropdown list value is null
ever Mar 17, 2008 12:52 AMHello I recieve a null value from the jsf view at my session bean. Maybe it is just something tiny but cant see the neadle in the hay..
best regards !
JSF code
<rich:panelBar id="pB_selectSamples" width="530"> <ui:repeat value="#{category}" var="cat"> <rich:panelBarItem id="pbi_#{cat.id}" label=">> #{cat.name}"> <a4j:form ajaxSubmit="true" reRender="qty_column"> <h:dataTable id="dT_#{cat.id}" var="product" value="#{cat.children}"> <!-- QTY --> <h:column id="qty_column" rendered="#{product.maxSamples gt 0}"> <f:facet name="header"> <h:outputText value="Quantity" /> </f:facet> <h:selectOneMenu id="SOM_qty" value ="#{order.count}" > <s:selectItems value="#{product.sampleMaxList}" var="count" label="#{count}" noSelectionLabel="Qty." hideNoSelectionLabel = "false"/> </h:selectOneMenu> <h:commandLink value="Add" action="#{order.add(product)}" > </h:commandLink> </h:column> </h:dataTable> </a4j:form> </rich:panelBarItem> </ui:repeat> </rich:panelBar>
if the user clicks on the add button everything works fine ther right product gets submitted but the "#{order.count}" is 0 Zero
@Stateful @Scope(ScopeType.SESSION) @Name("order") public class OrderBean implements Order { @Logger private Log log; @In FacesMessages facesMessages; @PersistenceContext EntityManager em; // @In(required=false) did try it with no success private String count ; public void add(Product product){ log.info("add was called } public String getCount() { return count; } public void setCount(String count) { this.count = count; }
I did try all kind of possibilities but everything without a success, does it maybe hase something to do with the stacking of the loops inside each other?