-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mojarra issue 5171 #5172
Mojarra issue 5171 #5172
Conversation
the ValueExpressionAnalyzer from 3.0
Hi @BalusC @Override
public ValueReference getValueReference(ELContext elContext) {
FacesContext ctx = (FacesContext) elContext.getContext(FacesContext.class);
boolean pushed = pushCompositeComponent(ctx);
try {
return originalVE.getValueReference(elContext);
} finally {
if (pushed) {
popCompositeComponent(ctx);
}
}
} InterceptingResolver in ValueExpressionAnalyzer is not needed anymore, so getReference can be simplified this way: public ValueReference getReference(ELContext elContext) {
ValueReference reference = expression.getValueReference(elContext);
if (reference != null) {
Object base = reference.getBase();
if (base instanceof CompositeComponentExpressionHolder) {
ValueExpression ve = ((CompositeComponentExpressionHolder) base).getExpression(String.valueOf(reference.getProperty()));
if (ve != null) {
expression = ve;
reference = getReference(elContext);
}
}
}
return reference;
} I can make a PR if needed, let me know |
I'll adjust the PR and re-test when time allows me. |
Further improved by adjusting ContextualCompositeValueExpression so we can get rid of the ValueExpressionAnalyzer
Thank you very much, @NicolaIsotta , I've been able to get rid of the ValueExpressionAnalyzer completely with your insightful suggestion! The PR has been updated. |
4.0 branch was split off from master after this PR was created and then master became 4.1 but the PR wasn't updated to retarget 4.0. New PR created for 4.0: #5177 |
#5171