Issue Details (XML | Word | Printable)

Key: JAVASERVERFACES_SPEC_PUBLIC-803
Type: Bug Bug
Status: Open Open
Priority: Critical Critical
Assignee: Unassigned
Reporter: lu4242
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
javaserverfaces-spec-public

Documentation of VisitHint.EXECUTE_LIFECYCLE is not clear

Created: 18/May/10 10:32 PM   Updated: 19/Dec/13 10:53 PM
Component/s: Documentation: Javadoc, TLDDoc, RenderkitDoc, PDF
Affects Version/s: 2.0
Fix Version/s: 2.3

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All


Issuezilla Id: 803
Status Whiteboard:

size_small importance_small

Tags:
Participants: Ed Burns, lu4242 and rogerk


 Description  « Hide

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)



Ed Burns added a comment - 19/May/10 07:03 AM

move to p2


Ed Burns added a comment - 24/May/10 12:55 PM

take ownership.


Ed Burns added a comment - 24/May/10 04:28 PM

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.


Ed Burns added a comment - 08/Jun/10 01:09 PM

triage


Ed Burns added a comment - 24/Jun/10 01:32 PM

Change target milestone.


rogerk added a comment - 27/Oct/10 02:22 PM

triage