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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to