[
https://issues.apache.org/jira/browse/MYFACES-2734?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12872895#action_12872895
]
Michael Kurz commented on MYFACES-2734:
---------------------------------------
Leonardo's suggestion seems to be a good idea.
Nevertheless, I think that this is a spec issue, as Jakob also pointed out. As
I consider phase listeners as belonging to the lifecycle and not the phases
themselves, the beginning of the phase (as mentioned in the spec) is after the
invocation of the before phase listeners.
I submitted this spec issue:
https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=816
> Character encoding not set correctly before Restore View
> --------------------------------------------------------
>
> Key: MYFACES-2734
> URL: https://issues.apache.org/jira/browse/MYFACES-2734
> Project: MyFaces Core
> Issue Type: Bug
> Components: JSR-314
> Affects Versions: 2.0.1-SNAPSHOT
> Reporter: Michael Kurz
> Attachments: MYFACES-2734-test-app.zip, MYFACES-2734.patch
>
>
> 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.
> I quickly checked the spec but the only thing I found regarding the character
> encoding was at the beginning of restore view (which is done correctly in
> MyFaces). But I wonder if it should not be set earlier as, like in my case,
> an earlier access to the request parameters kills umlauts. This might also be
> necessary for extensions doing something with request parameters in a before
> restore view listener.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.