3 Replies Latest reply: Dec 5, 2006 11:29 AM by 807607 RSS

    IsRenderable method for jsf attribute rendered="" ?


      please help me with a question:
      <h:dataTable value="#{Bean.List}"
      <h:outputText (or column)
      "Assuming that List is a list of objects, and the
      object has a method boolean isRenderable()"

      The method
       boolean isRenderable() 
      should compare an attribute from the session ( eg 'username'
      with an entry in the record ('record.username') so that if there is a match
      isRenderable is true and the tag is rendered, no match = false and the
      tag is not rendered.

      Can anybody help me with this :
      Is this a good approach ?
      How would I have to do this ? Better ?

      The alternative seems to be to conditionally influence the row style. I have googled for many days , from many different angles - I was surprised not to find anything that suggests how to get control at ROW LEVEL.

      Now I am stuck and I can't see how to advance this project.
      Thanks for your help.