on 11-05-2005 7:39 AM
Dear friends,
I am using a dropdownbyindex in one of the column in
a table.
What is happening is that--
say for first row I choose some value from the dropdown.
when i choose any other row than what happens is...
All the rows shows the same value of drop down as
selected in Ist row.
Regards,
Arun
Let X be the data source node of the table. Add a subnode Y, cardinality 0:N, singleton=false, with an attribute A of type "string".
Bind the DropDownByIndex.texts property to A. Done.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Armin,
I did as u said.
But got exception while populating the node(used for drop down).
<b>Exception</b>
java.lang.NullPointerException
com.sap.app.wdp.IPrivateBulkUpdationOfOrders$IContextNode<b>.createInvoiceElement</b>(IPrivateBulkUpdationOfOrders.java:483)
at com.sap.app.BulkUpdationOfOrders.wdDoModifyView(BulkUpdationOfOrders.java:163)
at com.sap.app.wdp.InternalBulkUpdationOfOrders.wdDoModifyView(InternalBulkUpdationOfOrders.java:1202)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doModifyView(DelegatingView.java(Compiled Code))
at com.sap.tc.webdynpro.progmodel.view.View.modifyView(View.java(Compiled Code))
... 26 more
regards
Arun
Hi shubham,
<b>CODE OF wdDoModifyView</b>
public static void wdDoModifyView(IPrivateBulkUpdationOfOrders wdThis, IPrivateBulkUpdationOfOrders.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
{
//@@begin wdDoModifyView
String[] letters = new String[] { "SAFEXP", "BLAZE", "FIRST FLIGHT", "FLASH" };
List nodeElements = new ArrayList();
for (int i = 0; i < letters.length; ++i) {
IPrivateBulkUpdationOfOrders.ICourElement courier = wdContext.nodeCour().createCourElement();
courier.setName(letters<i>);
nodeElements.add(courier);
}
wdContext.nodeCour().bind(nodeElements);
wdContext.nodeCour().setLeadSelection(0);
}
<b>THE CONTEXT STRUCTURE</b>
<b>model node output</b>(top node)
model node listorders(binded to datasource of table)
value node cour(having attribute name)
other model attributes of listorders
**node cour has property Singelton = false
cardinality = 0..n
regards
Arun
Hi Arun,
First things first.
As rightly pointed by Armin, wdDoModifyView should be used to dynamically modify the View. So you should move your coding to some other method.
Now coming to your problem.
Your code should look something like this
String[] letters = new String[] { "SAFEXP", "BLAZE", "FIRST FLIGHT", "FLASH" };
List nodeElements = new ArrayList();
IPrivateBulkUpdationOfOrders.ICourElement courier;
IPrivateBulkUpdationOfOrders.IListOrdersElement element;
for(int index=0; index<wdContext.nodeListOrders().size(); index++){
element = wdContext.nodeListOrders().getListOrdersElementAt(index);
for (int i = 0; i < letters.length; i++) {
courier = wdContext.nodeCour().createCourElement();
element.nodeCour().addElement(courier);
courier.setName(letters<i>);
}
}
}
Make sure you have created node elements in your Model Node.
Regards,
Shubham
P.S. I am not sure if you are able to see in the line courier.setName(letters<i>), the "[" i "]" after letters.
Message was edited by: Shubham Tripathi
Message was edited by: Shubham Tripathi
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.