4 Replies Latest reply on Jul 1, 2007 4:45 AM by inv3r53 d

    prob : dynamically rendering components in rich:datatable

    inv3r53 d Novice

      i have the following code for a column in rich:datatable

       <a4j:outputPanel id="colGrp">
       <h:selectBooleanCheckbox value = "#{myBean.ticked}">
       <a4j:support event="onclick" reRender="colGrp" switchType="client"/>
       <h:inputText style="width:50px" value="#{myBean.text}" rendered="#{myBean.mean}">
       <f:validateLongRange minimum="1" />
       <f:attribute name="fieldRef" value="No. Of Samples for Mean"/>

      here in a column i have a chkbox , which when selected dynamically renders a text field.
      every thg in the table is rendered fine and works well except under the following condition:

      say the user enters invalid value in text field validation/conversion error occurs ,then if the check boxes state is changed the ajax thg doesnt seem to work.

      also one more ques is:
      am running a phase listner to render proper field ref. in error messages
      in which this line fails:
      UIComponent component = root.findComponent(clientId);

      client id is the id of that dynamically renderd text field, and on inspecting it has the right client id, but it isnt found in root.

      any help , much appreciated