[ 
https://issues.apache.org/jira/browse/MFCOMMONS-26?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Leonardo Uribe resolved MFCOMMONS-26.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.1-SNAPSHOT
         Assignee: Leonardo Uribe

Added patternExpression property. 

> validateRegExpr doesnt support value binding in patter property
> ---------------------------------------------------------------
>
>                 Key: MFCOMMONS-26
>                 URL: https://issues.apache.org/jira/browse/MFCOMMONS-26
>             Project: MyFaces Commons
>          Issue Type: Bug
>          Components: myfaces-commons-validators
>            Reporter: Tomasz Bech
>            Assignee: Leonardo Uribe
>            Priority: Critical
>             Fix For: 1.0.1-SNAPSHOT
>
>
> As from version 1.1.7 validateRegExpr tag desn't support value binding in 
> pattern field.
> ValidateRegExprTag.java
> Version 1.1.6 has:
>       protected Validator createValidator() throws JspException {
>               FacesContext facesContext = FacesContext.getCurrentInstance();
>               setValidatorId(RegExprValidator.VALIDATOR_ID);
>               RegExprValidator validator = 
> (RegExprValidator)super.createValidator();
>         if (_pattern != null)
>         {
>             if (UIComponentTag.isValueReference(_pattern))
>             {
>                 ValueBinding vb = 
> facesContext.getApplication().createValueBinding(_pattern);
>                 validator.setPattern(new 
> String(vb.getValue(facesContext).toString()));
>             }
>             else
>             {
>                 validator.setPattern(_pattern);
>             }
>         }
>               return validator;
>       }
> Version 1.1.7 has:
>     protected Validator createValidator() throws JspException {
>     
>         FacesContext facesContext = FacesContext.getCurrentInstance();
>         setValidatorId("org.apache.myfaces.validator.RegExpr");    
>         org.apache.myfaces.custom.regexprvalidator.RegExprValidator validator 
> = 
> (org.apache.myfaces.custom.regexprvalidator.RegExprValidator)super.createValidator();
>         if (_pattern != null)
>         {
>                 validator.setPattern(_pattern);
>         }
>         return validator;
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to