p:column rendered attribute does not seem to work with p:dataTable var

后端 未结 3 839
野的像风
野的像风 2020-12-18 10:05

I have written a code like:



        
3条回答
  •  天命终不由人
    2020-12-18 10:55

    You can't conditionally render a whole column on a per-row basis. This makes logically no utter sense. You can only conditionally render it on a per-table basis. The cannot take a condition based on properties of the iterated row. It can only take a condition based on properties of the parent bean.

    If you intend to conditionally hide only the cell of the currently iterated row, then just move the rendered attribute from to or at least a component which wraps the whole content, such as .

    Or if you really intend to conditionally hide a whole column, then move the conditions used in rendered attribute of to the #{userLeaveBean} parent bean.

提交回复
热议问题