aspose file tools*
The moose likes JSF and the fly likes How to get  Values out of dynamic created panel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "How to get  Values out of dynamic created panel" Watch "How to get  Values out of dynamic created panel" New topic
Author

How to get Values out of dynamic created panel

Andy Egli
Greenhorn

Joined: Nov 21, 2006
Posts: 3
Hi all




public class VehicleCharacteristicBean {


private HtmlPanelGrid panelGrid;

public void init(){
panelGrid=new HtmlPanelGrid();
panelGrid.setColumns(2);
createSelectPanel();
}

public VehicleCharacteristicBean(){
init();
}

public HtmlPanelGrid getPanel(){

return panelGrid;
}

public void setPanel(HtmlPanelGrid _panelGrid){
this.panelGrid=_panelGrid;

}

public void change(ActionEvent event) {
UIComponent comp = event.getComponent();
}

public void createSelectPanel(){

ProductFacade facade= new ProductFacadeImpl();
List characteristics=facade.getProductInstanceData(1);

Iterator it=characteristics.iterator();

while(it.hasNext()){

Characteristic current=(Characteristic)it.next();
HtmlOutputLabel label=new HtmlOutputLabel();
label.setValue(current.getLabel());
HtmlSelectOneMenu menu= new HtmlSelectOneMenu();
menu.setId(current.getLabel());

UISelectItems items = new UISelectItems();
List value=current.getValues();

List s= new ArrayList();
s.add(new SelectItem("","",""));
for(int i=0; i<value.size();i++){
s.add(new SelectItem((String)value.get(i),(String)value.get(i),""));
}

items.setValue(s);
menu.getChildren().add(items);
panelGrid.getChildren().add(label);
panelGrid.getChildren().add(menu);
}


}
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get Values out of dynamic created panel
 
Similar Threads
Listener not invoked with a built HtmlSelectOneMenu component
populate selectOneMenu with list containing various type of object
How to get Values out of dynamic created panel
Dynamic HtmlSelectOneMenu : How to set the selected value in dropdown?
Binding, dynamic UIComponent treegeneration and display problem