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

Datatable evaluate value attribute even if rendered=false when doing ajax calls

    Details

    • Steps to Reproduce:
      Hide

      Steps to reproduce:
      1) Make use of the attached code to reproduce the bug.
      2) Visit the page at dataTableBug.jsf
      3) Initially the page will show "Is Property Read? False" and "Is Updated? False"
      4) Click on the "Update" button

      Observed behavior:
      The form will now show "Is Property Read? True" and "Is Updated? True". Based on the code of the backing bean, this implies that the Bean.getProperty() method was executed.

      Expected behavior:
      As the "bean.property" is only present in the first panel group (with id 'group1'), and this panel group has the attribute 'rendered' set to false, the Bean.getProperty() method should never be called, just like on the initial page load (without Ajax call).

      Notes:

      • The 'update' button is an a4j:commandButton which implies that the form will be submitted by Ajax.
      • The 'reset' button can be used to restore the form in original state (as the backing bean is session based), this is done by means of an h:commandButton to ensure page reload.
      Show
      Steps to reproduce: 1) Make use of the attached code to reproduce the bug. 2) Visit the page at dataTableBug.jsf 3) Initially the page will show "Is Property Read? False" and "Is Updated? False" 4) Click on the "Update" button Observed behavior: The form will now show "Is Property Read? True" and "Is Updated? True". Based on the code of the backing bean, this implies that the Bean.getProperty() method was executed. Expected behavior: As the "bean.property" is only present in the first panel group (with id 'group1'), and this panel group has the attribute 'rendered' set to false, the Bean.getProperty() method should never be called, just like on the initial page load (without Ajax call). Notes: The 'update' button is an a4j:commandButton which implies that the form will be submitted by Ajax. The 'reset' button can be used to restore the form in original state (as the backing bean is session based), this is done by means of an h:commandButton to ensure page reload.

      Description

      The rich:dataTable component evaluates the EL expression inside the value attribute, upon an Ajax call, even if it is part of a non-rendered h:panelGroup.

        Gliffy Diagrams

          Attachments

          1. Bean.java
            0.9 kB
          2. dataTableBug.jsf
            1 kB
          3. dataTableBug2.jsf
            1 kB
          4. dataTableBug3.jsf
            1 kB

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  kmoens Kenny Moens
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: