2 Replies Latest reply on Apr 26, 2012 4:59 PM by User501417-Oracle

    Not highlighting error fields in subform when displaying FacesMessages

    User501417-Oracle
      Hi,

      I am trying to display FacesMessage on UI and highlight the errored field. It is working as expected if my fields are NOT in subform like this:

      <af:form>
      <af:inputText label="Label 159" id="it5"/>
      <af:commandButton text="commandButton 2" id="cb3"
      action="#{viewScope.backing_testFormLayout.validateRecordset}"/>
      </af:form>

      java codes:

      public String validateRecordset() {
      FacesContext fc = FacesContext.getCurrentInstance();
      fc.addMessage("it5", new FacesMessage(FacesMessage.SEVERITY_ERROR,
      "Parameter Name is required",
      null));

      return null;
      }

      However, if my fields are in subform, the FaceMessage error is displayed, but the errored field ("it5") is not highlighted.

      <af:form>
      <af:subform id="s9">
      <af:inputText label="Label 159" id="it5"/>
      <af:commandButton text="commandButton 2" id="cb3"
      action="#{viewScope.backing_testFormLayout.validateRecordset}"/>
      </af:subform>
      </af:form>


      Any ideas?

      Thanks
      -Mina