1 Reply Latest reply on Apr 18, 2007 4:13 PM by Konstantin Kauz

    SelectOne

    Konstantin Kauz Novice

      I have this peace of code:

      <a4j:region renderRegionOnly="false">
       <h:selectOneMenu id="hrs" value="#{kfz.hersteller}" required="true"
       <s:selectItems value="#{herstellersList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
      <f:converter converterId="myConverter" />
       <a4j:support event="onchange" action="#{fahrzeugin.setKmodel}"
       reRender="modelsel" />
       </h:selectOneMenu>
       </a4j:region>
      


      There are a way to read out in converter #{herstellersList} without factory methode will fired?

        • 1. Re: SelectOne
          Konstantin Kauz Novice


          <h:outputText value="#{kfz.hersteller.bezeichnung}" />


          The output here is correct, but in follow code, the value does not set:

          <h:selectOneMenu id="hrs" value="#{kfz.hersteller}" required="true" converter="#{bearbkfz.herconverter}">
           <s:selectItems value="#{herstellersList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
           <a4j:support event="onchange" action="#{fahrzeugin.setKmodel}"
           reRender="modelsel" />
           </h:selectOneMenu>




          Here is entire code:


          <ui:define name="main">
           <h:outputText value="Fabrikat: "/>
           <h:outputText value="#{kfz.hersteller.bezeichnung}" />
           <s:div style="margin-top:5px">
           <a4j:form>
          
           <s:validateAll>
          
           <rich:panel>
           <h:panelGroup id="frms">
           <h:panelGrid columns="2">
           <h:outputText value="FNr: "/> <h:outputText value="#{kfz.id}"/>
           </h:panelGrid>
           <h:outputText value="Fabrikat:"/>
           <h:outputText value="Fabrikat:"/>
           <h:panelGrid columns="3">
          
           <h:outputText value="Fabrikat: "/>
          
           <h:panelGroup style="display:block">
           <a4j:region renderRegionOnly="false">
           <h:selectOneMenu id="hrs" value="#{kfz.hersteller}" required="true" converter="#{bearbkfz.herconverter}">
           <s:selectItems value="#{herstellersList}" var="her" label="#{her.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
           <a4j:support event="onchange" action="#{fahrzeugin.setKmodel}"
           reRender="modelsel" />
           </h:selectOneMenu>
           </a4j:region>
           </h:panelGroup>
           <h:message for="hrs" />
          
           <h:outputText value="Modell:" />
           <h:panelGroup style="display:block" id="modelsel" >
           <a4j:region renderRegionOnly="false">
           <h:selectOneMenu value="#{kfz.kfzmodel}" required="true" converter="#{searchkfz.modconverterKfz}">
           <s:selectItems value="#{kfz.hersteller.kfzmodel}" var="md" label="#{md.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
           </h:selectOneMenu>
           </a4j:region>
           </h:panelGroup>
           <h:message for="modelsel" />
          
           <h:outputText value="Filiale:" />
           <h:selectOneMenu id="fillsel" value="#{kfz.filliale}" required="true" converter="#{standortverw.fillconverter}">
           <s:selectItems value="#{fillList}" var="md" label="#{md.bezeichnung}" noSelectionLabel="Bitte waehlen..." />
           </h:selectOneMenu>
           <h:message for="fillsel" />
          
           </h:panelGrid>
           </h:panelGroup>
          
           </rich:panel>