This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSF and the fly likes preRenderView vs preRenderComponent Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "preRenderView vs preRenderComponent" Watch "preRenderView vs preRenderComponent" New topic
Author

preRenderView vs preRenderComponent

Ryan Slominski
Ranch Hand

Joined: Nov 05, 2010
Posts: 33
I'm not able to get preRenderView to work, but I can get preRenderComponent to work. I'm using Mojarra 2.0.2 on GlassFish 3.0.1 with Netbeans 6.9. The suggestion feature of the IDE tells me that the "type" attribute of the f:event tag can only be one of:

preValidate
PostValidate
preRenderComponent
postAddToView

This related post suggest that preRenderView should be available: duplicate-call-preRenderView-event
Ryan Slominski
Ranch Hand

Joined: Nov 05, 2010
Posts: 33
OK, I got preRenderView to work. It appears that the preRenderView f:event can only be placed as a direct child element of f:view. Don't put it in h:head, h:body, or f:metadata.

I guess Netbeans IDE "type" attribute suggestions are just not up to date.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: preRenderView vs preRenderComponent
 
Similar Threads
After logout in JSF relogin withtout credentials possible
JTable
Bemused event question
duplicate call on preRenderView event
firing an event when it has not been fired