on 05-28-2008 10:32 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
this is my structre:
name SalesOrders
name Description
name OrderNo
name SalesDate
name SalesRep
code:
public void wdDoInit()
{
//@@begin wdDoInit()
ISalesOrdersNode soNode = wdContext.nodeSalesOrders();
ISalesOrdersElement newSoel = soNode.createSalesOrdersElement();
newSoel.setDescription("Printer Suplies");
newSoel.setOrderNo(1000);
newSoel.setSalesDate(new Date(System.currentTimeMillis()));
newSoel.setSalesRep("harry hawk");
// soNode.addElement (newSoel);
wdContext.nodeSalesOrders().addElement(newSoel);
//@@end
}
Regards
Hi,
Go to the top of the source code
You will see a section where imports are done
remove the import which is related with IPrivateEX4Comp.ISalesOrdersNode
and then do an organize imports
When its prompted to select the import select the right one
Or else
change the import to match with the one mentioned in the error message
Regards
Ayyapparaj
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.