Skip to Content
author's profile photo Former Member
Former Member

Custom Code being wiped out.

Hi All,

I am pretty new to WD. I am trying out writing examples and tutorials. I am facing a problem that is pretty annoying.

This is the gist of the problem.

I am writing a custom controller.

I have populated the init method with some code.

I have another custom method in the controller which I populate with some logic.

I am writing code within the begin and end tags (as suggested by the doco)

When I save the metadata, sometimes nwds wipes out my custom code. For example..If I have this in my custom method..

 /@@begin javadoc:executeBapi_Flight_Getlist_Input()
  /** Declared method. */
  //@@end
  public void executeBapi_Flight_Getlist_Input( )
  {
    //@@begin executeBapi_Flight_Getlist_Input()
	try
		{
			wdContext.currentBapi_Flight_Getlist_InputElement().modelObject().execute();
			wdContext.nodeOutput().invalidate();
		}
		catch (Exception e)
		{
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
    //@@end
  } 

After I save the metadata this is what is left!

 //@@begin javadoc:executeBapi_Flight_Getlist_Input()
  /** Declared method. */
  //@@end
  public void executeBapi_Flight_Getlist_Input( )
  {
    //@@begin executeBapi_Flight_Getlist_Input()
    //@@end
  }

Has anyone encountered this before??

Thanks in advance!

Santy

PS : My Env is JDK 1.5.0_14 + NWDS 7.0.12..

Edited by: Santosh Raghavan on Feb 22, 2008 12:41 AM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 21, 2008 at 11:45 PM

    Welcome to SDN Santosh!

    You code must be in between //@@begin

    and //@@end

    check whether if you are missing anything like this for this method or for any other methods.

    regards

    Siva

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Siva,

      Thanks for taking time to answer the question. I followed your suggestion and created another method. Problem remains.

      I might add here that I am not making any other modifications to the code other than init and the above method. (I am not messing up the tags)

      and I am faithfully (😊) following an example from one of the tutorials on sdn.

      Thanks

      Santy

  • author's profile photo Former Member
    Former Member
    Posted on Feb 22, 2008 at 03:38 AM

    Hi,

    Try to reload your project by right clicking on the project and select reload.

    Once this is done. try to add the code . Some times this works

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.