on 09-26-2005 8:27 AM
Hi,
I have a method in view X that I would like to execute from view Y. what is the API for executing a methods from another view? (I know the API for executing a method in the controller, but now I refer to a method in the view).
Thanks in advance,
Aviad
Hi Aviad,
As far as I know, there is no direct way to access a view's method from another view. But you can achieve this functionality using events.
1) Create an event and a method to fire this event in your component controller.
2) Create a corresponding event handler in the second view, which will call the desired function.
3) Now from the first view, you can call the event triggering function of the component controller. This will inturn execute the method in the second view.
If you need to manipulate some data, you can either pass them as Event parameters or use data mapping.
Hope this helps,
Best Regards,
Nibu.
Message was edited by: Nibu Wilson
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Aviad,
It is not possible to direct call method of one view from another. Use custom controller methods with appropriate context mapping.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.