Skip to Content
avatar image
Former Member

Call a view's method from Component Controller.

Hi

Is it possible to call a view's method from Component Controller.

Regards

Nikhil

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Nov 22, 2007 at 06:19 PM

    If you want some method to be executed in view controller .you can raise event in the component controller and in view controller you can handle that event and execute the event handler method.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Tummuru,

      I have created an event in Component Controller by the name toMenuView. Now I created a method in which this event is getting fired. Foll. is the code of the method.

      public void fireToMenuView( )

      {

      wdComponentAPI.getMessageManager().reportSuccess("fireToMenuView");

      wdThis.wdFireEventToMenuView();

      }

      Now I have created an event handler "handleToMenuView" in the MenuView and subscribed the event handler to the event in Component Controller.

      The control is reaching to the fire event in component controller but not to the Event handler in view controller.

      What am I missing.

      Regards

      Nikhil

  • avatar image
    Former Member
    Nov 22, 2007 at 07:09 PM

    Hi Nikhil,

    its not possible bcos view is always private. why u want to do that??

    regards

    Sumit

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 23, 2007 at 02:25 AM

    HI Nikhil

    Custom Controllers have a public interface ,but view controllers do not. therefore a view controller can decalre the use of custom controller, but not vice versa

    Best Regards

    Chaitanya.A

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 23, 2007 at 02:51 AM

    Hi,

    Follwoing is possible create the method in controller call it from view, not reverse.

    Regards

    Ayyapparaj

    Add comment
    10|10000 characters needed characters exceeded