2015-08-20 4 views
0

в родительском окне у меня есть список и два commandButtonдействие вызывается только после обновления страницы?

  1. Первый commandButton добавит новую запись в потребителе table.When будет нажать на эту кнопку, всплывающее окно откроется, пользователь даст значение и представить список снова будет отображаться, и будет добавлена ​​новая запись.
  2. По второму commandButton Пользователь может редактировать добавляемые записи, нажав на эту commandbutton для этого в родительском окне я сделал ниже код

Включите Popup Как это

< rich: panel id = "includePandel" > < ui: include src = "CfsGroupFeature-Add.xhtml" > < ui: param name = "parentBean" 
value = "#{cfsBean}"/> < /ui:include> 
    </rich: panel > 

Здесь кнопка Редактировать в Родитель класс, который будет вызывать метод всплывающего окна боба

action = "#{addFeaturePopUpBean.updateCfsGroupFeature(itemsComp,tableIndex.index)}" 

Вот целая команда

<a4j: commandButton id ="editAlarm" 
    image = "/resources/images/table_edit.png" 
    immediate = "false" 
    execute = "@this" 
    actionListener = "#{cfsBean.updateCfsGroupFeature(itemsComp,tableIndex.index)}" 
    action = "#{addFeaturePopUpBean.updateCfsGroupFeature(itemsComp,tableIndex.index)}" 
    oncomplete = "#{rich:component('popup')}.show(true)" 
    render = "includePandel" > < /a4j:commandButton> 

и я писал этот код в PopupBean или AddFeaturePopUpBean.java

public void updateCfsGroupFeature(CompositeCharGroupVo compositeCharGroupVo,Integer row) { 
     ExternalContext externalContext = FacesContext.getCurrentInstance().getExternalContext(); 
     Map<String, Object> sessionMap = externalContext.getSessionMap(); 
     if(sessionMap.get("cfsBean") != null){ 
      CfsBean cfsBean = (CfsBean) sessionMap.get("cfsBean"); 
      selectionRfsGroupFeature = cfsBean.getSelectionRfsGroupFeature(); 
      for (Object object : selectionRfsGroupFeature) { 
       if(object instanceof Integer){ 
       indexValue = (Integer) object; 
       if(compositeCharGroupVo != null && compositeCharGroupVo.getFeaturesList() != null && compositeCharGroupVo.getFeaturesList().get(indexValue) != null){ 
       featuesObj = compositeCharGroupVo.getFeaturesList().get(indexValue); 
       setFeatuesObj(featuesObj); 
       } 

       } 
      } 
     } 

    } 

Upto здесь все работает отлично и я могу видеть выбранные значения строки во всплывающем окне.

Теперь в окне всплывающего окна, если я нажимаю кнопку «Сохранить», тогда commandButton не вызывается, его просто сбросить (удалены) предварительно заполненные значения. Теперь, если снова я отправлю форму, то ее работа.

Примечание: - Я использую одно и то же всплывающее окно для добавления новой записи и редактирования. Сохраненная работа прекрасная проблема приходит только тогда, когда я делаю редактирование.

EDIT: -

JSF Version   2.1.13 
    Richfaces Version 4.3.5.Final 
    Javax.el    3.0.0 
    Servlet    2.4 
    el-api    2.2 
    el-impl    2.2 
    Jboss    7.1.0.Final 

Popup Исходный код

<?xml version='1.0' encoding='UTF-8' ?> 
<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:a4j="http://richfaces.org/a4j" 
    xmlns:rich="http://richfaces.org/rich" 
    xmlns:fn="http://java.sun.com/jsp/jstl/functions"> 


    <ui:define name="title">Page title</ui:define> 



    <h:outputScript target="body"> 
     function validateFeatures(formId, valueType, dependentId, fieldName, errorMsgId,isallowedvalue,defvalue,pattern,min,max){ 
     var intRegex = /^\+?[0-9]\d*?$/; 
     document.getElementById(formId+':'+errorMsgId).innerHTML = ""; 
     var selectedvalueType = document.getElementById(formId+':'+valueType); 
     var dependentValue = document.getElementById(formId+':'+dependentId); 
     var capValue = dependentValue.value.split(","); 
     var defalutValue = document.getElementById(formId+':'+defvalue); 
     var minvalue = document.getElementById(formId+':'+defvalue); 
     var maxValue = document.getElementById(formId+':'+defvalue); 
     var patternRe = document.getElementById(formId+':'+defvalue); 

     if(selectedvalueType.value == "Integer"){ 
      if(dependentValue.value!==""){ 
      if(isallowedvalue){ 
      for(var i=0; i &lt; capValue.length ; i++){ 
       isInteger = intRegex.test(capValue[i]); 
       if(!isInteger){ 
        document.getElementById(formId+':'+errorMsgId).innerHTML = "Please enter valid Integer value for "+fieldName; 
        return false; 
        } 
       } 
      } 
      else{ 
       isInteger = intRegex.test(dependentValue.value); 
       if(!isInteger){ 
        document.getElementById(formId+':'+errorMsgId).innerHTML = "Please enter valid Integer value for "+fieldName; 
        return false; 
        } 
       } 
      } 
     } 
     validatAllowedValues(formId,valueType,dependentId,defvalue,isallowedvalue,errorMsgId,pattern,min,max); 
    } 

    function validateMaxValues(formId,valType, minval, maxval, errorMsgId){ 
     document.getElementById(formId+':'+errorMsgId).innerHTML = ""; 
     var valueType = document.getElementById(formId+':'+minval); 
     var dependentValue = document.getElementById(formId+':'+maxval); 
     var selectedvalueType = document.getElementById(formId+':'+valType); 
     var intRegexValid = /^\+?[0-9]\d*?$/; 

     if(selectedvalueType.value == "Integer"){ 
      if(valueType.value!==""){ 
       isValidInteger = intRegexValid.test(valueType.value) 
       if(!isValidInteger){ 
        document.getElementById(formId+':'+errorMsgId).innerHTML = "Please enter valid Integer value"; 
        return false; 
       } 
      } 
      if(dependentValue.value!==""){ 
       isValidMaxInteger = intRegexValid.test(dependentValue.value) 
       if(!isValidMaxInteger){ 
        document.getElementById(formId+':'+errorMsgId).innerHTML = "Please enter valid Integer value"; 
        return false; 
       } 
      } 
      if(valueType.value!=="" &amp;&amp; dependentValue.value!== ""){ 
       if(valueType.value &lt; dependentValue.value){ 
        return true; 
       } 
       else{ 
        document.getElementById(formId+':'+errorMsgId).innerHTML = "Maximum value must be greater than Minimum value "; 
        dependentValue.value=""; 
        return false; 
       } 

      } 

     } 
     else if(selectedvalueType.value == "String"){ 
      if(valueType.value!=="" &amp;&amp; dependentValue.value!== ""){ 
       if(valueType.value &lt; dependentValue.value){ 
       return true; 
      } 
      else{ 
       document.getElementById(formId+':'+errorMsgId).innerHTML = "Maximum Stringth lenght must be greater than Minimum String length"; 
       dependentValue.value=""; 
       return false; 
      } 
     } 

     } 

    } 
    function validatAllowedValues(formId,valtyep,allowedvalues,defaultValue,isallowedvalue,errorMsgId,patternval,min,max){ 
     document.getElementById(formId+':'+errorMsgId).innerHTML = ""; 
     var allowed2 = document.getElementById(formId+':'+valtyep); 
     var allowedValues1 = document.getElementById(formId+':'+allowedvalues); 
     var defavlue1 = document.getElementById(formId+':'+defaultValue); 
     var tovalidate; 
     var ismatch= false; 
     var patternRegex = document.getElementById(formId+':'+patternval); 
     var minval = document.getElementById(formId+':'+min); 
     var maxval = document.getElementById(formId+':'+max); 
     re = new RegExp(patternRegex.value); 

     if(isallowedvalue){ 
      tovalidate=allowedValues1; 
     } 
     else{ 
      tovalidate=defavlue1; 
      defavlue1 =allowedValues1; 
     } 
     var sepValue= tovalidate.value.split(","); 
     if(tovalidate.value!="" &amp;&amp; defavlue1.value!=""){ 
      if(allowed2.value == "Integer" || allowed2.value == "String"){ 
       for(var j=0; j &lt; sepValue.length ; j++){ 
        if(sepValue[j] === defavlue1.value){ 
         ismatch=true; 
         break; 
         } 
       } 
       if(!ismatch){ 
        document.getElementById(formId+':'+errorMsgId).innerHTML = "Default values must be equal to one of the allowed values "; 
        return false; 
        } 
      } 
     } 
     else{ 
      if(patternRegex.value!=="" &amp;&amp; defavlue1.value!==""){ 
       isPattenrMatch = re.test(defavlue1.value); 
       if(!isPattenrMatch){ 
        document.getElementById(formId+':'+errorMsgId).innerHTML = "Default values must be match with Pattern"; 
        return false; 
       } 
       if(minval.value!=="" &amp;&amp; maxval.value!==""){ 
        if(allowed2.value == "Integer"){ 
         if(defavlue1.value &lt; minval.value || defavlue1.value &gt; maxval.value){ 
          document.getElementById(formId+':'+errorMsgId).innerHTML = "Default values must be in between min and Max value"; 
          return false; 
         } 
        } 
      if(allowed2.value == "String"){ 
         if(defavlue1.value.length &lt; minval.value || defavlue1.value.length &gt; maxval.value){ 
          document.getElementById(formId+':'+errorMsgId).innerHTML = "Default value Length must be in between min and Max value"; 
          return false; 
         } 
        } 


       } 

      } 
     } 

    } 
</h:outputScript> 


    <rich:popupPanel id="popup" modal="true" resizeable="false" 
     height="600" width="380" autosized="true" domElementAttachment="form" > 
     <f:facet name="header"> 
      <h:outputText value="Add Group Feature" /> 
     </f:facet> 
     <f:facet name="controls"> 
      <h:outputLink value="#" 
       onclick="#{rich:component('popup')}.hide(); return false;"> 
       X 
      </h:outputLink> 
     </f:facet> 
     <h:form id="popupform"> 
     <h:messages globalOnly="true" /> 
      <rich:focus /> 
      <h:panelGroup id="notification"> 

       <rich:notify stayTime="2000" 
        rendered="#{flash.errorMessage.length() > 0 }" 
        styleClass=".rf-ntf-cnt" showShadow="false" sticky="false"> 
        <f:facet name="detail"> 
         <rich:panel id="flashErrorMessage" 
          style="background-color:#ffebe8; padding:15px 0 15px 10px; border-radius:0 0 0 0;display:inherit;"> 
          <h:graphicImage value="../resources/images/stop.png" /> 
           Failed: #{flash.errorMessage} 
           </rich:panel> 
        </f:facet> 
       </rich:notify> 
       <rich:notify stayTime="2000" 
        rendered="#{flash.successMessage.length() > 0 }" 
        styleClass="rf-ntf-cnt" showShadow="false" sticky="false"> 
        <f:facet name="detail"> 
         <rich:panel id="successfullFlashIdMessage" 
          style=" padding:15px 0 15px 10px; border-radius:0 0 0 0"> 
          <h:graphicImage value="../resources/images/success.png" /> 
           Success: #{flash.successMessage} 
           </rich:panel> 
        </f:facet> 

       </rich:notify> 

       <rich:notify stayTime="2000" 
        rendered="#{flash.warningMessage.length() > 0 }" 
        styleClass=".rf-ntf-cnt" showShadow="false" sticky="false"> 
        <f:facet name="detail"> 
         <rich:panel id="notifyWarningMessage" 
          style="background-color:#ffebe8; padding:15px 0 15px 10px; border-radius:0 0 0 0"> 
          <h:graphicImage 
           value="../resources/images/Button-Warning-icon.png" height="20" 
           width="20" /> 
           Warning: #{flash.warningMessage} 
           </rich:panel> 
        </f:facet> 

       </rich:notify> 


      </h:panelGroup> 

      <a4j:outputPanel id="search-filter"> 
       <table cellspacing="20px"> 
        <tr> 
         <td><h:outputText value="Name" /> <h:outputText value=" *" 
           style="color:red" /></td> 
         <td><h:inputText style="width:142px" id="featureName" 
           value="#{addFeaturePopUpBean.featuesObj.name}" 
           validatorMessage="#{bsmPortalMessage['message.catalog.validation.compositeChar.name']}"> 
           <f:validateRequired /> 
           <f:validateRegex pattern="^[a-zA-Z0-9][a-zA-Z0-9_-]*$"></f:validateRegex> 
           <rich:validator event="blur" /> 
          </h:inputText> <br /> <rich:message for="featureName" /></td> 
        </tr> 
        <tr> 
         <td><h:outputText value="Desc" /></td> 
         <td><h:inputText style="width:142px" id="description" 
           value="#{addFeaturePopUpBean.featuesObj.desc}"> 
          </h:inputText></td> 
        </tr> 
        <tr> 
         <td><h:outputText value="GloballySet" /></td> 
         <td><h:selectOneMenu 
           value="#{addFeaturePopUpBean.featuesObj.globallySet}" 
           disabled="false" style="width:155px"> 
           <f:selectItem itemValue="Yes" itemLabel="Yes" /> 
           <f:selectItem itemValue="No" itemLabel="No" /> 
          </h:selectOneMenu></td> 
        </tr> 
        <tr> 
         <td><h:outputText value="Mandatory" /></td> 
         <td><h:selectOneMenu 
           value="#{addFeaturePopUpBean.featuesObj.mandatory}" 
           disabled="false" style="width:155px"> 
           <f:selectItem itemValue="False" itemLabel="False" /> 
           <f:selectItem itemValue="True" itemLabel="True" /> 
          </h:selectOneMenu></td> 
        </tr> 
        <tr> 
         <td><h:outputText value="Value Type" /> <h:outputText 
           value="*" style="color:red;" /></td> 
         <td><h:selectOneMenu id="valueType" 
           value="#{addFeaturePopUpBean.featuesObj.valueType}" 
           style="width:155px" immediate="true" 
           valueChangeListener="#{addFeaturePopUpBean.valueTypeChanged}" 
           validatorMessage="#{bsmPortalMessage['message.validation.catalog.valueType']}"> 
           <f:selectItem noSelectionOption="false" itemDisabled="true" 
            itemLabel="#{bsmPortalLabel['label.rfs.type.selectone']}" /> 
           <f:selectItem itemValue="Integer" itemLabel="Integer" /> 
           <f:selectItem itemValue="String" itemLabel="String" /> 
           <f:selectItem itemValue="Boolean" itemLabel="Boolean" /> 
           <f:selectItem itemValue="IP Address" itemLabel="IP Address" /> 
           <f:validateRequired /> 
           <a4j:ajax event="valueChange" 
            render="dis,enab,mindis,minena,maxdis,maxenab,acceptIP,acceptInt,acceptBool,defaultIP,defaultInt,defaultBool" 
            execute="@this" /> 
          </h:selectOneMenu> <rich:message for="valueType" /></td> 
        </tr> 

        <tr> 
         <td><h:outputText value="Pattern" /></td> 
         <td><h:panelGroup id="dis"> 
           <a4j:outputPanel id="patternDis" 
            rendered="#{addFeaturePopUpBean.disabled}"> 
            <h:inputText style="width:142px" id="pattern" 
             value="#{addFeaturePopUpBean.featuesObj.pattern}" 
             disabled="true"> 
            </h:inputText> 
           </a4j:outputPanel> 
          </h:panelGroup> <h:panelGroup id="enab"> 
           <a4j:outputPanel id="patternenable" 
            rendered="#{!addFeaturePopUpBean.disabled}"> 
            <h:inputText style="width:142px" id="pattern12" 
             value="#{addFeaturePopUpBean.featuesObj.pattern}" 
             validatorMessage="#{bsmPortalMessage['message.catalog.validation.pattern']}" 
             converterMessage="#{bsmPortalMessage['message.catalog.validation.pattern']}" 
             immediate="true"> 
             <f:validator validatorId="patternValidator" /> 
             <f:ajax event="blur" execute="pattern12" render="message1" /> 
            </h:inputText> 
            <h:message id="message1" for="pattern12" style="color:red" /> 

           </a4j:outputPanel> 
          </h:panelGroup></td> 
        </tr> 
        <tr> 
         <td><h:outputText value="Min" /></td> 
         <td><h:panelGroup id="mindis"> 
           <a4j:outputPanel id="mindisable" 
            rendered="#{addFeaturePopUpBean.disabled}"> 
            <h:inputText style="width:142px" id="min1" 
             value="#{addFeaturePopUpBean.featuesObj.min}" disabled="true"> 
            </h:inputText> 
           </a4j:outputPanel> 
          </h:panelGroup> <h:panelGroup id="minena"> 
           <a4j:outputPanel id="ninenable" 
            rendered="#{!addFeaturePopUpBean.disabled}"> 
            <h:inputText style="width:142px" id="min" 
             onchange="validateMaxValues('contentform:popupform', 'valueType','min', 'max','minValue');" 
             onblur="validateMaxValues('contentform:popupform', 'min', 'max','minValue');" 
             value="#{addFeaturePopUpBean.featuesObj.min}"> 
            </h:inputText> 
           </a4j:outputPanel> 
          </h:panelGroup></td> 
         <td><h:outputLabel id="minValue" value="" style="color:red" /></td> 
        </tr> 
        <tr> 
         <td><h:outputText value="Max" /></td> 
         <td><h:panelGroup id="maxdis"> 
           <a4j:outputPanel id="disbaleMax" 
            rendered="#{addFeaturePopUpBean.disabled}"> 
            <h:inputText style="width:142px" id="max1" disabled="true" 
             value="#{addFeaturePopUpBean.featuesObj.max}"> 
            </h:inputText> 
           </a4j:outputPanel> 
          </h:panelGroup> <h:panelGroup id="maxenab"> 
           <a4j:outputPanel id="enableMax" 
            rendered="#{!addFeaturePopUpBean.disabled}"> 
            <h:inputText style="width:142px" id="max" 
             onchange="validateMaxValues('contentform:popupform', 'valueType','min', 'max','miValue');" 
             onblur="validateMaxValues('contentform:popupform', 'min', 'max','miValue');" 
             value="#{addFeaturePopUpBean.featuesObj.max}"> 
            </h:inputText> 
           </a4j:outputPanel> 
          </h:panelGroup></td> 
         <td><h:outputLabel id="miValue" value="" style="color:red" /></td> 
        </tr> 


        <tr> 
         <td><h:outputText value="Allowed values" /></td> 
         <td><h:panelGroup id="acceptIP"> 
           <a4j:outputPanel id="IpAllowe" 
            rendered="#{addFeaturePopUpBean.IPselecetd}"> 
            <h:inputText style="width:142px" id="IPadree" 
             validatorMessage="#{bsmPortalErrorMessage['errorMessage.common.validator.invalidip']}" 
             value="#{addFeaturePopUpBean.featuesObj.allowedValues}"> 
             <f:validateRegex 
              pattern="^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$|\s*"> 
             </f:validateRegex> 
             <rich:validator /> 
            </h:inputText> 
            <rich:message for="IPadree" /> 
            <br /> 

           </a4j:outputPanel> 
          </h:panelGroup> <h:panelGroup id="acceptInt"> 
           <a4j:outputPanel id="allowedInt" 
            rendered="#{addFeaturePopUpBean.otherselecetd}"> 
            <h:inputText style="width:142px" id="allowedvalues" 
             onblur="validateFeatures('contentform:popupform', 'valueType', 'allowedvalues', 'Allowed values','allowedValErrorMsg',true,'default','pattern12','min','max');" 
             value="#{addFeaturePopUpBean.featuesObj.allowedValues}"> 
            </h:inputText> 
           </a4j:outputPanel> 
          </h:panelGroup> <br /> <h:outputLabel id="allowedValErrorMsg" value="" 
           style="color:red" /> <h:panelGroup id="acceptBool"> 
           <a4j:outputPanel id="allowedBool" 
            rendered="#{addFeaturePopUpBean.booleanselecetd}"> 
            <h:selectOneMenu id="booleSelc" 
             value="#{addFeaturePopUpBean.featuesObj.allowedValues}" 
             style="width:155px"> 

             <f:selectItem noSelectionOption="false" itemDisabled="true" 
              itemLabel="#{bsmPortalLabel['label.rfs.type.selectone']}" /> 
             <f:selectItem itemValue="True,False" itemLabel="True,False" /> 
            </h:selectOneMenu> 
           </a4j:outputPanel> 
          </h:panelGroup></td> 
        </tr> 

        <tr> 
         <td><h:outputText value="Default" /></td> 
         <td><h:panelGroup id="defaultIP"> 
           <a4j:outputPanel id="Ipdefault" 
            rendered="#{addFeaturePopUpBean.IPselecetd}"> 
            <h:inputText style="width:142px" id="IPadree1" 
             validatorMessage="#{bsmPortalErrorMessage['errorMessage.common.validator.invalidip']}" 
             value="#{addFeaturePopUpBean.featuesObj.defaultval}"> 
             <f:validateRegex 
              pattern="^(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))\.(\d|[1-9]\d|1\d\d|2([0-4]\d|5[0-5]))$|\s*"> 
             </f:validateRegex> 
             <rich:validator /> 
            </h:inputText> 
            <rich:message for="IPadree1" /> 
            <br /> 
           </a4j:outputPanel> 
          </h:panelGroup> <h:panelGroup id="defaultBool"> 
           <a4j:outputPanel id="booldefault" 
            rendered="#{addFeaturePopUpBean.booleanselecetd}"> 
            <h:selectOneMenu id="booleSelc1" 
             value="#{addFeaturePopUpBean.featuesObj.defaultval}" 
             style="width:155px"> 
             <f:selectItem noSelectionOption="false" itemDisabled="true" 
              itemLabel="#{bsmPortalLabel['label.rfs.type.selectone']}" /> 
             <f:selectItem itemValue="False" itemLabel="False" /> 
             <f:selectItem itemValue="True" itemLabel="True" /> 
            </h:selectOneMenu> 
           </a4j:outputPanel> 
          </h:panelGroup> <h:panelGroup id="defaultInt"> 
           <a4j:outputPanel id="Ipdefault1" 
            rendered="#{addFeaturePopUpBean.otherselecetd}"> 
            <h:inputText style="width:142px" id="default" 
             onblur="validateFeatures('contentform:popupform', 'valueType', 'default', 'Default','defaultErrorMsg',false,'allowedvalues','pattern12','min','max');" 
             value="#{addFeaturePopUpBean.featuesObj.defaultval}"> 
            </h:inputText> 
            <br /> 
            <h:outputLabel id="defaultErrorMsg" value="" style="color:red" /> 
           </a4j:outputPanel> 
          </h:panelGroup></td> 
        </tr> 
       </table> 
      </a4j:outputPanel> 

      <div class="divTableFooter" align="right" id="footerDivfilter"> 
       <a4j:commandButton 
        action="#{addFeaturePopUpBean.addFeature(parentBean)}" 
        value="#{bsmPortalLabel['button.common.submit']}" 
        image="/resources/images/submit-arrow.png" 
        render="cfsCreate,createRfs,createReso,notification,search-filter" > 
        <rich:tooltip id="toolemsSubmit" layout="block" render=":popup :popupform"> 
         <span style="white-space: nowrap"> 
          #{bsmPortalLabel['tooltip.common.submit']}</span> 
        </rich:tooltip> 
       </a4j:commandButton> 

       <h:commandButton type="image" id="backbuttonEms" 
        value="#{bsmPortalLabel['button.common.back']}" 
        onclick="#{rich:component('popup')}.hide(); return false;" 
        image="/resources/images/back.png"> 

        <rich:tooltip id="toolemsback" layout="block"> 
         <span style="white-space: nowrap"> 
          #{bsmPortalLabel['tooltip.common.back']}</span> 
        </rich:tooltip> 
       </h:commandButton> 

      </div> 

     </h:form> 


    </rich:popupPanel> 


</ui:composition> 
+0

Как @BalusC упоминает причины здесь, но я не могу понять, что может быть причиной http: // stackoverflow.com/questions/2118656/commandlink-commandbutton-ajax-backing-bean-action-listener-method-not -used/2120183 # 2120183 –

+1

Что такое область содержимого в AddFeaturePopUpBean, кажется, что ее область запроса? Другое дело, почему вы используете action и actionListener, вызывающий тот же метод в одной и той же кнопке? –

+0

'AddFeaturePopUpBean' ЯВЛЯЕТСЯ В ПРОСМОТРЕ ОБЪЯВЛЕНИЯ,' action' и 'actionListner', вызывающих разные методы bean, только имя метода такое же –

ответ

1

К сожалению, я не могу комментировать, но я бы предложил изменить:

domElementAttachment="form" 

в

domElementAttachment="parent" 

потому что похоже, что вы приложили свое всплывающее окно к форме в другую внешнюю форму. Попытайтесь положить rich:popupPanelвнутри формы, это работает для меня. Также добавьте execute="@this, search-filter" в a4j:commandButton.

UPDATE ПОСЛЕ ИЗУЧЕНИЯ

<a4j:outputPanel> может запросить перерывы из-за ajaxRendered="true" значения по умолчанию.

+0

прямой 'parent' или id родительской формы id? –

+0

Я сделал то, что вы мне сказали, но все еще форма не отправляется в Edit, поэтому мне нужно добавить \t \t '' –

+0

direct 'parent' - http: // docs.jboss.org/richfaces/latest_4_X/vdldoc/rich/popupPanel.html#domElementAttachment – Paszek

Смежные вопросы