Hi,
I am using Richfaces, Facelets and Myfaces in my project. There is a dynamic components creation requirement in my project, So I am doing like
in my page
<h:commandButton value="createcomponents" action="#{bean.create}"/>
<h:panelGrid binding="#{bean.panelGrid}"/>
<h:commandButton value="save" action=#{bean.save}/>
in the java bean i am doing like
public class Bean
{
private HtmlPanelGrid panelGrid;
// getter setters for panelGrid
private Map dataMap = new hashMap();
//getter setters
public String create()
{
HtmlInputText hi = (HtmlInputText) application.createComponent(HtmlInputText.COMPONENT_TYPE);
ValueBinding valueBinding = application.createValueBinding("#{bean.dataMap["+ 1 +"]}");
hi.setValueBinding("value", valueBinding);
panelGrid.getChildren().add(hi);
return null;
}
public String saveValue()
{
//here not able to get that value from the Map
// how to get that value
}
}
so it was working with Myfaces but when I add RichFaces and Facelets I am not able to get that dynamic components value.
If any body have an idea please let me know. Thanks in advance.
Regards
Ashok