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
Documentation of VisitHint.EXECUTE_LIFECYCLE is not clear #803
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented private void preVisitChildren(VisitContext visitContext) { // If EXECUTE_LIFECYCLE hint is set, we need to do { FacesContext facesContext = visitContext.getFacesContext(); PhaseId phaseId = facesContext.getCurrentPhaseId(); if (phaseId == PhaseId.APPLY_REQUEST_VALUES) preDecode(facesContext); else if (phaseId == PhaseId.PROCESS_VALIDATIONS) preValidate(facesContext); else if (phaseId == PhaseId.UPDATE_MODEL_VALUES) preUpdate(facesContext); else if (phaseId == PhaseId.RENDER_RESPONSE) preEncode(facesContext); } } I will update the docs for UIData to require this behavior, but because this behavior is not currently |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-803, Documentation of VisitHint.EXECUTE_LIFECYCLE is not clear" |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Looking the documentation there is a hint called VisitHint.EXECUTE_LIFECYCLE
that says the following:
"Hint that indicates that the visit is being performed as part of lifecycle
phase execution and as such phase-specific actions (initialization) may be taken."
I understand why VisitHint.SKIP_TRANSIENT and VisitHint.SKIP_UNRENDERED, but
looking the javadoc I couldn't find when, how or why that hint should be set. At
this time, myfaces just ignore it, but if it is used, there should be some
documentation on UIComponent.visitTree or UIData.visitTree. Maybe I'm wrong
about that, and if myfaces don't use it really there is not problem, but the
point is: Is mojarra really implementing the algorithm that says the javadoc?.
It could be good if someone could check this algorithm against javadoc, because
really it is very suspicious.
ANDY>Martin suggested "EXECUTE_LIFECYCLE" for this concept, and we rolled with that.
ANDY>In the version of Mojarra that I happen to have sitting here (about a month
old), UIData is looking for this hint. However... the PartialViewContext
implementation is not actually setting the hint, so this is not actually being
used at the moment.
After discuss this stuff, it was clear the utility behind
VisitHint.EXECUTE_LIFECYCLE, but if it is used, the documentation of
UIData.visitTree should be more explicit about how and when it is used (Right
now it is not clear from where this hint should be checked and the effect)
Environment
Operating System: All
Platform: All
Affected Versions
[2.0]
The text was updated successfully, but these errors were encountered: