cancel
Showing results for 
Search instead for 
Did you mean: 

mapping

Former Member
0 Kudos

Hi All!

Is it mandatory to map view context to

component controller context ?

When do we really need a component controller context ?

Regards

Sas

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

As Webdynpro is based on the MVC.

Its always good to have your data flow from the controller to the views, so that you can make your views lean and get the advantage of maximum reusability.

Now to your questions

Is it mandatory to map view context to

component controller context ?

No, it all depends on the way how you want your application data to be handled, But its always a good practice to make use of the controller to do the data handling and do the UI related things in the views.

When do we really need a component controller context ?

A simple example is when multiple views need the same data, if you try to this at view level you need to do the same at both views, instead move the code to the controller and map them to diff views

Hope its clear

Regards

Ayyapparaj

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi erdem,

Its depend on your requirement.

case1:If you want to show your input value from one view to another view then it must be need to mapping between view controller and component controller,beacause you cant do mapping b/w view controller and view controller,values passed from one view to another view through component controller.

case2:if you want to store value only for particular view then its not need to mapping b/w view controller and component controller .

suresh_krishnamoorthy
Active Contributor
0 Kudos

Hi erdem,

Mapping enables you to better structure your Web Dynpro applications and to implement later functional enhancements or changes more easily. Application development is responsible for this type of structure in a Web Dynpro application.

Refer this SAP help link for more information:

[Here|http://help.sap.com/saphelp_nw04/helpdata/en/44/a2384162316532e10000000a1550b0/frameset.htm]

and [Here|https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/2676] [original link is broken] [original link is broken] [original link is broken];

Regards, Suresh KB

Former Member
0 Kudos

Hi,

Its not mandatory to map the context of component controller to the view controller.

As said in the previous reply, it is meant for business logic and your views acts as presentation layer. So you do all the logic in the comp. controller and pass this to views via context mapping.

Basically component controller context mapping helps you to interact between the views.

thanks & regards,

Manoj

Former Member
0 Kudos

Business rules should be managed in Comp controller, mapping context allows us to handle data and values in view.. from component.. like a puppet moving when pupeteer manipulates its strings.

Its a best practice xD

Regards

Julio Herrera