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

Datatable and ExtendedDatatable evaluate value attribute even if rendered=false

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.0.0.Final, 4.1.0.Milestone2
    • Fix Version/s: 4.3.0.M3
    • Component/s: component-tables
    • Labels:
    • Environment:

      Fedora 15, Glassfish 3.1.1, CDI (Weld)

      Description

      In Richfaces 4 both datatable and extendedDatatable evaluate the value attribute even when rendered is set to false, even though it is not necessary. This makes it hard to achieve performance by trimming parts of the view tree. The built-in h:dataTable behaves correctly in that case.

      To reproduce simply try this snipplet:

      <h:form>
           <rich:dataTable value="#{myBean.property}" rendered="false">
            </rich:dataTable>
      </h:form>
      

      Side note: The reason I'm posting this is, that i want to embed a rich:dataTable in a ajax loaded rich:togglePanelItem which is loaded on demand. Probably fixing the "render" problem will also make the dataTable lazy-loadable when switching to the corresponding togglePanelItem.

      I hope this is no duplicate, I only found RichFaces 3 issues mentioning this problem.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            a.zhemoytuk Andrey Zhemoytuk added a comment -

            Still the issue is reproducible on postback (at least when partial state saving is turned off).

            Tried with RichFaces 4.3.3.Final and JSF 2.1.24 the following example:

              <h:form>
                <rich:dataTable rendered="false" value="#{viewScope.put('invoked', true)}">
                </rich:dataTable>
             
                <a4j:commandButton value="Postback" execute="@this" render="result"/>
              </h:form>
              
              <h:panelGroup id="result">
                #{invoked}
              </h:panelGroup>

            Show
            a.zhemoytuk Andrey Zhemoytuk added a comment - Still the issue is reproducible on postback (at least when partial state saving is turned off). Tried with RichFaces 4.3.3.Final and JSF 2.1.24 the following example: < h :form> < rich :dataTable rendered = "false" value = "#{viewScope.put('invoked', true)}" > </ rich :dataTable>   < a4j :commandButton value = "Postback" execute = "@this" render = "result" /> </ h :form> < h :panelGroup id = "result" > #{invoked} </ h :panelGroup>
            Hide
            bleathem Brian Leathem added a comment -

            Andrey Zhemoytuk can you file a new issue for the partial state saving = false use case?

            Show
            bleathem Brian Leathem added a comment - Andrey Zhemoytuk can you file a new issue for the partial state saving = false use case?
            Hide
            r0b3n Robert Becker added a comment -

            The issue is still present for me, too. I am using RF 4.3.7, Mojarra 2.1.29, Seam 2.3.1 on a glassfish 3.1.
            In particular, I experienced problems with an a4j:repeat within a tab panel. The repeat's value expression got evaluated after leaving the tab containing it. Rerendering an outputPanel containing the repeat in the active tab itself worked just fine. Notably, ui:repeat instead of a4j:repeat is broken, too.

            When implementing the workaround described in https://developer.jboss.org/message/741373 the issue goes away.

            Show
            r0b3n Robert Becker added a comment - The issue is still present for me, too. I am using RF 4.3.7, Mojarra 2.1.29, Seam 2.3.1 on a glassfish 3.1. In particular, I experienced problems with an a4j:repeat within a tab panel. The repeat's value expression got evaluated after leaving the tab containing it. Rerendering an outputPanel containing the repeat in the active tab itself worked just fine. Notably, ui:repeat instead of a4j:repeat is broken, too. When implementing the workaround described in https://developer.jboss.org/message/741373 the issue goes away.
            Hide
            r0b3n Robert Becker added a comment -

            Partial state saving is enabled in contrast to Andrey. Disabling it causes https://java.net/jira/browse/JAVASERVERFACES-2860 in my case.

            Show
            r0b3n Robert Becker added a comment - Partial state saving is enabled in contrast to Andrey. Disabling it causes https://java.net/jira/browse/JAVASERVERFACES-2860 in my case.
            Hide
            bleathem Brian Leathem added a comment -

            Further developments of this issue are being tracked in RF-12807.

            Show
            bleathem Brian Leathem added a comment - Further developments of this issue are being tracked in RF-12807 .

              People

              • Assignee:
                bleathem Brian Leathem
                Reporter:
                fkaempfer Frederick Kämpfer
              • Votes:
                6 Vote for this issue
                Watchers:
                11 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 4 hours
                  4h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                    Development

                      Agile