hi,
here goes the piece of code
 
<logic:iterate name="userBean" scope="session" id="userbean">
    <nested:write property="userID"/>
    <nested:write property="lastName"/>
    <nested:write property="firstName"/>
    <nested:iterate property="roleUser" id="roleuser">
        <nested:write property="roleid"/>
        <nested:write property="desc"/>
        <nested:write property="name"/>
        <nested:iterate property="menuComponent" id="menucomp">
            <nested:write property="menuID"/>
            <nested:write property="menuName"/>
            <nested:write property="description"/>
        </nested:iterate>
    </nested:iterate>
</logic:iterate>
 
hoep this helps
 
-- nagi
 
 
-------Original Message-------
 
Date: Tuesday, July 22, 2003 09:45:44 AM
Subject: Nested Bean Problem
 
Hi,

I have a problem handling nested beans..
For example...
I have a userBean as given below
private int userID;
private String lastName;
private String firstName;
private ArrayList roleUser;
Where the last field Arraylist is the arraylist of the objects of the bean
called roleUserBean.

Again the roleUserBean has the following properties.
private int roleid;
private String desc;
private String name;
private ArrayList menuComponent;
The last property menuComponent is the arrayList of objects of the bean
called menuComponentBean.

Now the menuComponentBean contains
private int menuID;
private String menuName;
private String description;


I have put the userBean in the session scope. But I don't know how can I
drill down from the userBean to one of the menuName. I want to display the
menu dynamically getting the menu items from the userBean.
How can I use the <logic:iterate> tag to get all the menuNames from the
userBean? Or is there any other efficient way in which I can get the
menuNames to be displayed in my JSP(view) part.

Thanks in advance.
Prashant M Desai.


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


.
____________________________________________________
  IncrediMail - Email has finally evolved - Click Here

Reply via email to