Skip to Content
author's profile photo Former Member
Former Member

Execute method from outside the view

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 26, 2005 at 07:31 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 26, 2005 at 07:34 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.