This is not something that's currently available in JSF.  However, it
is in frameworks like Shale and Seam.  You could try adding the
following component that allows this behavior.

http://jsf-comp.sourceforge.net/components/onload/index.html

I would add this to 2.x if it were available in a Maven repository. If
there's enough demand, I'll add it myself.

Matt

On 2/20/07, sionsmith <[EMAIL PROTECTED]> wrote:

I want to be able to run init() before the page renders - is there a such a
thing? like .net has with Page_Load?

One solution i have come up with:

=========================

<f:view>
<h:panelGroup rendered="#{managedBean.prepare}" />

...

</f:view>

==========================

public class ManagedBean
{

...

 public boolean getPrepare()
 {
   //
   // execute my prepare logic here
   //
   return false;
 }
...

}

======================

However i could add this to the default.jsp but was thinking wouldnt it b
better if there was something built into the BasePage? What you think Matt?
--
View this message in context: 
http://www.nabble.com/JSF-Page-Load-using-a-PageLoadEvent---init-method-tf3259382s2369.html#a9059352
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to