cancel
Showing results for 
Search instead for 
Did you mean: 

NWDS Strange Behavior

S0019300750
Contributor
0 Kudos

Hello All

My application consists 3 methods other than wdDoInit, wdDoModifyView etc.

When I try to change in any method and click on save all metadata, the

Netweaver developer studio is deleting all other method contents except their signatures. But it keeps changes ie saves only the method in which I make changes.

Because of this I lost my some code .

Pls help me out !!!!

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member189631
Active Contributor
0 Kudos

Hi Vinod,

  • Whenever you create a Project Webdynpro Java and declare the components will generate Class file and automated code.

  • The developer can insert his own java code in the automated classes.

  • The developer will write the code between

//@@begin 
 <b>Code</b>
//@@end

  • Any other place will erase the code.

Regards,

<b>Ramganesan K.

S0019300750
Contributor
0 Kudos

Hi all

Thanks for replies.

I have declared the methods using the given tab only.

And it is deleting the code inside wdDoInit method also though I am mentioning code inside begin and end comments....

former_member286976
Active Participant
0 Kudos

Hi Vinod,

Is you code linked to any version control system? I mean if you are using any version control system to manage your code, just close all the project files window and do a re-synchronize of the code from the version control system and then re-load the whole project. Then you try changing it. This problem has happened to me sometime back and I did a re-synchronize and reload of code from my version control system, rebuild it once and all started working fine.

Regards,

Sudeep

S0019300750
Contributor
0 Kudos

HI Sudeep

Thanks for reply.

But my code is not connected to any version control system.

But now I have found a way to escape. I am making changes and then right click and save then i am closing.

And after that i m clicking on save all metadata.

If i follow this then my new changes are getting saved.

Very Strange !!

I am surprised. Planning to reinstall NWDS..

abhijeet_mukkawar
Active Contributor
0 Kudos

Vinod,

take a backup of your .metadata folder, and then delete the folder from the place, try then running your application. not 100% sure but Give it a try,

if the problem still persists, then i am afraid, you may be forced to reinstall it.

regards

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

Use Methods Tab present in the View Designer mention the name ,params,return values

In the explorer of webdynpro click your method or you can go by implementation tab

write your code always within

//@begin

//your code must be here not at any where otherwise the content will be lost when the code is regenerated

//@end

Regards

kalyan

abhijeet_mukkawar
Active Contributor
0 Kudos

Vinod,

whichever code you are writing that should be included in tags, like

//@@begin

<code>

//@@end

these tags gets generated for the methods you declare.

NWDS deletes the code out of these tag, since writing outside these tags is not allowed.

hope it helps

regards

Former Member
0 Kudos

Hi Vinod Patil.

Please put the code between start and end tags.

i.e. @@begin and @@end tags.

what ever code you have written outside these tags is deleted when you save the metadata.

regards

Anil