3 Replies Latest reply on May 4, 2010 6:33 AM by Nick Belaevski

    Dynamic Validations on HtmlInputText

    Kapil Nimje Newbie

      Hi,

              I am new for JSF world.  I need to validate the Numeric Data on my Dynamically generated HtmlInputText.. Here are my code

       

                     HtmlInputText textAreaMaxCharLimitText = new HtmlInputText();
                      textAreaMaxCharLimitText.setAutocomplete("off");
                      textAreaMaxCharLimitText.setId(questionId + "TextAreaLimit");
                      textAreaMaxCharLimitText.getAttributes().put("style","float:right;clear:none;margin-top:10px;width:50px;");
                      String textAreaMaxCharLimitValExpr = "#{projectBean.questions[" + i + "].textAreaMaxChar}";
                      textAreaMaxCharLimitText.setValueExpression("value", application.getExpressionFactory().createValueExpression(context.getELContext(),                     textAreaMaxCharLimitValExpr, String.class));
                      textAreaMaxCharLimitText.setMaxlength(4);

       

       

      How do I set the Dynamic validations on InputText..

       

      Kindly Help me...

       

      Thanks

      Kapil