Re: Invoking Subcomponent Action
Re: Invoking Subcomponent Action
- Subject: Re: Invoking Subcomponent Action
- From: Lachlan Deck <email@hidden>
- Date: Thu, 19 Feb 2009 09:28:52 +1100
On 19/02/2009, at 7:33 AM, Henrique Prange wrote:
Simple question: Is there a simple/correct way to call subcomponent
actions? How can I do that?
Here is an example why I need that. I have the following structure
in one of my components:
<wo:AjaxModalDialog onClose = "$clearState">
<wo:WOSwitchComponent WOComponentName = "$componentName">
</wo:AjaxModalDialog>
I need to clear the state of the component instantiated by
WOSwitchComponent, but I don't know how to call the action within
the 'clearState' method on the current component.
Have you tried doing something like the following?
<wo:AjaxModalDialog onClose = "$clearState">
<wo:WOSwitchComponent WOComponentName = "$componentName"
callbackAction="$clearState">
</wo:AjaxModalDialog>
In your switched components:
- java:
public WOActionResults callbackAction() {
return
performParentAction(valueForBinding("callbackAction").toString());
}
- html
<wo: .. action="$callbackAction">...
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden