Hello Everyone,

Here I got a question regarding to the <s:doubleselect> tag. 

Here is the scenario. I would like to display a complex hierarchy of
objects by using struts2 tags. Basically, I got 5 tables in the DB. All
linked with each other by Foreign Keys. So the models generated from the
tables are all linked with each other in a tree hierarchy. So when you
refer to the section object in the JSP page, you can get others through
links. The 5 data models contains following properties;

Section:
        private Integer sectionId;
        private String name;
        private Set parameters = new HashSet(0);Parameter, contains: int
paramId

Parameter:
        private Integer paramId;
        private Section section;
        private Menu menu;
        private String type;
        private String label;

Menu:
        private Integer menuId;
        private String name;
        private Set menuoptions = new HashSet(0);
        private Set parameters = new HashSet(0);
Menuoption:
        private Integer optionId;
        private Menu menu;
        private String value;
        private String score;
        private Byte tertiary;
        private Set tertiaryoptions = new HashSet(0);

TertiaryOption:
        private Integer tertiaryId;
        private Menuoption menuoption;
        private String name;

The idea is the page contains several sections, each sections contains
several parameters, each parameter can be just a string or a menu, if it
is menu, there will be options in the menu, and if this menu contains
tertiary menu, then the tertiary menu would shown based on the selection
of the menu. 

So I would like to display this hierarchy in the JSP page by using
truts2 tags. I use <s:iterator> to go through a List of sections. Then
go through the Set of parameters with iterator tag again. Then display
the options linked to this parameters. In case of tertiary options
exist, i need a doubleselect tag. But I cant get the second select box
to show it's contents. 

I believe I know the reason is because the doublelist cant find a list
or map to show. But I don't know how to deal with such situations where
the list contains a list of objects, which contents a Collection to be
shown as the doublelist. I am still new to struts2. Could anyone please
tell me how to do this?

Many thanks,
Jipu 

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

Reply via email to