on 05-10-2007 10:02 AM
Dear programmers,
I'm pretty new with the whole SAP NetWeaver stuff, but it's really cool.
How is it possible to add items in a dropdownbykey element?
I've made a context "ProjectSelection", but when I try to fill the context it doesn't appear in the drop down box.
How to solve this?
Regards,
Adri
Hai,
If you wan to display static data better to use DD Key, If you are retrieveing dynamica data better to Use DDByIndex.
If you want to show static data like Colors=REd,Blue,Green. create Simple type Of color, goto Enumeartion Tab enter Key Value Pairs like R=RED,etc.
create context attribute color of type color simpletype.
assign to DDKey value.
If you want to show dynamic data in DDIndex
Create a ContextNode -node--under node create attribute value
//get some data
for(int i=0;i<size;i++){
IprivateXXView.INodeElemen=wdcontext.createNodeelement();
ele.setValue(someVlue);
wdContext.nodeNode().addelement(ele);
}
Regards,
Naga
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nags and Abhijeet,
I have n't explored more into this error which happened in EP6 SP15. Now i am tested with SP16 and its working fine.
Thanks for your assistance.
I am awarding the points to both of you.
Sekar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hm, that's much better, tnkx!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've found it on my own.
The solution:
IWDDropDownByKey ddKey = (IWDDropDownByKey)view.getElement("..");
ddKey.setSelectedKey("...");
The code should be placed in the method "wdDoModifyView".
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it possible to assign a 'selected' value to the dropdown box?
I tried:
wdContext.nodeProjectSelection().setSelected(0, true);
But that doesn't work. Some ideas?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great!!
Thanks for the replies, I've add some points.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
1)goto Dictionary->Local Dctionay->Data Type->Right click Simple Type and say create new, say SimpType
2)on Enumeration tab, add some new values and description to your simple type,
3)create a context attribute say Ctx and set its datatype as a SimpleType created in last step ie. SimpType(for this you need to click on search icon button against its datatype property)
4)Once you are done with this , create a dropdownbykey UI element and bind it to the context attribute whose type is simpletype
build , deploy and run the application, it will give you what you want.
regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Adri,
You can create a simple type dictionary element add the values in the enumeration and make a context attribute of this simple type element and bind it to DropDownByKey UI element.
Regards
Sid
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In order to populate the dropdown, do the follwoing:
Create a simpletype ,say 'elements', in Webdynpro Explorer under the node Dictionaries --> Local Dictionary --> Data types -- >simpleTypes.
Now open the simpletype by double clicking it. In the Enumeration tab, enter the values that you want to add in the dropdown, by pressing the 'New' button. The Enumeration is a key-value pair.
Now Create a value attribute in the context and set its data type to the simpletype u just created. Then, bind the dropdown UI with this simpletype! That's it.
Regards,
M.Subathra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.