on 01-02-2015 5:46 AM
Hi Experts,
How to remove duplicate entries from dropdownlist in web dynpro java? Can someone please help me
I have maintained the data in the z table wherein the records of particular fields are repeated but when i show that record in the Web Dynpro application dropdown list, the user should only be able to view the unique data for selection of that particular field.
Hi Preetam,
removing duplication entries from drop down list - here you can do one thing concatenate key with description and display the same , so that dropdown list wil have unique values .
Regards
Govardan Raj S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi preetam ,
in the drop down list if it is dropdown by key UI element , then we have key-description pari values and as shown below
IWDAttributeInfo *******Modeattrinfo = wdContext.nodeChn*****InputNode().getNodeInfo().getAttribute(IPublic******Comp.IChn*****InputNodeElement.*****_MODE);
ISimpleTypeModifiable *******ModeModifiableSimpletype = *******Modeattrinfo.getModifiableSimpleType();
IModifiableSimpleValueSet *******ModeSimpleValueSet = *******ModeModifiableSimpletype.getSVServices().getModifiableSimpleValueSet();
*******ModeSimpleValueSet.clear();
*******ModeSimpleValueSet.put(M******thConstant.KEY_VALUE,M******thConstant.KEY_VALUE+
"-"+M*******hConstant.DESC);
here in the value set you can see that we are concatenating the description along with the key and key value is unique always.
can u please specifiy what UI element you are using , like Drop down by index or drop down by key and in the ui which feild fo the z table you are displaying ......?
if the records the z table are repeated , then in the table there should be a key attribute , try to concatenate that with the field displayed in the Drop down list UI elelment of your screen so that end user can identify that.
Regards
Govardan Raj
Hi Govardan,
I am using Drop Down by index as the UI element. following is somethingsimilar to the ztable:-
A B C
11256 VID 911256
11256 VID 811256
11256 SONY 11256
'A' field is the primary key. We are fetching all the 'B' fields in the dropdownlist for every 'C' field i.e corresponding to every 'C' field. But we want only unique values in dropdown.
Request your help on this.
Thanks,
Preetam Narkhede
hi preetam ,
as you have specified that A feild is primary key , in that case how come it is having repeated values i.e 11256 in all three rows ?
and here
We are fetching all the 'B' fields in the dropdownlist for every 'C' field i.e corresponding to every 'C' field
Can you please explain the above for every c feild , it is not clear to me ...
Regards
Govardan Raj S
Hi Govardan,
I am sorry i made a mistake. You are right 'A' field is not the primary key. We just need to fetch all the 'B' fields. As i have shown in the table, the VID value is fetched twice in the dropdown because there corresponding 'C' fileds are different.
I want that, in the dropdownlist these values should not be repeated.
HI Preetam,
i understand that data is in z table , but on executing the rfc you are getting this data in model node and then from model node you set the contents to the local node which is binded to the drop down by index UI element , while setting contents from model node to local node concatenate the values of b feild and c feild and set it to the same attribute to which you were setting the value of b .
still you have doubts please post will help you out ... further in detail with screen shots need not worry as you are new to this
Regards
Govardan Raj S
why not fix it at source?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check if you can apply java logic to find unique values in the ztable results, before setting it as a reference for Drop Down list.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
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.