tapestry-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandr Kundirenko <akundire...@gmail.com>
Subject Beta-5. Page loading logic changed? More details
Date Thu, 01 Sep 2005 15:05:05 GMT
It seems that initial-value is assigned is piece of generated code...

<property name="itemClass" initial-value="literal:research.model.SomeObject"/>

=== PageLoader.constructComponent(...) ===
            //NOT initialized at this point
            container.finishLoad(cycle, this, containerSpec);


But in our overidden methods:

class FormPage extend PasePage {

        public void enterActiveState() {

        protected void finishLoad() {


Or did I miss something?

AK> Hello All,

AK> I have persistent property which I want to initialize using
AK> another property value.

AK> Page spec:

AK>         <property name="itemClass"
AK> initial-value="literal:research.model.SomeObject"/>

AK> Page class:

AK>         /**
AK>          * Item which is initialized using value of #getItemClass
AK>          */
AK>          @Persist
AK>          public abstract IPersistable getItem();
AK>          public abstract void setItem(IPersistable item);

AK> In beta-4 I tried to do it in finishLoad:

AK>         /**
AK>          * @see org.apache.tapestry.AbstractComponent#finishLoad()
AK>          */
AK>          @Override
AK>          protected void finishLoad() {
AK>             super.finishLoad();
AK>             //itemClass is NOT initialized at this point!
AK>             setItem(getNewFormItemInstance());
AK>          }

AK> But for some reason after super.finishLoad() call "itemClass" property
AK> still WAS NOT initialized with intial-value. (Is it OK?)
AK> I examined sources and found another place for it, which worked:

AK>         /**
AK>          * @see
AK> org.apache.tapestry.AbstractComponent#enterActiveState()
AK>          */
AK>         @Override
AK>         public void enterActiveState() {                
AK>             super.enterActiveState();
AK>             //worked in beta-4
AK>             setItem(getNewFormItemInstance());
AK>         }

AK> But in beta-5 changes to propeties which are made in
AK> enterActiveState() are reset in some magic way... I'm trying to find
AK> where for a few hours. I set item in enterActiveState() and it is back
AK> to NULL in pageBeginRender(). Is it normal behaviour?

AK> Thank you,
AK>   aku

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

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

View raw message