[
https://issues.apache.org/jira/browse/MYFACES-1750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537272
]
Stefan Rinke commented on MYFACES-1750:
---------------------------------------
I've developed a workaround / bugfix for the related class ELParserHelper, see
this diff:
332,333c332,336
< replaceSuffixes(((BinaryOperatorExpression) expression)
< .getExpression());
---
> BinaryOperatorExpression boe = (BinaryOperatorExpression)
> expression;
> replaceSuffixes(boe.getExpression());
> for (Object exp : boe.getExpressions()) {
> replaceSuffixes(exp);
> }
with this bugfix replacesSuffixes is called on all expressions, not just on
expression. As a workaround for the versions 1.1.1 up to 1.1.5 one can
configure a custome ApplicationFactory and a custom Application implementation,
which overrides the "public ValueBinding createValueBinding(String reference)"
methods.
The new implementation then uses instances of an extension of the original
ValueBindingImpl from MyFaces. This new class again overrides constructor,
saveState and restoreState and uses a fixed version of the ELParserHelper class.
with this workaround i've got the 1.1.5 release running.
regards steve
> Evaluation of EL-Expression fails with custom PropertyResolver
> --------------------------------------------------------------
>
> Key: MYFACES-1750
> URL: https://issues.apache.org/jira/browse/MYFACES-1750
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5
> Reporter: Stefan Rinke
> Priority: Critical
>
> When using a custom PropertyResolver in faces-config.xml like this:
> <application>
> <property-resolver>
> org.springframework.web.jsf.MessageSourcePropertyResolver
> </property-resolver>
> </application>
> the evaluation of an expression involving the PropertyResolver fails, when
> the expression appears on the right hand side. E.g. the expression #{
> bundle.test == 'xx' } succeeds, whereas #{ 'xx' == bundle.test } fails. In
> this example the property resolver is responsible for evaluating the 'test'
> property on the object 'bundle'.
> MyFaces has an expression factory which reassembles the expressions generated
> from the commons-el parser. This is done by replacing the so called
> 'suffixes' see org.apache.myfaces.el.ELParserHelper. The bug occurs when
> instances of BinaryOperatorExpression are handled, because myfaces only
> replaces the suffix of the first operand. This is why the first example works
> and the second fails.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.