[jboss-user] [JBoss Seam] - Pagination problem

vicky123 do-not-reply at jboss.com
Wed Feb 6 14:04:35 EST 2008


Hi All,
I am writing code for pagination, when i try to call a method with a parameter the value of that parameter is always 0 in the bean. But when I hard code the value it takes the hardcoded value.

My Code:-

<h:panelGrid columns="10">
  |     <c:forEach items="#{userManage.pageLinks}" var="link">
  | 	<s:link action="#{userManage.loadSelectedPage(link)}" value="#{link}">
  |         </s:link>
  |     </c:forEach>
  | </h:panelGrid>
  | 

pageLinks is a collection of Integer.

When I hard code the value:-

<h:panelGrid columns="10">
  |     <c:forEach items="#{userManage.pageLinks}" var="link">
  | 	<s:link action="#{userManage.loadSelectedPage('1')}" value="#{link}">
  |         </s:link>
  |     </c:forEach>
  | </h:panelGrid>
  | 

Session bean-
	public void loadSelectedPage(int requestedPage) {
  | 		this.requestedPage = requestedPage;
  | 		log.info("Requested page number = " + this.requestedPage); // always gives 0
  | 		fetchUsersDetails();
  | 	}
  | 

Am I doing something wrong in here?

Thanks in advance.

-Vivek

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

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127143



More information about the jboss-user mailing list