it's been a while since I have done any JSF development, but hoping to get back into a little bit. I have run into a small issue, and was wondering if someone could provide a bit of advice. I have a datatable that displays users. in one of the columns, I want to conditionally display (using the rendered attribute) a command link. I have a utility method in a backing bean that I want to use to perform the logic of whether or not to display the link. but I can't seem to figure out how to send a parameter to the backing bean. I tried the following but I seem to get a jsf syntax exception ( javax.el.ELException: Error Parsing: #{manageUsers.showResetLink(user.status)}).
is there a way to even do this? if so, could someone provide some assistance?
xhtml page
Code: Select all
<p:dataTable id="users" var="user" value="#{manageUsers.users}" >
....
<p:column headerText="Actions">
<h:outputText value=" " />
<p:commandLink update="resetPasswordPanel" process="@this"
value="RESET" rendered="#{manageUsers.showResetLink(user)}" >
</p:commandLink>
</p:column>
</p:dataTable>
Code: Select all
.......
public boolean isShowResetLink(String status) {
boolean flag = false;
if (status.equals()) { ... // do some logic }
return flag;
}
....
regards, Jim Pollock