views:

24

answers:

2

I have created one drop down for pasize selection.

<s:select name="pageSize" cssClass="drop"
  list="#actResultLimitValue.lstEntities" listKey="code"
  listValue="value" onchange="document.forms[0].submit()">

And pageSize attribute is there in Actionclass. I used this variable in display tag. Nothing happend. i am getting error.

<display:table id="data" name="lstEntities"  sort="list"  uid="row" class="main"
  pagesize="<%pageSize%>" export="true"
  requestURI="findPrtyByPrty.action">

How to achieve this?

A: 

Eh... I did just have this as a comment, but I'm pretty confident after staring at it for a while that it's the correct answer... so I'll put a real answer.

It looks like you're trying to get the pageSize from your scripting language... if it's jsp try

pagesize="<%=pageSize%>" 

Though you say it's in the action class so... if you're trying to get it from struts2 try

pagesize="<s:property value="pageSize"/>"
Shaded
A: 

Worked well for below code,

<s:set name="selectedPageSize" value="pageSize" scope="request"/>
<display:table id="data" name="lstEntities"  sort="list"  uid="row" class="main"
        pagesize="${selectedPageSize}"  export="false"
        requestURI="findPrtyByPrty.action">
Jothi