cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: how to manage several XMLForms in a sitemap? (it was: dynamically choosing an action at runtime)
Date Fri, 08 Nov 2002 08:38:42 GMT
On 07.Nov.2002 -- 06:53 PM, Josema Alonso wrote:
[snip]
>   //get the Action
>   if(actionName.equalsIgnoreCase("EquipmentTypeAction")) {
>    EquipmentTypeAction equipmentTypeAction = new EquipmentTypeAction();

>    //add this action to the manager
>    equipmentTypeAction.compose(this.manager);

This is incorrect. It allows the equipmentTypeAction access the
component manager. Not the other way around.

Please don't invent the wheel a second time. Have a read of the great
introduction to the Apache Avalon Framework.

Basically, your action needs to implement Composable.
Then you need to get a selector for actions (this is not possible with
the compiled sitemap but works with the treeprocessor IIRC)
Then you could obtain a reference to the desired action.
Then you could fire up that action.
Then you would release that action.
And all the time the component manager takes care of invoking the
correct life cycle interfaces of the action if implemented.

If you cannot access the component manager that holds the actions, you
need to setup your own one.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message