on 04-26-2010 8:14 PM
Hi ,
I am using dropdown by key in a application.we have a bank type drop down which shows blank when we enter to the page on dropping down shows 2values in it , scenario is on creation of new bank account it should show 2values on dropping down and on editing the existing record it should the type of account created by default(on entering page) should be a drop down.
And data to be cleared on navigaton between create and edit.
please help me solving the issue .
-
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Shrushti.
At design time you want to have 2 default values for the drop down and in the runtime you want to manipulate this values and replace with new one.
At run time you can fill dropdown by new values, for this you have to create elements for the node you are using for the drop down.
Please refer the below sample code:-
ISimpleType simpleType = wdContext .nodeProjEstiTable().getNodeInfo().getAttribute("projphasname") .getModifiableSimpleType();
IModifiableSimpleValueSet svs1 =simpleType.getSVServices().getModifiableSimpleValueSet();
svs1.clear();
for (int j = 0; j < projphasname.length; j++) {
svs1.put(projphasname[j][1], projphasname[j][1]);
}
Mean while for data to be cleared on navigation between create and edit. , you can invalidate context node you haev created for the drop down based on the logic you have created for create and edit like :-wdcontext.<nodename>.invalidate();.
Be careful once you will use this line data will be gone.
Hope this may help you.
Deepak!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Shrushti,
values in drop down are coming from BAPI , changes depepnding on bank type--->after getting values you have to write your logic as per bank type.
The code which i have posted earlier was related how to add/fill values in the drop down via code. You can utilize this code.
Deepak!!!
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.