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

Calling a method in view from component controller?

Hi,

Is it posible to call a method that is defined in the Component Controller in the View?

If it is posible please give some sample code how to call the method?

Regards,

Padmalatha.K

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2008 at 09:39 AM

    Hi,

    Add the controller as part of Required Controllers

    and use the following code

    wdThis.wdGet<ComponentName>Controller().<MethodName>()

    Ex:

    wdThis.wdGetTestCompController().getData();

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 14, 2008 at 09:43 AM

    Hi,

    You can call the the method defined in Component Controller in a View. Use the following code.

    wdThis.wdGet<ComponentName>Controller().<MethodDefined in Component Controller>();

    Thanks & Regards,

    Jhansi Miryala

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 16, 2008 at 08:30 PM

    Padmalatha, all the methods defined in a controller from 'Methods' tab are instance methods. An instance method defined in a component controller is callable from any view controller that holds a reference to the component controller.

    Defining methods between the tags

    //@@begin others
    
    //@@end
    

    is useful if you want to declare static methods.

    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.