0 Replies Latest reply on Feb 14, 2008 10:23 AM by Ashok Pendela

    not able to get values of dynamic components ?

    Ashok Pendela Newbie


      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);


      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.