cancel
Showing results for 
Search instead for 
Did you mean: 

Implementation for component controller method webdynpro java

Former Member
0 Kudos

Hi Experts,

I am basically an ABAPer and recently I got into a project where I have to handle certain webdynpro java requirements too.I am stuck at one of the requirements now. I have to add a new method to the component controller and have to call the same from the event of a button.I have created the method from the component controller properties pane  and I can see it listed in the methods. How to implement this method. When I right click on the method and select Navigate to -> Implementation its getting navigated to the java editor of the component controller but I am not able to see the implementation of my method there. Where am I supposed to write the code for the method ?

Accepted Solutions (1)

Accepted Solutions (1)

former_member191044
Active Contributor
0 Kudos

Try a right click on your DC and choose "rebuild project", Make sure that all editors are saved. After that open the java implementation of the controller again and you should be able to find the method.

Regards,

Tobias

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks a lot guys. It helped a lot.

Now I need another help. I have completed the development, i.e, made changes to the existing DC. Now I am not sure about the testing part.My DC is in local development now.

It would be really grateful if somebody can provide me the steps to test the same in portal.

former_member191044
Active Contributor
0 Kudos

Have you created a application in you WD project? Then you can rightclick on your application and choose "deploy new archive and run". Then the NWDS will deploy your project and opens a browser and runs your app.

If you have no application. Then right click on applications and choose "Create Applications". Then follow the wizzard.

Regards,

Tobias

Former Member
0 Kudos

I too have faced this issue at start-up

The reason the implemented method is not appearing in the Java editor is that, the code is not builded after you have created the method in the component controller Properties -> methods.

For this you can enable the auto-build option also. Ones enabled you need not Build everytime manually.

So after you have implemented the method in the component controller, you can call this method from the Action of the View controller using this following syntax

wdThis.wdGet<controller_name>Controller().method_name(params)

Hope this helps

vdurgarao09
Contributor
0 Kudos

Hi,

Check this links you can get help

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0ba2c45-0518-2a10-73be-9b785e10a...

http://wiki.scn.sap.com/wiki/pages/viewpage.action?pageId=16435

But You need to implement the methods in component controller after those methods you need to create interface controller and you need to call component controller methods in interface controller.same process for views(Actions,Events) also.

Regards,

Durga

junwu
Active Contributor
0 Kudos

that's the place to write your code