JSF commandbutton id inside datatable
Posted
by
user236501
on Stack Overflow
See other posts from Stack Overflow
or by user236501
Published on 2011-01-15T13:14:38Z
Indexed on
2011/01/15
19:53 UTC
Read the original article
Hit count: 192
How can I add in commandbutton inside datatable?
<hx:dataTableEx value="#{searchData.searchFriends}" var="s">
<hx:columnEx>
<f:facet name="header">
<h:outputText value="First Name" />
</f:facet>
<hx:requestLink action="#{pc_Search.doAddFriendAction}">
<h:outputText value="Add as Friend" />
<f:param name="friendId" value="#{s.memberId}" />
</hx:requestLink>
</hx:columnEx>
</hx:dataTableEx>
To get the data at backend
String friendId = (String)getRequestParam().get("friendId");
But once I change the requestlink to command button the friedId = null? any idea how can i pass value using command button
© Stack Overflow or respective owner