[Logo]
Forums Register Login
Error on preRenderView
Hi,

I am scratching my head on this preRenderView. Please help me. I am moving to JSF 2.0 and I need a way to replace the hx:scriptcollector preRender.
When I access the page, the error is that it can't find the method in the onPageLoadBegin method in the managed bean.
Any pointers?

Old code






New code




I've never had to use that feature, which was added to JSF2. However the JavaDocs for f:event say this about the event's listener method:

(signature must match public void listener(javax.faces.event.ComponentSystemEvent event) throws javax.faces.event.AbortProcessingException)


I would wager that your onPageLoadBegin method wasn't updated to take a ComponentSystemEvent as a parameter.
Hi,

Is there any suggestion that you could you recommend on how should I moved the hx:scriptcollector preRender to JSF 2.0?

I tried to used back the old codes, but I am getting the below error. Any advise?





Your method signature does not match the specification.
Hi,

What should it be instead?
 

(signature must match public void listener(javax.faces.event.ComponentSystemEvent event) throws javax.faces.event.AbortProcessingException)
 
Hi,

I still encounters error after I changed the signature.

The stack trace seems to indicate that you changed your view definition and that it's referencing the method via the EL expression "#{pagecode.Login.onPageLoadBegin2}".

Hi,

What does that means? I would like to understand more.
Wink, wink, nudge, nudge, say no more ... https://richsoil.com/cards



All times above are in ranch (not your local) time.
The current ranch time is
Nov 25, 2017 03:04:45.