Thanks. This works.



-----Original Message-----
From: Daniel Perry [mailto:[EMAIL PROTECTED] 
Sent: Monday, December 20, 2004 11:42 AM
To: Struts Users Mailing List
Subject: RE: Actionform 's property


Well the way you dont wish to use would be the normal way to do it :)

The form will be available in the request or session (depending on where
you put the form) scope from the jsp under the form's name.  So
${formName.employeeList} is the list from a JSTL perspective.  From
scriptlet, either:

=((full.package.name.MyForm)request.getAttribute("formName")).getElmploy
eeLi
st();
or
=((full.package.name.MyForm)session.getAttribute("formName")).getElmploy
eeLi
st();

Daniel.

> -----Original Message-----
> From: Zhang, Larry (L.) [mailto:[EMAIL PROTECTED]
> Sent: 20 December 2004 15:58
> To: Struts Users Mailing List
> Subject: Actionform 's property
>
>
> Say I have an action form
>
> MyForm extends ActionForm {
>  List employeeList;
>  //set/getter follows...
> }
>
> Suppose in my action class's execute method,
> I populated employeeList from database, and do 
> myForm.setEmployeeList(List someData);
>
> Now in my Jsp, how to get this value and assign this value to a java 
> script variable?
>
> Such as:
>
> In my jsp:
>
> <% List iWantToGetThisList = ??? %>
>
> I know one way is that in the action's execute method, I put the 
> employeeList in the request using request.setAttribute("employeeList",
> employeeList); but I don't want to do this way...
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to