Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

javax.faces.validator.ValueExpressionAnalyzer does not delegate method invokation if bean has a parameter like bean1.getAttribut(someParameter).someOther #4100

Open
javaserverfaces opened this issue Jan 28, 2016 · 6 comments

Comments

@javaserverfaces
Copy link
Collaborator

javax.faces.validator.ValueExpressionAnalyzer does not delegate method invokation if bean has a parameter like bean1.getAttribut(someParameter).someOther

Patch ist to add an invocation delegate to ValueExpressionAnalyzer

public Object invoke(ELContext context, Object base, Object method, Class<?>[] paramTypes, Object[] params)
{
	return delegate.invoke(context, base, method, paramTypes, params);
}

Affected Versions

[2.2.12]

@javaserverfaces
Copy link
Collaborator Author

Reported by Meinolf

@javaserverfaces
Copy link
Collaborator Author

Issue-Links:
is related to
JAVASERVERFACES-4159

@javaserverfaces
Copy link
Collaborator Author

meinolf said:
In older and newer 2.3.x Versions this seems not to work either.

It is used on bean validation. No error or warning occurs, it silently just doesn't validate.

@javaserverfaces
Copy link
Collaborator Author

@arjantijms said:
Actually, shouldn't the private javax.faces.validator.ValueExpressionAnalyzer be replaced by using ValueExpression#getValueReference?

Although this is currently blocked because ValueReference can't be obtained from a TagValueExpression in JSF 2.x (since it doesn't implement getValueReference and its super class just returns null).

In fact, javax.faces.validator.BeanValidator already mentions this in comments:

// PENDING(rlubke, driscoll): When EL 1.3 is present, we won't need
// this.

ValueExpressionAnalyzer expressionAnalyzer =
new ValueExpressionAnalyzer(valueExpression);

@javaserverfaces
Copy link
Collaborator Author

This issue was imported from java.net JIRA JAVASERVERFACES-4096

@edburns
Copy link
Member

edburns commented Oct 29, 2017

Please see this important message regarding community contributions to
Mojarra.

https://javaee.groups.io/g/jsf-spec/message/30

Also, please consider joining that group, as that group has taken the
place of the old [email protected] mailing list.

Thanks,

Ed Burns

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants