How do I conditionally render an ?

前端 未结 12 2091
刺人心
刺人心 2020-12-28 16:55

I would like to be able to conditionally omit a footer from a PrimeFaces panel element:


    

        
12条回答
  •  -上瘾入骨i
    2020-12-28 17:27

    I have come across a similar issue with plain JSF. I am not sure how a is rendered, but if it is rendered as a table, you can try this:

    First, declare a CSS-class like this:

    .HideFooter tfoot {
        display: none;
    }
    

    Then set that class conditionally on the panel:

    
    

    The footer is still rendered in the JSF-sense, but it is not displayed and does not take up any space in the page when viewed by the user-agent.

提交回复
热议问题