on 04-28-2009 4:32 PM
Hi everybody,
how is ist possible to call a method within a view from a customcontroller.
I have two views and a customcontroller between them. A method in view A should trigger a method in view B through the customcontroller.
regards,
Sid
You cannot do that and that's ok. But you can register the view controller to some event of the custom controller and fire an event instead.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use the controller editor of the custom controller to create a new event, maybe with parameters.
Declare the custom controller as "required" from the view controller (if not done already), create a new method in the view controller as event handler for that event.
Then the NWDS will generate a method in the custom controller to fire the event and a method in the view controller to handle it.
Armin
Hello,
I don't think so you can call view methods from custom controller....as all the methods in it are by default Private ....and it does not agree with the MVC Architecture which Webdynpro follows....
Regards,
Shikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
make the context mapping b/w A view and B view to the custom controller, after that only we can call the methods available under the custom controller, if you want to use the same method in the both the views you need to write under the custom controller and call the method from your view controller.
to call method from cutom controller for view:
wdThis.wdget<customcontroller name>controller().<method name>();
Cheers,
Apparao
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.