on 02-20-2008 4:38 PM
Hi,all
How can I get an enumeration value (not a description) of Simple type that I have created?
Regards,
Michael
Michael-
I am not sure if I understood your question. Are you saying that you have created a simple type with some key value pairs and
1. you want to access these values at runtime?
2. you have created a drop down and want to know which key the user has selected
3. do something else
Cheers-
Atul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Michael-
Here is how you do it:
1. Create an attribute of the Simple Type you have created in your controller context.
2. Insert a DropDownByKey in your view.
3. Create a data binding between the attribute and the selectedKey property of the drop down list.
4. To get the key of the selected value use the following code in your controller:
String key = wdContext.currentContextElement().get_AttributeName_();
Where AttributeName is the name of the attribute you have created in step 1.
Cheers-
Atul
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
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.