0 Replies Latest reply on Aug 8, 2012 6:08 AM by Amasoni

    RE:Reference a component in a form from a datatable outside <h:form>

      I'd like to refer to the component id=contractIdInputText in the form below from a datatable <f:ajax > tag in a commandlink. I want to use its' id in the render attribute instead of @all. I used @all below only because i was not able to refer to the id. The datatable is outside and above the <h:form> tags.

      <h:form id="contracts">
      <h:outputScript library="js" name="common.js" target="head"/>
      <h:panelGrid columns="3"

      <h:outputLabel for="contractIdInputText" rendered="true" value="Contract Nooo.: " />
      <h:inputText id="contractIdInputText" required="true" value="#{contractManager.newContractId}" />

      This is the datatable's commandlink:

      <h:commandLink id="editLink" value="#{bundle.ListUnitEditLink}"
      <f:ajax onevent="disablePK"
      render="@all" />

      The whole purpose of the ajax in the link is to disable the form component when i click the commandlink and populate the form. I've also noticed that much as using the @all does what i want (populate the form with the inputText disabled), it results in me needing to click the commandlink twice on an commandlink in he datatable for the form to be populated with another item. why is this happening?

      Thnx so much!