Thanks, onPrepareForSubmit
() worked in my case.
I'm not 100% sure but I think  onActivate() is only available for pages. 






 >-------- Оригинално писмо --------

 >От: Bryan Lewis jbryanle...@gmail.com

 >Относно: Re: component initialization on post back

 >До: Tapestry users <users@tapestry.apache.org>

 >Изпратено на: Понеделник, 2012, Юли 23 14:41:11 EEST



 
> Try onActivate() or onPrepareForSubmit().
 
> 
 
> 
 
> On Mon, Jul 23, 2012 at 7:19 AM, ZKN __  wrote:
 
> 
 
> > Hi,
 
> > I have a custom component that needs to be initialized every time before
 
> > use. For this I wrote a method like this:
 
> > @SetupRender
 
> >         public void prepare() {
 
> > But this method only gets invoked on an initial get request. It doesn't
 
> > get invoked when I submit a button inside this component.
 
> > So when I click the submit button I get the onSuccess method invoked but
 
> > it fails with NullPointerException because the prepare() method wasn't
 
> > invoked.
 
> > Is it possible to initialize the component every time it is used no matter
 
> > what the request is?
 
> >
 
> >
 
> > Thanks,
 
> > Özkan
 
> >
 
> > ---------------------------------------------------------------------
 
> > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
 
> > For additional commands, e-mail: users-h...@tapestry.apache.org
 
> >
 
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to