1 Reply Latest reply on Mar 5, 2013 11:03 PM by songjinglim

    valueChangeListener for <h:selectOneMenu> not function when re-render <rich:popupPanel>

    songjinglim Newbie

      I have a popup panel (id=PanelAddQueryCriteria) define on top of jsf page but it only enable it after user select a menu item (id=entityKind) and re-render take pace for that popupPanel. However because of that re-render, select item (id=queryCriteriaAttr) inside that popup panel don't trigger change listener (#{ceaDBBean.queryCriteriaAttrChanged}) in first value change, and only trigger when select again... Any help? Here the code:

       

      <rich:popupPanel id="PanelAddQueryCriteria">

        <h:form id="formAddQueryCriteria">

          <h:selectOneMenu id="queryCriteriaAttr"

            value="#{ceaDBBean.queryCriteriaAttr}" required="true"

            valueChangeListener="#{ceaDBBean.queryCriteriaAttrChanged}">

            <f:selectItems value="#{ceaDBBean.ceaEntityKindAttrs}"/>

          </h:selectOneMenu>

        </h:form>

      </rich:popupPanel>

       

      <h:panelGrid id="searchPanel">

        <h:selectOneMenu id="entityKind"

          value="#{ceaDBBean.entityKind}" required="true"

          valueChangeListener="#{ceaDBBean.entityKindChanged}">

          <a4j:ajax event="valueChange" render="addQueryCriteria" execute="@this" />

          <f:selectItems value="#{ceaDBBean.ceaEntityKinds}" />

        </h:selectOneMenu>

       

        <a4j:commandLink styleClass="no-decor" id="addQueryCriteria"

          render="PanelAddQueryCriteria"

          disabled="#{empty ceaDBBean.entityKind}"

          execute="@this" action="#{ceaDBBean.initAddQuryCriteria}"

          oncomplete="#{rich:component('PanelAddQueryCriteria')}.show()">

          <h:graphicImage id="addQueryCriteriaImg"

            value="/images/icons/common/new.gif" width="16" height="16"

            alt="#{adminMsg.addQueryCriteria}" />

            <rich:tooltip value="#{adminMsg.addQueryCriteria}" for="addQueryCriteria" />

        </a4j:commandLink>   

      </h:panelGrid>