Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-13107

ajaxRenderer component are rendered even though they are in non-active switchable panel, causing JSF to fail to update DOM

    Details

    • Sprint:
      RichFaces 4.3.4 Sprint 1
    • Steps to Reproduce:
      Hide

      Download reproducer and
      1) mvn clean package and deploy on JBoss
      2) go to http://localhost:8080/bug_reproducer/index.jsf
      3) fill in surname longer that 10 chars & click-open the second tab
      4) enter short name (shorter than 6)
      5) click submit - no message is shown
      Workaround:
      1) Add ajaxRendered="false" to the first rich:message in index.xhtml.
      2) follow the steps above
      3) rich:message is shown

      Show
      Download reproducer and 1) mvn clean package and deploy on JBoss 2) go to http://localhost:8080/bug_reproducer/index.jsf 3) fill in surname longer that 10 chars & click-open the second tab 4) enter short name (shorter than 6) 5) click submit - no message is shown Workaround: 1) Add ajaxRendered="false" to the first rich:message in index.xhtml. 2) follow the steps above 3) rich:message is shown
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Workaround is using limitRender:

      <a4j:commandButton value="Submit" execute="content" render="content" 
      limitRender="true" />
      

      Another workaround is using mode="ajax" for tabPanel:

      <rich:tabPanel switchType="ajax">
      

      Another workaround is to set ajaxRendered="false" to the rich:message(s) that might not get rendered.

      Show
      Workaround is using limitRender: < a4j :commandButton value = "Submit" execute = "content" render = "content" limitRender = "true" /> Another workaround is using mode="ajax" for tabPanel: < rich :tabPanel switchType = "ajax" > Another workaround is to set ajaxRendered="false" to the rich:message(s) that might not get rendered.
    • Bugzilla Update:
      Perform

      Description

      We have a form with a tabPanel component with two tabs A and B. In A there is an input and its rich:message in B the same plus a button that submits and re-renders B. When B is opened (thus A is not rendered) and the form is submitted and validation fails, then no message is shown.
      Note that:
      1) switchType must be set to server to ensure the A's rich:message is really not on the page.
      2) button in B must re-render only content of B

      This is only a specific scenario, the issue might occur also in other situations (e.g. global messages tag outside of tabPanel is not rendered).

      Please find the enclosed reproducer.

      Snipper:

          <h:form>
              <rich:tabPanel switchType="server">
                  <rich:tab>
                      <h:inputText id="surname" value="#{richBean.surname}">
                          <f:validateLength minimum="10"/>
                      </h:inputText>
                      <rich:message for="surname"/>
                  </rich:tab>
                  <rich:tab>
                      <h:panelGroup id="content">
                          <h:inputText id="name" value="#{richBean.name}">
                              <f:validateLength minimum="6"/>
                          </h:inputText>
                          <rich:message for="name"/>
                      </h:panelGroup>
       
                      <a4j:commandButton value="Submit" execute="content" render="content" />
                  </rich:tab>
       
              </rich:tabPanel>
          </h:form>
      

        Gliffy Diagrams

          Attachments

          1. bug_reproducer.zip
            13 kB
          2. reproducer_ajax.zip
            35 kB
          3. rf13107ajax.png
            rf13107ajax.png
            17 kB

            Issue Links

              Activity

                People

                • Assignee:
                  lfryc Lukáš Fryč
                  Reporter:
                  jtrantin Jonáš Trantina
                • Votes:
                  3 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 hour, 30 minutes
                    1h 30m
                    Remaining:
                    Remaining Estimate - 1 hour, 30 minutes
                    1h 30m
                    Logged:
                    Time Spent - Not Specified
                    Not Specified