on 06-26-2008 1:06 PM
Dear All,
How to bind a existing simpletype to a dropdownbykey UI element?
I have set of simpletypes created and I want to assign them to dropdownbykey UI element ( statically created). How do I go about it?
Pls help. Can anybody give me sample code for this?
I am writing following code in my wdModifyView method:-
IWDDropDownByKey combs = (IWDDropDownByKey) view.getElement(<UI element ID>);
combs.bindSelectedKey(<simpletypename>);
But it is throwing context exception "Unknown child node"
regards,
Amey
Hi Amey,
First you must create a context attribute of that of simpleType.
e.g. If your context structure is like this:
node -> key (attribute name)
Then change your code like this:
combs.bindSelectedKey("node.key" );
// Context path you have to give there.
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have already created context attribute for these simpletypes.
What I want to do is to assign one of them dynamically to the dropdownbykey !!!
Suppose :-
1. UI element ID of my dropdownbykey is "DropDownByKey2"
2. context attribute : combs1 of type "com.myproject.simpletypes.combsList1"
3. context attribute : combs2 of type "com.myproject.simpletypes.combsList2"
Now depending on some condition, i want my dropdownbykey to have list either combs1 or combs2..
So how do i do that?
regards,
Amey
See ... i have three context value attributes:-
1. context value attribute : combs1 of type "com.myproject.simpletypes.combsList1"
2. context value attribute : combs2 of type "com.myproject.simpletypes.combsList2"
3. context value attribute : combs3 of type "com.myproject.simpletypes.combsList3"
Now my purpose is to bind one of these attributes to a SINGLE dropdownbykey UI Element dynamically !!!
That means initially I am binding combs1 to UI element's 'Selected key" property.
I hope i am explaining you my scenario correctly !!!
regards,
Amey
Hi Amey,
in wdDoModifyView()
IWDDropDownByKey combs = (IWDDropDownByKey) view.getElement("DropDownByKey");
//if condition
combs.bindSelectedKey("combs1");
//else if condition
combs.bindSelectedKey("combs2");
//else
combs.bindSelectedKey("combs3");
Like this you can set your single drop down UI element dynamically.
Regards,
Siva
The "selectedKey" property has to be bound to a context attribute of the DDIC type with value-set.
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.