On 3/29/2012 10:58 AM, Anjib Mulepati wrote:
Hi All,

I am trying to pass COMPLEX bean to the JSP and trying to access their property i JSP with bean tag.

I have a class as follow

Class TransferInfo {
    private Transmission transmission; //My transmission object
    private User user; //My user object
    private List<Files> fileList; //list of my file object

   //Constructor, setter and getter methods
   ..........
}

In above Transmission, User and Files are another classes I have created each with their attributes.

And in Action class I populate this TransferInfo class and send to client in request object by request.setAttribute("transferList", transferList);

Now in JSP I how should I get value of Transmission, User and File object value and print them. Usually for simple class we write <bean:write name="transferList" property="firstName" /> to print the first name. In this case how to get the first name.

Can anyone help me in this?

Thanks,
Anjib



I got the answer for accessing property of first two types. I did <bean:write name="transferList" property="userInfo.firstName" /> Now my problem is on third type since it itself is an List. How can I run iterator or iterator?


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

Reply via email to