Announcement Announcement Module
Collapse
No announcement yet.
facelets double h:selectOneMenu problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • facelets double h:selectOneMenu problem

    hello,

    I have a problem with h:selectOneMenu in facelets. I am trying to create a form with multiple h:selectOneMenu and when i insert more then one nothing happens when i commit the form.
    this is my page:
    Code:
    <h:form>
        <table align="center">
        <tr>
           <td> <label><h:outputText value="Name:"/></label></td>
           <td> <h:inputText value="#{g1.name}"/><br/></td>
        </tr>
        <tr>
           <td> <label><h:outputText value="Type:"/></label></td>
           <td>
    			<h:selectOneMenu value="#{g1.goodType}" converter="GoodTypeCon">
    				<f:selectItems value="#{gts}"/>
                </h:selectOneMenu>
    		</td>
        </tr>
        <tr>
            <td> <label><h:outputText value="Measure Unit:"/></label></td>
            <td>
                <h:selectOneMenu value="#{g1.measureUnit}" converter="MeasureUnitCon">
                    <f:selectItems value="#{mus}"/>
                </h:selectOneMenu>
            </td>
        </tr>
        <tr>
    		<td align="right"><h:commandButton  action="success" value="Add" class="botton"/></td>
    		<td><h:commandButton action="cancel" value="Cancel" class="botton"/></td>
        </tr>
        </table>
    </h:form>
    this code dosen't do anything, it should call the pesist method from GoodService. My flow.xml is this:

    Code:
    <var name="g1" class="xxx.beans.Good"/>
    
    <view-state id="main" view="Main.xhtml">
            <transition on="addGood" to="addGood"/>
    </view-state>
    
    <view-state id="addGood" view="addGood.xhtml" model="g1">
            <on-entry>
                <evaluate expression="MeasureService.getItems()"  result="flowScope.mus"/>
                <evaluate expression="GoodTypeService.getItems()"  result="flowScope.gts"/>
            </on-entry>
            <transition on="success" to="main" bind="true">
                <evaluate expression="GoodService.insert(g1)"/>
            </transition>
            <transition on="cancel" to="main" bind="false"/>
        </view-state>
    thie hibernate sintax runs fine, and i don't have no database errors, and conversions errors.
    If i use just one h:selectOneMenu the service is called corectly and the persistence is done just fine. I can't find any solution on this.

    Please help.
Working...
X