on 02-01-2006 3:08 AM
Hello All,
I am new to Web Dynpro. I have doubt in the "Context" concepts. Can anybody explain the "Context" concept and also the difference between View Context and Component Context. If possible, please explain me with some examples.
And also, do we have any related "Context" concept in ABAP or Java?
Priya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priya,
The controller 'C' part of MVC in Web Dynpro is represented as follows:
Controller = context + custom code.
The context is the hierarchical data storage of the controller. Context stores the data temporarily which can be used by custom code.
Now the controllers are divided in to two
1. Controllers with a interface - View Controllers
2. Controllers without a interface - Custom Controllers
In the custom controller, there is a special type called Component controller. Now the context of view controller is called View Context and the context of component controller is the Component context.
Component's context can be used across the whole web dynrpo component(across all views). Where as view controller's context is used only for the view.
RK
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
I exactly understood the explanation but I got 1 doubt .What is this view controller.Is it different to component controller.As per my knowledge, when we create a component then Component controller gets created by default.and for custom controller we have to create it.What about this view controller ?In studio also we cant see it explicitly.Please explain it?
Hi Priya,
Whatever data that you are using in view or controller you can store it in context.
Every view has its context. View context is for storing data pertaining to a particular view.
There is no context for component itself. You may have mentioned about controller context.
whatever global data is there you can store and access this from controller context. Those views that add the controller as used controller can access its context. Thus controller context can be used to store common data between views.
See this link for more details
http://help.sap.com/saphelp_nw04/helpdata/en/eb/e1cb5eea012b4481f8077c6023a70e/content.htm
Hope this helps you
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Priya,
as webdynpro follows the MVC(model-view-controller) Pattern context is the model where u store data which is used by controller to manipulate and by view to display .
difference between view context and componenet is just like local and global variable . component controller may contains data which can be shared by many view and controllers but view contains data for its own use .
i hope it will clear some doubt and i didnt get ur last question
do we have any related "Context" concept in ABAP or Java?
please post it in some detail.
Regards,
yashpal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.