5 Replies Latest reply on Aug 11, 2011 1:39 AM by Michael Yarv

    a4j:commanButton inside the popupPanel don't execute for the first time

    Michael Yarv Newbie

      I have a popupPanel and a4j:commanButton inside the popupPanel which calls a session scoped bean's method. When page loaded popupPanel and a4j:commanButton with id “popup” not rendered. If I click on a4j:commanButton with id “show” then property bean.render will set with “true”, h:panelGrid will reRender, popupPanel and a4j:commanButton with id “popup” will be shown. Methods of session scoped bean, which calls by clicking  a4j:commanButton with id “create” or “cancel” will be executed only for second time click. I have to call popupPanel for the second time and only then methods will be executed.



      <a4j:commandButton id="show" value="show" render="table" action="#{tabsBean.setRenderTrue}">



      <h:panelGrid id="table">

      <a4j:commandButton value="Register S-ACS" id="popup" rendered="#{bean.render}">

      <rich:componentControl event="click" operation="show"

      target="panel" />


      <rich:popupPanel id="panel" modal="true" width="900"

      height="320" rendered="#{bean.render}">

      <f:facet name="header">

      <h:outputText value="Test"></h:outputText>


      <f:facet name="controls">

      <h:outputLink value="#"

      onclick="#{rich:component('panel')}.hide(); return false;">





      <h:panelGroup id="objectCreationPanel" layout="block">


      <h:panelGrid columns="2">

      <h:outputLabel for="ipInput">

      <h:outputText value="Ip Address" />

      <h:outputText value="*" styleClass="required-field" />


      <h:inputText id="ipInput"




      <h:outputLabel for="portInput">

      <h:outputText value="JNDI Port" />


      <h:inputText id="portInput"






      <h:panelGrid columns="2" width="40%" style="margin: auto;">

      <a4j:commandButton id="create" style="float:left"

      action="#{bean.add}" value="Save"

      render="dataOutput" execute="@form"


      oncomplete="#{rich:component('panel')}.hide(); return false;" />

      <a4j:commandButton id="cancel" style="float:right;"

      action="#{bean.cancel}" value="Cancel"

      oncomplete="#{rich:component('panel')}.hide(); return false;"

      execute="@this" />


      <h:panelGroup style="width:100%;">

      <h:message for="create" errorClass="validation-error" />