Chetan Pandey wrote:
>
> Hi All:
>
> I have a Vector called attendeeVector which I set in request scope in 
> my Struts Action class using the following line:
>
> request.setAttribute("attendeeVector", vec );
>
> When the control is forwarded to the JSP Page the following works 
> perfectly:
>
> <display:table name="attendeeVector" id="row" style="text-align: left" 
> class="dis" pagesize="50" requestURI="/prepopulateInviteList.do" >
>
> <bean:define id="userID" name="row" property="userId" 
> type="java.lang.String"/>
>
> .
>
> .
>
> .
>
> .
>
> </display>
>
> However, if I change in my Struts Action Class to the following:
>
> request.getSession().setAttribute("attendeeVector", vec );
>
> <display:table> stops working and gives an error that it could not 
> find the variable “row” in any scope.
>
> “row” as can be seen from the display-tag holds a reference to the 
> current object being iterated over.
>
> Is this a known Issue with displaytag having issues with Objects in 
> Session or is it just me.
>
>

You've been spoilt by other taglibs that hunt around for your object. In 
displaytag you have to tell it explicitly where you've put it. By 
default it looks in requestScope which is why your first try worked. If 
you put the name="sessionScope.attendeeVector" attribute into the 
<display:table> tag then it should be able to find it.

Ed!

-------------------------------------------------------------------------
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
displaytag-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/displaytag-user

Reply via email to