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 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