cancel
Showing results for 
Search instead for 
Did you mean: 

difference between this and wdthis

Former Member
0 Kudos

hi,

what is the exact differences and usages of this and wdthis keywords in webdynpro for java applications

with regards

shanto aloor

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I think Deepak is right. Here :

'this' implies the Application,

'wdThis' implies your current component.

and 'this.wdThis' implies the component currently assigned to the application.

by the code segment you are assigning the current component to the applications current component.

regards,

Sahidur

Answers (1)

Answers (1)

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

wdThis is a webdynpro concept where as java this is a java concept.Technically specking there is no difference between two.Both are the instances of the current controller.

wdThis is provided by framework because you dont have constructor access in webdynpro you can not create the instance using new operator for webdynpro controller classes.

Frame work gives you the current controller reference.

Regards

Kalyan

Edited by: venkatakalyan karanam on Aug 29, 2008 12:30 PM

Former Member
0 Kudos

hi klayan,

thanks for your immediate reply....

i have one more doubt, the below code snippet is the auto generated code in the implemtaion part of my webdynpro applicatios view what this code actually means

public BasketRPEView(IPrivateBasketRPEView wdThis)

{

this.wdThis = wdThis;

this.wdContext = wdThis.wdGetContext();

this.wdControllerAPI = wdThis.wdGetAPI();

this.wdComponentAPI = wdThis.wdGetAPI().getComponent();

}

with regards

shanto aloor

Former Member
0 Kudos

Hi,

in WebDynpro when you are developing any project at the time of project creation you suppose to create Controller , view ,window and application.

So when you try to run you application always Controller doInit() method is called first. This component controller is main controller for the develped component..

public BasketRPEView(IPrivateBasketRPEView wdThis)

{

this.wdThis = wdThis;

this.wdContext = wdThis.wdGetContext();

this.wdControllerAPI = wdThis.wdGetAPI();

this.wdComponentAPI = wdThis.wdGetAPI().getComponent();

}

This function code meaning is you have created one view by the name of BasketRPEView and suppose you have set the default property for this view is true and when you run the application then from controller call of this view will happen and by default constructor of this view will call and the values of the wdThis,wdThis.wdGetContext();wdThis.wdGetAPI(); and wdThis.wdGetAPI().getComponent(); will set of the view variable.

This the developed programming framework structure of the WebDynpro. This will enable you use use the component contoller method and variable.

You can clearly see they are using all the basic Opp's concept with MVC structure.

For more deatil try to access http://help.sap.com or sdn.sap.com.

Hope this may help you.

Deepak