3 Replies Latest reply on Mar 18, 2009 2:40 AM by kumarhanu

    Value of Radio button not populated. Radio Button is used in

      The radio button's value is not getting populated properly when creating components dynamically (in a managed bean). Value is populated like #{index}. Its not evaluated.

      See below:

      ......
      ......
      table.setRowKeyVar("index");
      ......
      ......
      selectItem.setItemValue("#{index}");
      radio.getChildren().add(selectItem);
      column.getChildren().add(radio);
      table.getChildren().add(column);

      -------------------------------------------------------------------------------------------

      But when mentioned in the JSF page value gets populated properly. See below:

      <rich:dataTable value="#bean.DataArray}" rendered ="true"
      var="eachRow" rowKeyVar="index" id="id1">
      <h:column>
      <h:selectOneRadio id="myRadio" valueChangeListener="#{bean.delete}">
      <f:selectItem itemValue="#{index}" />
      </h:selectOneRadio>
      </h:column>

      -----------------------------------------------------------------------------------------

      Anybody have idea why the radio button value is not properly populated when it is created dynamically but its working when we mentioned in JSF?