on 04-30-2010 1:12 PM
Hi,
I have created a simple type dureeProlongation with enumeration values:
- value: p1 -> description: duree1
- value: p2 -> description: duree2
- value: p3 -> description: duree3
I would like to retreive the key text when the user selects one entry. For example if the user click on the second radio button, then I would like to be able to store the description entry in a String.
Right now I am only able to retreive the selected radio button value, not the description text.
I am using:
IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
String value1 = wdContext.currentContextElement().getDureeProlongation();
String value2 = textAccessor.getText(wdContext.currentContextElement().getDureeProlongation());
value 1 = p2 and value 2 = message.p2
What should I do to get the description message and store it in value1 or value2 ?
Thanks in advance for your help.
Thibault
Hi Thibault,
You can get the discription by this way.
String value1 = wdContext.currentContextElement().getDureeProlongation();
IWDAttributeInfo attInfo = wdContext.getNodeInfo().getAttribute("dureeProlongation");
ISimpleValueSet valueset = attInfo.getModifiableSimpleType().getSVServices().getValues();
if(valueset.containsKey(value1)){
String value2 = valueset.getText(value1);
}
Regards
Ravindra
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Thibault,
I think you can get the Description via the ModifiableSimpleType of the context node.
But that is just a wild guess.
Kind regards,
Matthias
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.