cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <>
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:
>   //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.

C h r i s t i a n       H a u l
    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.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message