You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Tomasz Bech (JIRA)" <de...@myfaces.apache.org> on 2008/12/03 17:17:44 UTC
[jira] Created: (TOMAHAWK-1377) validateRegExpr doesnt support
value binding in patter property
validateRegExpr doesnt support value binding in patter property
---------------------------------------------------------------
Key: TOMAHAWK-1377
URL: https://issues.apache.org/jira/browse/TOMAHAWK-1377
Project: MyFaces Tomahawk
Issue Type: Bug
Components: Validators
Affects Versions: 1.1.7
Reporter: Tomasz Bech
Priority: Critical
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.
[jira] Commented: (TOMAHAWK-1377) validateRegExpr doesnt support
value binding in patter property
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/TOMAHAWK-1377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12672385#action_12672385 ]
Leonardo Uribe commented on TOMAHAWK-1377:
------------------------------------------
rev 668968, fields that read regular expressions like pattern should be literalOnly, in other words does not read ValueExpressions, because some regular expressions are not readed correctly if ValueExpression is activated.
> validateRegExpr doesnt support value binding in patter property
> ---------------------------------------------------------------
>
> Key: TOMAHAWK-1377
> URL: https://issues.apache.org/jira/browse/TOMAHAWK-1377
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Validators
> Affects Versions: 1.1.7
> Reporter: Tomasz Bech
> Priority: Critical
>
> 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.