on 07-29-2008 1:47 PM
Hello,
When is better call a method in the component controller, than run only a viewu2019s method?
In other words, what kind of methods should to be in the component controller and what kind of methods should to be in the view?
Could you give me some examples?
Regards
Janeth
Hi,
All the methods which deals with business logic, calculations, repeated methods for all views will be written in component controller.
for example All the model related methods you will write in component controller.
Actually in view you should not write any method which deals with business logic,it should contain only presentation logic. you will just call the methods in component controller here.
you have to max utilize the existing methods doInit(), doModify() and also some actions like onSelect, onSubmit which deals with view controller.
PradeeP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
you can write all buisness logic method in component controller or also method which is common across the view.
in View you can write method only related to UI changes and action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
The EventHandler methods like on Action<actionname>() and methods to fire plugs we will generally used in view controllers.
If we want to intialise any attributes we will do it in WdDoInit() method of view Controller.
Generally its not preferrable to write business logic which is used by many components like service contoller generated methods in a view.
Its a good way to use Service Controller methods like execute<bapiname> in Component Controller.
For Dynamic Generation of UiElements we will use the WdDoModifyView(..) we use it in View.
Regards
sowmya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check these links
[Component Usage with Controller Access|http://help.sap.com/saphelp_nw04s/helpdata/en/eb/f712403dbedd5fe10000000a155106/content.htm]
[Controllers of a Web Dynpro Component |http://help.sap.com/saphelp_nw04s/helpdata/en/b9/b82c4142aef623e10000000a155106/content.htm]
Hope this would help you
Regards
Narin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.