• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get Values out of dynamic created panel  RSS feed

Andy Egli
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I've created a dynamic panelGrid in my BackingBean and added some SelectOneMenues(The amount of the menues is not fix).

Now the page is displayed well, but I'havent found the right approach to identify and catch the selected values.


<ice:form styleClass="defineCharacteristic" >
<ice:panelGrid binding="#{characterBean.panel}"/>

The following Method builds my panel. Each Characterisitc Obj(current) feeds me with a labelname and values which are filled into the selectOneMenu

public HtmlPanelGrid createSelectPanel(HtmlPanelGrid panelGrid){
List characteristics=facade.getProductCharacteristics();
Iterator it=characteristics.iterator();
Characteristic current=(Characteristic)it.next();
HtmlOutputLabel label=new HtmlOutputLabel();
HtmlSelectOneMenu menu= new HtmlSelectOneMenu();
UISelectItems items = new UISelectItems();
List value=current.getValues();
List selectedItems= new ArrayList();
for(int i=0; i<value.size();i++){
selectedItems.add(new SelectItem((String)value.get(i),(String)value.get(i),""));
return panelGrid;

When I submit the form, the setPanel() Method is called and there is my Problem, how do I catch now the components and get the values out of it:

public void setPanel(HtmlPanelGrid _panelGrid){

//**How do I get here my selected values**//


Regards Andy
Sushma Sharma
Ranch Hand
Posts: 139
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
to get the selected values, I think you would need to iterate through the RequestParameterMap. and since you are generating the ids of the selectOneMenu, you can use the ids here.
Something like this:

I hope this is what you asked for..

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!