1 Reply Latest reply on Jun 26, 2015 2:31 AM by michpetrov

    render="@region" questions and issues

    cm.tcomp

      Was trying to implement a popup panel with validation. To execute the portion only in the panel, it was in a a4j:region.

       

      The problem was, it appeared that validation was failing and re-rendering was not occuring, so messages would never occur.

       

      setup - netbeans 8.02, Jsf2.2, richfaces4.5.5.

       

      partial code for illustration (could not figure out how to format properly code snippet with editor)

       

      <a4j:region id="regiongroup" >

      <a4j:outputPanel id="thisPanel">

      ....

      Confirm email:
      <h:inputText id="email2id"
                   required="true"
                   requiredMessage="email2 required">
      </h:inputText>
      <h:message for="email2id" />

      </h:panelGrid>

      <br/>

      <a4j:commandButton value="Accept a4j:"

                     execute="@region"
                     render="@region"
                     action="#{testBean.gotToResponse()}"
                     />

       

       

      render works for @ all, form, and for the thisPanel id.

       

      this appears to be related to

      Regions don't have any visual representation so they can't be used as a @render target

      https://issues.jboss.org/browse/RF-13390?jql=text%20~%20%22render%3D%40region%22

       

      however, the reason that I was using @region was it is listed in 4.3 Partial view updates as a valid rendering area, even in the latest doc

      Chapter 4. Basic concepts

       

      @region

      The region that contains the requesting component is updated. Use the <a4j:region> component as a wrapper element to specify regions.

       

      So the questions are - should region be renderable, or should it be struck from the documentation?

       

      anyway, the discrepency led to much lost time and hair tearing out