on 2007 Jul 12 11:38 AM
Hi all,
I have a problem with dropdowns. I am using dropdown by key. When my screen loads, the dropdown gets filled in by some values from bapi. Now, I have got a requirement that I need to add a null value to the dropdown(i.e., there needs to be a empty value which should allowed for selection along with the values from the BAPI.).
How can I do that? Can I add new values to the dropdown which is populating from a BAPI? And if i can do that, how can add a space(or a null value at the top of the list)
Could anyone please help me regarding this?
Regards,
Murthy.
Hi,
Let ur DDKey context variable be DDVAL.
For getting an empty field in DDKey,
IWDAttributeInfo att=wdContext.getNodeInfo().getAttribute(IPrivate<View>.IContextElement.DDVAL);
ISimpleTypeModifiable stm=att.getModifiableSimpleType();
IModifiableSimpleValueSet svs=stm.getSVServices().getModifiableSimpleValueSet();
svs.put(null,null);//Puts Empty value First
//svs.put(null,<SELECT>);//Shows <SELECT> First. Returns null while getting value
for(int i=0;i<masterNode.size();i++)//PUTTING THE REST OF VALUES
{
String id=""+masterNode().getmasterElementAt(i).getId();
String desc=""+masterNode().getmasterElementAt(i).getDescription();
svs.put(id,desc);
}
Regards
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Do you use drop down by key?
If yes, add to the IModifiableSimpleValueSet object something like
svs.put("NO_SELECT","") before you populate it from the BAPI
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
For this you will have to create a value node with the required fields from the BAPI and the new required field. Populate the fields and bind it to the dropdown.
Regards,
Shyam.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
69 | |
13 | |
10 | |
10 | |
9 | |
9 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.