tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <hls...@gmail.com>
Subject Re: Beta-5. Page loading logic changed?
Date Thu, 01 Sep 2005 17:25:41 GMT
There was some shifting around in the generated code for properties.

Please use one of the listener interfaces for your purposes.

On 9/1/05, Alexandr Kundirenko <akundirenko@gmail.com> wrote:
> Hello All,
> 
> I have persistent property which I want to initialize using
> another property value.
> 
> Page spec:
> 
>         <property name="itemClass" initial-value="literal:research.model.SomeObject"/>
> 
> Page class:
> 
>         /**
>          * Item which is initialized using value of #getItemClass
>          */
>          @Persist
>          public abstract IPersistable getItem();
>          public abstract void setItem(IPersistable item);
> 
> In beta-4 I tried to do it in finishLoad:
> 
>         /**
>          * @see org.apache.tapestry.AbstractComponent#finishLoad()
>          */
>          @Override
>          protected void finishLoad() {
>             super.finishLoad();
>             //itemClass is NOT initialized at this point!
>             setItem(getNewFormItemInstance());
>          }
> 
> But for some reason after super.finishLoad() call "itemClass" property
> still WAS NOT initialized with intial-value. (Is it OK?)
> I examined sources and found another place for it, which worked:
> 
>         /**
>          * @see org.apache.tapestry.AbstractComponent#enterActiveState()
>          */
>         @Override
>         public void enterActiveState() {
>             super.enterActiveState();
>             //worked in beta-4
>             setItem(getNewFormItemInstance());
>         }
> 
> But in beta-5 changes to propeties which are made in
> enterActiveState() are reset in some magic way... I'm trying to find
> where for a few hours. I set item in enterActiveState() and it is back
> to NULL in pageBeginRender(). Is it normal behaviour?
> 
> Thank you,
>   aku
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Mime
View raw message