• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Invoking Subcomponent Action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
References: 
 >Invoking Subcomponent Action (From: Henrique Prange <email@hidden>)

  • Prev by Date: Cannot obtain globalId for an object which is registered in an other than the databaseContext's active editingContext in _globalIDForObject
  • Next by Date: Re: Cannot obtain globalId for an object which is registered in an other than the databaseContext's active editingContext in _globalIDForObject
  • Previous by thread: Invoking Subcomponent Action
  • Next by thread: Re: Invoking Subcomponent Action
  • Index(es):
    • Date
    • Thread