3 Replies Latest reply on Apr 11, 2008 4:49 PM by emailkuppai

    a4j:support inside h:selectOneMenu 3.20 problem?

    powerhouse_b

      Hi.

      The code that used to work on 3.1.4 now doesn't on 3.20. I use two selectOneMenu, one populated using the information selected in the first, so I use a4j:support inside the first one. I have searched the forum and JIRA, but haven't found anything. Bug or not?

      Here is my code:

       <a:region >
       <h:selectOneMenu value="#{formulehelper.tipvariabila}" required="true"
       id="tipurivariabileCombo" immediate="true">
       <a:support event="onchange" reRender="tipurivariabileCombo, variableListCombo"
       action="#{formulehelper.updateStatus}" status="mainStatus"
       immediate="true" ajaxSingle="true"/>
       <s:selectItems value="#{formulehelper.formuleHelperLista}" var="tipvariabila"
       label="#{tipvariabila.tip}">
       </s:selectItems>
       <s:convertEntity />
       </h:selectOneMenu>
       </a:region>
      
       <a:outputPanel ajaxRendered="true">
       <h:selectOneMenu value="#{formulehelper.selectedVariabile}" id="variableListCombo" style="width: 195px" required="true">
       <a:support event="onchange" reRender="variableListCombo" status="mainStatus"
       immediate="true" ajaxSingle="true"/>
       <s:selectItems value="#{formulehelper.listaVariabile}"
       var="varvar" label="#{varvar.nume}" noSelectionLabel="Selectati o variabila">
       </s:selectItems>
       <s:convertEntity />
       </h:selectOneMenu>
       </a:outputPanel>
      


        • 1. Re: a4j:support inside h:selectOneMenu 3.20 problem?

          you have too much immediate="true", ajaxSingle="true" and a:region in your code. It looks like you try to use conjurations instead of programming in rational way.

          and yes, the missing ability of using JSF 1.2 API, cause many side effects in the RichFaces 3.1.x . You used to use one of them. Now, RichFaces works strongly according to the JSF 1.2 Spec.

          Could you say shortly, what is the scenario of this code snippet?

          • 2. Re: a4j:support inside h:selectOneMenu 3.20 problem?
            powerhouse_b

            When someone selected something from the first selectOneMenu, I wanted to populate the second one with information regarding that selection. Also, the selection from the second selectOneMenu should also be sent via an ajax request.

            I don't know the correct way to do it, but I have spend a lot of time getting this to work, with and without a:region, a:outputPanel, immediate="true" etc. This is the only solution that worked for me on RichFaces 3.1.4.

            • 3. Re: a4j:support inside h:selectOneMenu 3.20 problem?

              Hi

              we are also having similar problems but our exception nature is different.

              Assume we have Country -> State H:SelectOneMenu.

              i am using a4j:region & a4j:support to populate
              State Drop Down based on Country Selection drop down.

              this is working fine in a simple form mode.

              but when we try to include it with some more input components ( input Text, command button ) then
              after rendering we are getting duplicate id exception.

              after that entire page is not working. we have to restart the server.

              3.1.2 is the version we are using code is very much the same.

              thanks in advance
              ek