tags:

views:

369

answers:

2

hi i am try to implement pagination through display tag in strut2 now my requirement is i have a combo box which has some page size value like 5, 10, 15 .. so how can i update that value in page size of display tag in strut2

thank in advance regards lakhaman odedra

A: 

I'm not sure about struts2 in particular, but with JSF in general, if you bind whatever component you use to paginate into your backing bean, you can set properties such as that through an action.

Zack
+1  A: 

You would create an exposed property on your action, named for example selectedPageSize. This property could be set to a default size (in your example 5). You would keep a hidden form field storing the currently selected value. This would then be used in your view with the display tag similar to:

<c:set name="selectedPageSize" value="selectedPageSize" scope="request"/>
<display:table pagesize="${selectedPageSize}" ... >
Rich Kroll
but how can we set this expose property from hidden field . can you please guide me some statementand how we create expose property in action class
lakhaman
thanks rich kroll for your help
lakhaman