0 Replies Latest reply on Dec 21, 2010 6:19 PM by Fericit Bostan

    aj4:ajax render="list of ids" not rendering all

    Fericit Bostan Newbie

      I'm using RichFaces 4 M4 and I'm having an issue re-rendering a partial view. I've specified a list of component ids to re-render but they simply don't. The only way I can get it to work is if I specify @form instead. I have my page listed below and if I specify a list of Ids rather than @form, I can only get the 'billing-country-list-label', 'billing-country-list', and the 'billing-street-name-label' to re-render. The 'billing-street-name' does not seem to be effected unless I remove the Ids and use @form instead.

       

      <ui:fragment xmlns="http://www.w3.org/1999/xhtml"

          xmlns:ui="http://java.sun.com/jsf/facelets"

          xmlns:h="http://java.sun.com/jsf/html"

          xmlns:f="http://java.sun.com/jsf/core"

          xmlns:a4j="http://richfaces.org/a4j"

          xmlns:rich="http://richfaces.org/rich">

       

          <h:panelGrid columns="2">

          <h:outputLabel value="#{msgs['label.billingAddress']}" for="billing-radio"/>

          <h:panelGrid id="billing" styleClass="select-one-radio-panel">

              <h:selectOneRadio id="billing-radio"

                  enabledClass="select-one-radio-enabled" disabledClass="select-one-radio-disabled"

                  value="#{participant.billingAddressSame}" layout="lineDirection">

       

                  <f:selectItem itemLabel="#{msgs['label.yes']}" itemValue="true" />

                  <f:selectItem itemLabel="#{msgs['label.no']}" itemValue="false" />

                  <a4j:ajax render="billing-country-list-label billing-country-list billing-street-name-label billing-street-name"/>

              </h:selectOneRadio>

          </h:panelGrid>

       

              <h:panelGroup id="billing-country-list-label">

              <h:outputLabel for="billing-country-list"

                  value="#{msgs['label.billingCountry']}" rendered="#{participant.billingAddressSame eq 'false'}"/>      

              </h:panelGroup>                           

              <h:panelGroup id="billing-country" styleClass="select-one-menu-panel" >

                  <h:selectOneMenu id="billing-country-list"

                      rendered="#{participant.billingAddressSame eq 'false'}"

                      enabledClass="select-one-menu-enabled" disabledClass="select-one-menu-disabled"

                      layout="pageDirection"

                      value="#{participant.billingCountry}"

                      required="true" requiredMessage="#{msgs['error.billingCountryRequired']}">

       

                      <f:selectItem itemLabel="#{msgs['label.pleaseSelect']}" itemValue="" />

                      <f:selectItems value="#{countryController.countries}" />

                      <a4j:ajax />

                  </h:selectOneMenu>

                  <a4j:outputPanel id="billing-country-list-error-panel" ajaxRendered="true">

                      <h:message id="billing-country-list-error" for="billing-country-list" style="color:red"/>

                  </a4j:outputPanel>                                             

              </h:panelGroup>   

       

              <h:panelGroup id="billing-street-name-label" >

      <h:outputLabel for="billing-street-name"

        value="#{msgs['label.billingCountryStreet']}" rendered="#{participant.billingAddressSame eq 'false'}"/>

              </h:panelGroup> 

       

              <h:panelGrid id="billing-street-name-panel" styleClass="select-one-menu-panel" rendered="#{participant.billingAddressSame eq 'false'}">

                   <h:inputText id="billing-street-name" maxlength="100"

                       rendered="#{participant.billingAddressSame eq 'false'}"

                       value="#{participant.billingStreet}"

                       required="true" requiredMessage="#{msgs['error.billingAddressStreetRequired']}">

                       <f:validateLength minimum="2" maximum="100"/>                         

                       <a4j:ajax/>

                   </h:inputText> 

       

                   <a4j:outputPanel id="billing-street-name-error-panel" ajaxRendered="true">

                       <h:message id="billing-street-name-error" for="billing-street-name" style="color:red"/>

                   </a4j:outputPanel>                                               

              </h:panelGrid>                    


          </h:panelGrid>   

      </ui:fragment>

       

       

      I know I'm overlooking something but I can't seem to figure out what.

      Thanks for the help...