File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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