3 Replies Latest reply on Jun 8, 2011 2:29 AM by nbelaevski

    How to get client id?

    xmen.lin

      I used jsf faclets 1.2 to custome compoents(jquery datetimepicker).

       

      when input text is not in table, It is ok.

      <form id='aform'>   

           <e:calendar id="stopTime"  value="#{op.editData.schFinishTime}"/>

      </form>

       

      var id = "#" + "#{rich:clientId(id)}";

       

      It is ok to get client id with rich:clientId.   id is 'aform:stopTime'

       

       

      but when input text is in table, It is error.

      <form id='aform'> 

      <rich:dataTable id="editTable" value="#{op.tabModel.data}" var="step">

      <r:column styleClass="center">

                           <f:facet name="header">

                               <h:outputText value="finish time" />

                           </f:facet>

                          <e:calendar id="stopTime"  value="#{step.schFinishTime}"/>

                        </r:column>

      </rich:dataTable>

      </form>

       

      var id = "#" + "#{rich:clientId(id)}";

       

      It is error to get client id with rich:clientId.   id is 'aform:stopTime', but it is 'aform:editTable:0:stopTIme' in DOM.

       

      how to resolve the error?