1 2 Previous Next 15 Replies Latest reply on May 6, 2007 3:53 AM by Pete Muir

    Problem with s:convertEntity

    Seto Kaiba Expert

      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: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: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}" />

       public void getCategoryList() {
       categoryList = entityManager.createQuery("from Category category")

       <factory name="brand" value="#{brandHome.instance}" />
       <fwk:entity-home name="brandHome"
       entity-class="com.hongyang.domain.directory.Brand" />

       @JoinColumn(name = "category")
       private Category category = new Category();

        1 2 Previous Next