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

Help in Error Code

Hi,

i learn WebDynpro from book JA310 and i copy the code from book ex.5 solution and i have 3 red lines in this maybe u have idea?

Redlines :

1.ISalesOrdersNode

2.ISalesOrdersElement

3 Date

i do in the context node : SalesOrders,

in the book its write with I (ISalesOrders) latter i try without and i still have error .

ISalesOrdersNode soNode = wdContext.nodeSalesOrders();
   
   ISalesOrdersElement newSoel = soNode.createSalesOrderElment(); 
   
   newSoel.setDescription ("Printer Suplies");
   newSoel.setOrderNo (1000);
   newSoel.setSalesDate(new Date(System.currentTimeMillis() ) );
   newSoel.setSalesRep("harry hawk");

Regards

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on May 28, 2008 at 09:53 AM

    Hi,

    If your context node names and the rest are fine then

    Right click on the source code

    select ->Source->Organize Imports

    ISalesOrdersNode soNode = wdContext.nodeSalesOrders();

    ISalesOrdersElement newSoel = soNode.createSalesOrderElement();

    newSoel.setDescription ("Printer Suplies");

    newSoel.setOrderNo (1000);

    newSoel.setSalesDate(new Date(System.currentTimeMillis() ) );

    newSoel.setSalesRep("harry hawk");

    wdContext.nodeSalesOrders().addElement(newSoel);

    Regards

    Ayyapparaj

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi,

      You might have mapped this to the view.

      When your writting the code in the component controller you have to use the IPublic one

      and when you are accessing the same node from view controller you can access the IPrivate.

      Regards

      Ayyapparaj

  • author's profile photo Former Member
    Former Member
    Posted on May 28, 2008 at 09:37 AM

    Hi Cosmo,

    You have to import the classes. Press CtrlShifto in java editor wherever you are trying this code. All classes will be automatically imported.

    Regards,

    Gopal

    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.