My requirement is to get an identifier in which link I have clicked in the 
backing bean. I am able to find a solution for this.

In  XHTML File
-------------------------
<c:forEach items="#{listingSearch.pagesLinks}" var="page">
    <s:link action="#{listingSearch.next()}" 
               value="#{page.globalListingId}">
         <f:param name="linkId" value="#{page.globalListingId}" />
    </s:link>
</c:forEach>

In Backing bean
-----------------------

@RequestParameter
    private String linkId;

public void next() {
    System.out.println("You Clicked on link Id : " + this.linkId);
    return;
}

or

FacesContext facesContext = FacesContext.getCurrentInstance();
HttpServletRequest request = (HttpServletRequest) 
                                   
facesContext.getExternalContext().getRequest();
String linkIdFromCtx = ((String[])request.getParameterMap()
                                  .get("linkId"))[0];
System.out.println("Ctx: You Clicked on link Id : " + linkIdFromCtx);

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4025588#4025588

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025588
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to