struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paweł Wielgus <poulw...@gmail.com>
Subject Re: Managing code between Action Class and JSP.
Date Fri, 10 Sep 2010 14:11:05 GMT
Hi all,
the question is if You want to show thousands of records on one page
to the user,
if yes, thent You need to put them into request or into form,
if no then in action put as much as You need into request or form.

Best greetings,
Paweł Wielgus.




2010/9/10 Anjib Mulepati <anjibcs@hotmail.com>:
> One more query suppose "resultList" have thousands of records still is it
> (using request object and putting all result in it) as
>
> request.setAttribute("resultObjects", resultList);
>
>  the efficeint way to send result to view?
>
> Any alternative to this?
>
> Thanks
> Anjib
>
>
> On 9/10/2010 9:27 AM, CRANFORD, CHRIS wrote:
>>
>> As others indicated, it's a matter of using the Struts/JSTL tags.
>>
>>   <ul>
>>     <logic:iterate id="aFoo" name="resultObjects">
>>       <li><bean:write name="aFoo" property="propertyName"/></li>
>>     </logic:iterate>
>>   </ul>
>>
>> The biggest difference between Struts1 and what what is posted
>> below for Struts2 is how you pass the data to the JSP in my
>> opinion.
>>
>> In Struts1, you would still do as you had in your original
>> post:
>>
>>   request.setAttribute("resultObjects", resultList);
>>
>> But instead of using the<% ... %>  JSP tags, you would much rather
>> using the JSTL, Bean, Logic, Html tag libraries accordingly.  They
>> will keep your JSP pages clean and much easier to read.
>>
>> HTH,
>> Chris
>>
>>
>>>
>>> -----Original Message-----
>>> From: Anjib [mailto:anjibcs@hotmail.com]
>>> Sent: Thursday, September 09, 2010 6:27 PM
>>> To: Struts Users Mailing List
>>> Subject: Managing code between Action Class and JSP.
>>>
>>>
>>>   Yes I am using Struts1.
>>>
>>> On 9/9/2010 5:10 PM, Greg Lindholm wrote:
>>>
>>>>>
>>>>> <ul>
>>>>>   <s:iterator value="%{resultObjects}" var="aFoo">
>>>>>     <li><s:property value="%{#aFoo.propertyName}" /></li>
>>>>>   </s:iterator>
>>>>> </ul>
>>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message