Skip to content
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

Closed
eclipse-faces-bot opened this issue May 18, 2010 · 14 comments
Closed

Documentation of VisitHint.EXECUTE_LIFECYCLE is not clear #803

eclipse-faces-bot opened this issue May 18, 2010 · 14 comments

Comments

@eclipse-faces-bot
Copy link

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]

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Reported by lu4242

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
move to p2

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
take ownership.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Mojarra UIData has this method

private void preVisitChildren(VisitContext visitContext) {

// If EXECUTE_LIFECYCLE hint is set, we need to do
// lifecycle-related initialization before visiting children
if (visitContext.getHints().contains(VisitHint.EXECUTE_LIFECYCLE))

{ 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
specified, I cannot include it in 2.0 Rev a. Therefore, I will move it to 2.1.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
triage

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Change target milestone.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
rogerk said:
triage

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@edburns said:
Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Set priority to Critical

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
File: changebundle.txt
Attached By: @manfredriem

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
@manfredriem said:
Applied to 2.3 trunk,

svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-803, Documentation of VisitHint.EXECUTE_LIFECYCLE is not clear"
Sending jsf-api/src/main/java/javax/faces/component/visit/VisitHint.java
Transmitting file data .
Committed revision 15132.

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
Marked as fixed on Tuesday, September 8th 2015, 8:48:32 am

@eclipse-faces-bot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAVASERVERFACES_SPEC_PUBLIC-803

@eclipse-faces-bot
Copy link
Author

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

No branches or pull requests

1 participant