When I choose one of the category, nothing happen. But when i choose the no selection label, the form is submitted normally. Anyone could help me? Please, I'm waiting anxiously online now.
| | <h:form> | <s:validateAll> | <h:messages globalOnly="true" /> | <h:panelGrid columns="2"> | <h:outputText value="tag /> | <h:inputText value="#{brand.tag}" required="true" /> | <h:outputText value="name" /> | <h:inputText value="#{brand.name}" required="true" /> | <h:outputText value="category" /> | <h:selectOneMenu value="#{brand.category}"> | <s:selectItems value="#{categoryList}" var="category" | label="#{category.name}" noSelectionLabel="please choose" /> | <s:convertEntity /> | </h:selectOneMenu> | </h:panelGrid> | <h:commandButton value="new" action="#{brandHome.persist}" | rendered="#{!brandHome.managed}" /> | <h:commandButton value="edit" action="#{brandHome.update}" | rendered="#{brandHome.managed}" /> | <h:commandButton value="delete" action="#{brandHome.remove}" | rendered="#{brandHome.managed}" /> | </s:validateAll> | </h:form> | | @SuppressWarnings("unchecked") | @Factory | public void getCategoryList() { | entityManager.clear(); | categoryList = entityManager.createQuery("from Category category") | .getResultList(); | Contexts.getSessionContext().flush(); | } | | <factory name="brand" value="#{brandHome.instance}" /> | <fwk:entity-home name="brandHome" | entity-class="com.hongyang.domain.directory.Brand" /> | | @ManyToOne | @JoinColumn(name = "category") | private Category category = new Category(); | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4043407#4043407 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4043407 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user