This was indeed just an example. I doubt that this Session based approach is
suitable when using WebWork. Anyway...

I set an attribute called 'paginationValue' into the Session in the
Controller (Java) with:
request.getSession().setAttribute("paginationValue", 200);

After this I can reference the session attribute with
${sessionScope.paginationValue}. 

In your table code:
<display:table name="studyList" id="studyList"
pagesize="${sessionScope.paginationValue}">

Also in the beginning of the JSP file, I include the taglib for JSTL:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core"; prefix="c" %>

I encourage yout to read about JSTL:
http://www-128.ibm.com/developerworks/java/library/j-jstl0211.html

Try to access your original webwork properties with different JSTL scopes:
${pageScope.nameOfYourProperty}, ${requestScope.nameOfYourProperty} etc.

Can someone who's familiar with WebWork and JSTL offer some more assistance?

-Kurt



vacant_eyes wrote:
> 
> Hello, where do I will get the value of ${sessionScope.paginationValue}? 
> Is it in my java code or only in my jsp page? Im just a newbie... Can 
> you pls give me a sample code.
> 
> Thank you so much...
> 
> 
> Kurt Martinsen wrote:
>> Hello.
>>
>> I have successfully used JSTL and JSP.
>>
>> JSTL: pagesize="${sessionScope.paginationValue}"
>> JSP: pagesize="<%=paginationValue%>"
>>
>> In reference to your previous WebWork related posts, I'm not too familiar
>> with it, but according to the docs
>> (http://www.opensymphony.com/webwork/wikidocs/JSTL.html) the JSTL tags
>> should work.
>>
>> Regards,
>> Kurt
>>
>>
>> Subject: [displaytag-user] Put another kind of tag inside the Display
>>      Tag
>> To: [email protected]
>> Cc: Richard Reyes <[EMAIL PROTECTED]>
>> Message-ID: <[EMAIL PROTECTED]>
>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>>
>> hello everyone. Can I put another kind of tag inside the display tag 
>> such as JSTL or Webwork tag?
>>
>> <display:table name="studyList" cellspacing="0" cellpadding="0" 
>> requestURI="" style="width:100%"
>>         id="studyList" pagesize="<ANOTHER KIND OF TAG />" class="table" 
>> export="false" decorator="genericDecorator">
>>
>> Thanks to all.
>>
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>> your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> displaytag-user mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/displaytag-user
>>
>>   
> 
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> displaytag-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/displaytag-user
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Displaytag-variable-pagesize-question-tf3465409.html#a9694081
Sent from the DisplayTag - General mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
displaytag-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to