• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error on preRenderView

 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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




 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?





 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your method signature does not match the specification.
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What should it be instead?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

(signature must match public void listener(javax.faces.event.ComponentSystemEvent event) throws javax.faces.event.AbortProcessingException)
 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I still encounters error after I changed the signature.

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18277
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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}".

 
Mary Koh
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What does that means? I would like to understand more.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic