• 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: How to determine what component the action came from?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to determine what component the action came from?


  • Subject: Re: How to determine what component the action came from?
  • From: Chuck Hill <email@hidden>
  • Date: Mon, 2 Mar 2009 19:49:56 -0800


On Mar 2, 2009, at 7:40 PM, Andrew Lindesay wrote:

Hello Amiel;

I think I understand your question; you have a component in which you want the action to be fired on the parent component? Try to use the "^" as in;

	^goDelete

This will invoke the method "goDelete" in the parent component.

The problem here is that components are inserted into AjaxGrid cells via WOSwitchComponent and the only bindings are:


ColumnValue: WOSwitchComponent {
	WOComponentName = columnComponentName;
	value = columnValue;
	grid = thisComponent;
}

This situations requires a little trickery or a different design. grid.parent should return the component that holds the grid. So you can do grid().parent().performActionNamed("foo"), but it if breaks you get to keep the pieces. :-)


Chuck




cheers.

The reason I asked this is that I wanted to embed the CRUD component to one of the cells in an AjaxGrid. and needed the "Delete" and "Update" action to be fired in the parent component of the AjaxGrid instead of the CRUD component. So the CRUD can be reusable.

___ Andrew Lindesay www.lindesay.co.nz



-- Chuck Hill Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects







_______________________________________________ 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
  • Follow-Ups:
    • Re: How to determine what component the action came from?
      • From: Andrew Lindesay <email@hidden>
    • Re: How to determine what component the action came from?
      • From: amiel montecillo <email@hidden>
References: 
 >Re: How to determine what component the action came from? (From: Chuck Hill <email@hidden>)
 >Re: How to determine what component the action came from? (From: amiel montecillo <email@hidden>)
 >Re: How to determine what component the action came from? (From: Andrew Lindesay <email@hidden>)

  • Prev by Date: Re: How to determine what component the action came from?
  • Next by Date: Re: eogen takeStoredValueForKey(toManyArray, relationshipName)
  • Previous by thread: Re: How to determine what component the action came from?
  • Next by thread: Re: How to determine what component the action came from?
  • Index(es):
    • Date
    • Thread