on 02-16-2009 1:40 PM
Hi
i have populated some values(hyderabd,chennai,mumabi..) in to dropdownby key using simple type..now i want to set a default value..to dropdownby key,let default value be chennai.can you please tell how to set the default value.
Thanks
Rahul
Hi Rahul,
If you have created a value attribute say city(of type simple type you have created and enumerated) and binded it to the DropDownByKey UI Element,
then in the doInit() method give the following code,
> wdContext.currentContextElement().setCity("C"); /* if C is the Key for city Chennai in the enumeration simple type , then chennai will be default value .*/
Regards,
Sam Charles J.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
for populating values you provide the values in dic - . simple type .
in the emuneration you provide value and text . EX; value 1 text mumbai
in the init() method
wdcontext.currentcontextelement.set<attr>(1);
Edited by: murali krishna reddy on Feb 17, 2009 8:13 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
to set the default value of your required value write the code as
wdcontext.node<nodename>.setleadselection("2");
Regards,
Shilpa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hii,
Suppose ur dropdown key is bound to node ---city..and value attribute City1..then put this code in wdDoInit() of view as ;
wdContext.nodeCity().currentCity1Element.setCity("Chennai');
so that Chennai will be set as default value.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.