cancel
Showing results for 
Search instead for 
Did you mean: 

component controller implementation code is not saved

Former Member
0 Kudos

Hi

i developed table application and i am writing some code in controller controller implementattion tabl

but its not saving .

when i click save its undoing all the changes

so please let me know the reasion for that

and how to over come that.

regards

mmukesh

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Mukesh,

1. As other suggested, make sure you are adding code only within custom code regions (between //@begin -- //@end or similar blocks)

2. Make sure you are not edit generated *.java files but rather controller files *.wdcontroller in special editor that is opened from WebDynpro perspective.

VS

Former Member
0 Kudos

Hi Mukesh,

I once had the effect that anything I changed in the "Implementation" tab was gone after I switched to another tab and then back to "Implementation". This was due to some other error in my project (for instance, missing context mappings or similar).

If this could be the case, then please have a look at the "Tasks" window to see whether there are any errors displayed.

The other possibility, which was already stated, is of course that you write code into self-generating parts of the component controller. You are only allowed to write code into the lines between //@@begin:others and //@@:end. If you're creating additional methods, you should create these methods in the Methods tab. You then see the method frame in the Implementation tab and can add code there as well.

Regards,

Fabian

Former Member
0 Kudos

Hi Mukesh,

Inorder to save the changes you need to use '<b>Save All Metadata'</b> option available under File menu.

You are only allowed to write code between //@begin -- //@end. If still you are getting the same problem close the project, open it and then do the reload/rebuild.

Regards,

Jhansi

Former Member
0 Kudos

HI Mukesh,

Where exactly you are adding the code.in web dynro you can add code in only certain predefined places.if you add anywhere else at the time of saving it will

revert those chages

With Regards

Naidu

Former Member
0 Kudos

Hi Naidu

I am wiriting new method to add values to the structure and also one static varibale

in the Component Controller.

so please let me know how to add these

regards

mmukesh

Former Member
0 Kudos

Hi Mukesh,

If you want to add a new method, you need to do so thru the "methods" tab of the controller or in the "others" part of the code between the @begin and @end.

Regards,

Christophe

Former Member
0 Kudos

Hi,

What everuser open your implementation tab of every controller or view read the top of the sentences.

// This file has been generated partially by the Web Dynpro Code Generator.

// MODIFY CODE ONLY IN SECTIONS ENCLOSED BY @@begin AND @@end.

// ALL OTHER CHANGES WILL BE LOST IF THE FILE IS REGENERATED.

And any of userdefined code u need to add

read the following

/*

  • The following code section can be used for any Java code that is

  • not to be visible to other controllers/views or that contains constructs

  • currently not supported directly by Web Dynpro (such as inner classes or

  • member variables etc.). </p>

*

  • Note: The content of this section is in no way managed/controlled

  • by the Web Dynpro Designtime or the Web Dynpro Runtime.

*/

//@@begin others

//@@end

Thanks,

Lohi.