on 12-27-2005 6:26 AM
Hai..
I am beginner in Web-Dynpro and still learning. This coding is an example in PDF ..(related to context nodes)
My coding luk like this:-
public void wdDoInit() {
..//@@begin wdDoInit()
// Get a reference to the SalesOrders node
..ISalesOrdersNode soNode = wdContext.nodeSalesOrders();
..// Create a new element for node SalesOrders
ISalesOrdersElement newSoEl =
soNode.createSalesOrdersElement();
..//Use the attribute mutator methods to set the values
newSoEl.setDescription("Printer supplies");
newSoEl.setOrderNo(1000);
newSoEl.setSalesDate(new Date(System.currentTimeMillis()));
newSoEl.setSalesRep("Harry Hawk");
..//.Append the new element to the node's collection
soNode.addElement(newSoEl);
..//@@end.
when I am deploying and running an application..it is showing an error that
"ISalesOrderNode is not resolved or is not a type".
How should I declare this ISalesOrderNode ???
Should I import any package or something.?
Please guide me in detail for this.
Hi Hari,
1> If you are getting error at build time then press cntrl + shift + O, or right click and organize imports.
You also have to add the required jar files in the java build path. Both in libraries tab as well as Order & Export tab.
2> If you are getting the error at run time, then you require to deploy the jar files to server. For this you require to import the jar files to lib folder in the package explore.
Try it,
Yomesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
try giving the below code.
public void wdDoInit() {
..//@@begin wdDoInit()
// Get a reference to the SalesOrders node
<b>IPrivate<view name> .ISalesOrdersNode soNode = wdContext.nodeSalesOrders();</b>
..// Create a new element for node SalesOrders
<b>IPrivate<view name> .ISalesOrdersElement newSoEl =
soNode.createSalesOrdersElement();</b>..//Use the attribute mutator methods to set the values
newSoEl.setDescription("Printer supplies");
newSoEl.setOrderNo(1000);
newSoEl.setSalesDate(new Date(System.currentTimeMillis()));
newSoEl.setSalesRep("Harry Hawk");
..//.Append the new element to the node's collection
soNode.addElement(newSoEl);
..//@@end.
Regards,
Rathna
Hai Yomesh,
I am getting error at buildtime.
where should i rightclick to get organize imports??
I pressed ctrlshifto ...In that there are two imports. Should i select all imports in that box..
How can I know which import should be done.??
As u said...to ad jar files in the java build path. Both in libraires tab as well as Order and export tab.
How to add these files ???
Also plz tell me why should I add these files to run my application.
Thanks..Your help definitely appreciated.
HI,
you have to right click on the code and click organize imports options. If it is giving two options ,select according to your package of component , or you can import both options also it will not matter.
Sorry you dont require to add any jar files in build path in your case , that is required only if you are using some api's like jaxb or jaxp or any other classes you want to use which are not a part of project , mistakenly i mentioned that earlier.
You try to organize imports and even if it doesn't work try closing and opening your project.
Yomesh.
User | Count |
---|---|
88 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.