0 Replies Latest reply on Nov 23, 2007 10:29 AM by pmaho6

    rendered attribute being evaluated on inactive tabs

    pmaho6

      I am using rich:tabPanel, with switchType="ajax". I have two tabs, the second of which includes a dataTable, which is only rendered if there are rows. To check there are any rows, a database search is carried out.

      The problem is that the rendered attribute is evaluated on the dataTable when the second tab is not active, therefore initiating an unnecessary database search.

      As a work around, I have added an action listener to the tabs:

      action="#{collectionSearchHandler.activate}"

      but this is messy. I can understand that the rendered attributes should be evaluated when the switch mode is client, but should this be the case for ajax?

      Thanks

      Peter