tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Sampaleanu <colin...@exis.com>
Subject finishLoad() gets called in the wrong order (IMHO)
Date Wed, 20 Aug 2003 21:40:45 GMT
I have a big problem in that for a component, I am declaratively setting 
some properties via 'property-specification' elements with initial 
values, then in finishLoad I need to set up some other items based on 
the values that were set up by the property-specification. However, 
property-sepcification values are set up by tapestry _after_ the call to 
finishLoad()

from PageLoader:
            // Finish the load of the component; most components (which
            // subclass BaseComponent) load their templates here.
            // That may cause yet more components to be created, and more
            // bindings to be set, so we defer some checking until
            // later.

            container.finishLoad(cycle, this, containerSpec);

            // Finally, we create an initializer for each
            // specified property.

            createPropertyInitializers(page, container, containerSpec);

Arguably, this should be reveresed, although there may be some negative 
implications for some other use cases that I don't know of. What might 
be the best solution, and I can't think of any real negatives, is to add 
another callback, let's call it finishLoad2 for the purposes of this 
email, called after the call to createPropertyInitializers.

What does everybody think?

Regards,
Colin




Mime
View raw message