Conditional rendering of non-JSF components (plain vanilla HTML and template text)

前端 未结 1 835
南旧
南旧 2020-11-30 11:27

I\'m trying to conditionally render a therefore I cannot use as it will render to or

1条回答
  •  醉梦人生
    2020-11-30 11:58

    I cannot use as it will render to or

    Apparently you didn't test it carefully. The won't render anything if you don't specify attributes which should end up in the client side, like layout, id, styleClass, etc.

    Thus, this should technically perfectly work fine.

    
         my tr stuff 
    
    

    However, better for the main purpose would be to use .

    
         my tr stuff 
    
    

    This is by the way also possible with , but this is deprecated since JSF 2.0 as it's designed specifically for usage in JSP.

    See also:

    • Alternative to ui:fragment in JSF
    • Conditionally displaying JSF components
    • How to find out client ID of component for ajax update/render? Cannot find component with expression "foo" referenced from "bar"
    • Ajax update/render does not work on a component which has rendered attribute

    0 讨论(0)
提交回复
热议问题