The following test code worked with Mojarra 2.2.0-SNAPSHOT -- the syserr appeared in the Tomcat console and the <head>...</head> section contained the jsf.js resource in the rendered markup...
@ListenerFor(systemEventClass = PreRenderComponentEvent.class)
@ResourceDependency(library = "javax.faces", name = "jsf.js", target = "head")
public class MyRenderer extends RendererWrapper implements ComponentSystemEventListener {
private Renderer wrappedRenderer;
public MyRenderer(Renderer renderer) {
this.wrappedRenderer = renderer;
}
public void processEvent(ComponentSystemEvent componentSystemEvent) throws AbortProcessingException {
System.err.println("!@#$ MyRenderer.processEvent() componentSystemEvent=" + componentSystemEvent);
}
@Override
public Renderer getWrapped() {
return wrappedRenderer;
}
}
On Nov 30, 2012, at 11:39 AM, Neil Griffin <neil.griffin_at_portletfaces.org> wrote:
> I should have time late next week to test it. Hope that is soon enough.
>
> On Nov 30, 2012, at 2:33 PM, Edward Burns <edward.burns_at_oracle.com> wrote:
>
>>>>>>> On Fri, 30 Nov 2012 11:05:18 -0500, Kito Mann <kito.mann_at_virtua.com> said:
>>
>> KM> FWIW, I've used this approach to provide JSON rendering, so +1 on having
>> KM> the wrapper.
>>
>> KM> Would RendererWrapper still honor @ListenerFor and @ResourceDependency
>> KM> annotations? I would expect that it would.
>>
>> We would need to test it. Neil, can you test it?
>>
>> Ed
>>
>> --
>> | edward.burns_at_oracle.com | office: +1 407 458 0017
>> | homepage: | http://ridingthecrest.com/
>