0 Replies Latest reply on Jul 24, 2012 8:50 AM by gonzalad

    UIInputContainer and doesn't set label attribute for inputs

    gonzalad Apprentice

      Hello,

       

      I'm using UIInputContainer for input fields.

       

      When I submit a form with missing required input values, I get the following message :

       

       

      editCharge:nom:input: Validation Error: Value is required.
      

       

       

      editCharge:nom:input is showed because I didn't set the label attribute of my JSF component.

       

      I have :

      <field:edit id="nom" label="#{messages['chargeClientele.nom.label']}">
        <h:inputText id="input" value="#{editerChargeClienteleAction.instance.nom}" required="true" />
      </field:edit>
      

       

      This is resolved if I explicitly set explicitly the label attribute as :

      <field:edit id="nom" label="#{messages['chargeClientele.nom.label']}">
        <h:inputText id="input" value="#{editerChargeClienteleAction.instance.nom}" 
          label="#{messages['chargeClientele.nom.label']}" required="true" />
      </field:edit>
      

       

      But I'm repeating the label here (it defeats a bit UIInputContainer purpose).

       

      UIInputContainer could be improved to set the label attributes for any input component (when label attribute isn't already set).

       

      WDYT ?