2 Replies Latest reply on Jan 9, 2010 5:36 PM by boy18nj

    During Ajax form submit?

    boy18nj

      <a4j:form ajaxSubmit="true" reRender="str, dt">
          <h:panel label="Maintain Collateral Report Categories">
           <s:decorate template="/platform/fields/view.xhtml">
            <ui:define name="label">Report Category</ui:define>
           </s:decorate>
           <h:selectOneMenu id="str"
            value="#{collatRptCatgryTypeList.catgoryId.str}"
            valueChangeListener="#{categoryId.valueCalled}"
            onchange="submit()" reRender="collatRptCatgryTypeList">
            <s:selectItems var="cc" value="#{collatRptCatgryList.resultList}"
             label="#{cc.catgryDesc}" itemValue="#{cc.catgryId}"
             noSelectionLabel="All Report Category" />
           </h:selectOneMenu>
          </h:panel>
         </a4j:form>

       

      When option is selected from drop down menu, the ajax submit takes places. And the value change listener method is also called.

      The setter method is called for value attribute and the value gets set to #{collatRptCatgryTypeList.catgoryId.str}

       

      But on the same screen, i am using the #{collatRptCatgryTypeList.catgoryId.str} value. But this does not get its value.

       

      If i use h:form, then everything gets fine.

       

      Note- collatRptCatgryTypeList.catgoryId.str, I use this value for create button, so the child record gets associated to its parent record when the user wants to add more child record.