[JAVASERVERFACES_SPEC_PUBLIC-816] ViewHandler.initView() called too late Created: 28/May/10  Updated: 12/Aug/14

Status: Open
Project: javaserverfaces-spec-public
Component/s: Lifecycle
Affects Version/s: 2.0
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: michael_kurz Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issuezilla Id: 816
Status Whiteboard:

size_medium importance_medium


 Description   

In my examples I have a phase listener that outputs all request parameters . I
accidentially did this before restore view and got some strange behaviour. With
MyFaces 2.0, reading the request parameters before the restore view phase kills
german umlauts. This happens because the character encoding is calculated and
set in the request at the beginning of restore view but after the before phase
listeners are executed.

As this is not happening with Mojarra, I set a breakpoint in
ServletRequest.setCharacterEncoding and saw that they are setting this somewhere
at the beginning of the lifecycle.

The spec says the following about this problem:

*) Spec section 2.2.1: "The JSF implementation must perform the following tasks
during the Restore View phase of the request processing lifecycle: Call
initView() on the ViewHandler. This will set the character encoding properly for
this request. ....."

*) Spec section 7.5.1: "The initView() method must be called as the first method
in the implementation of the Restore View Phase of the request processing
lifecycle, immediately after checking for the existence of the FacesContext
parameter...."

In my understanding, the phase listeners belong to the lifecycle and not to the
phases. This would mean that according to the spec ViewHandler.initView() should
be called AFTER the invocation of the before phase listeners, which is too late.



 Comments   
Comment by Ed Burns [ 22/Jun/10 ]

sheetalv

Comment by rogerk [ 27/Oct/10 ]

triage

Comment by Ed Burns [ 06/Jun/11 ]

Bulk assign all of Sheetal's spec issues to me.

Comment by Ed Burns [ 01/Aug/14 ]

Set priority to baseline ahead of JSF 2.3 triage. Priorities will be assigned accurately after this exercise.

Generated at Tue Feb 28 13:02:34 UTC 2017 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.