yes, that is working am getting the value of usercontext in Derivedclass

but if i am setting usercontext [setUserContext(new usercontext());] in
pageAttached() event 
the usercontext is null  in the next request onwords




Stephane Decleire wrote:
> 
> Hi,
> 
> Yes, your persistent properties will be available in all your subclasses.
> You could also init your persistent property with an @InitialValue 
> annotation.
> 
> --
> Stéphane Decleire
> 
> 
> 
> jiju a écrit :
>> Hi All,
>> I have one persistat property in my basepage , i am extending this
>> basepage
>> to specificPages
>> will that persistant data be available in my derived pages also ?
>>
>> public abstract MyBasePage extends BasePage implements
>> PageBeginRenderListener{
>> @Persist
>> public abstract UserContext getUserContext();
>> public abstract void  setUserContext();
>>
>> public final void pageBeginRender(PageEvent event) {
>> setUserContext(new UserContext());                   
>> doSomething(event);
>>                      
>> }
>> public abstract void doSomething(PageEvent event);
>> };
>>
>>
>>
>> public abstract DerivedPage extends MyBasePage{
>>
>> public void doSomething(PageEvent event){
>>      System.out.println("UserContext="+getUserContext());
>> }
>>
>> };
>> But here i am getting UserContext as null;
>>
>> is it the right way to do, or am i missing any thing else..
>>   
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%40Persist-problem-in-MyBasepage-tf3034507.html#a8443855
Sent from the Tapestry - User mailing list archive at Nabble.com.


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

Reply via email to