OK.
Moved the org.apache.myfaces.webapp.filter.*WelcomeFileFilter* after the
*Extensions Filter* in the /*web.xml*/ and the *PhaseListener *approach to
*addResource *seems to be working. More testing to follow and I will report
any issues.
That was a lot of investigation due to Filter Order/etc.
Gentlemen,
After all this (/My initial attempt at doing this was using a phaselistener
after all/), I now see */WHEN /*the phaselistener solution is not working.
The question now is */why/*?
When I use the URL: http://localhost:8080//index.jsf -* IT WORKS*
When I use the URL: http://localhost:8
You've probably already figured it out, but for anyone reading this
thread later, what Leonardo said explains it.
Component encodeEnd is called during the time that the response is
rendered (between before and after phase listeners). "After" is too
late.
On Tue, Apr 19, 2016 at 2:41 PM, fischma
Mike, Thanks...yeah were all good with the understanding of the Lifecycle...
I'm just curious why the addResource call *WORKS* in an /encodeEnd /of a
Custom Component, which is fired in the */Render Response/* phase,
but...
*DOES NOT WORK* when the addResource is called directly from a PhaseLis
Hi
Add the resource in afterPhase(...) is too late in the lifecycle, because
if the response was flushed the script could not be rendered. Add it in
beforePhase(...) of render response should work.
Just FYI, ExtensionsFilter class is the one responsible to create the
buffer and then parse the re
I guess it probably doesn't help -- it looks like your phase listener
was already using RENDER_RESPONSE.
On Tue, Apr 19, 2016 at 3:13 PM, Mike Kienenberger wrote:
> There is only a RENDER_RESPONSE phase for the initial request in a
> phase listener, but all of the phases in a postback.
>
> Does t
There is only a RENDER_RESPONSE phase for the initial request in a
phase listener, but all of the phases in a postback.
Does that help?
On Tue, Apr 19, 2016 at 2:09 PM, fischman_98
wrote:
> *FYI*: When added the call to addResource in encodeEnd method of a Custom
> Component it works on both /*
*FYI*: When added the call to addResource in encodeEnd method of a Custom
Component it works on both /*initial request*/ and /*postback */.
Here's the initial request;
RESTORE_VIEW(1) :: Before
RESTORE_VIEW(1) :: After
RENDER_RESPONSE(6) :: Before
*AddResource Here!*
RENDER_RESPONSE(6) :: After
I created this simple test phaseListener before my original post and it only
works an a postback, not an initial request. /Put the code in both phases
just in case./ *No Luck*.
package com.ngsimages.cart.phaselistener;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
impo
Hi
AddResource API in its default implementation use a buffer to render
resources, but on render response phase, so you should aim to add your
resources in that phase. A custom phase listener or a custom component
using the code in encodeXXX should work.
Regards,
Leonardo
On Apr 19, 2016 8:05 AM
So are you confirming/agreeing that the result of an addResource call is
handled in the Apply Request phase?
And as to /only need to adjust the code a bit/, what code and where? I was
trying in a phaselistener, are you suggesting a custom ViewHandler, custom
component or ?
Matt
--
View this m
Hi
"apply request value" phase is invoked on postback only. In the initial
request, only 2 phases are executed: restore view phase and render view
phase. Probably you only need to adjust the code a bit.
regards,
Leonardo Uribe
2016-04-14 21:31 GMT-05:00 fischman_98 :
> To all,
>
> I still have
12 matches
Mail list logo