This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
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 Customer Requirements for Developers this week in the Jobs Discussion 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
 
It's not a secret anymore!