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 <p:column rendered>
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 <p:column>
to <p:commandLink>
or at least a component which wraps the whole <p:column>
content, such as <h:panelGroup>
.
Or if you really intend to conditionally hide a whole column, then move the conditions used in rendered
attribute of <p:column>
to the #{userLeaveBean}
parent bean.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…