on 01-20-2010 10:43 AM
I have implemented value help in my application using the following code sample using NWDS2004s
// Access interface ISimpleTypeModifiable for modifying the attribute's datatype
IWDAttributeInfo attributeInfo =
wdContext.getNodeInfo().getAttribute(IPrivateMain.IContextElement.COUNTRY);
ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();
// Set field label and populate valueset
countryType.setFieldLabel("Country");
IModifiableSimpleValueSet valueSet =
countryType.getSVServices().getModifiableSimpleValueSet();
for (int i = 0; i < 40; i++){
valueSet.put("Key_"i,"Country "i);
}
// initialize context value attribute 'Country'
wdContext.currentContextElement().setCountry("Key_0");
In my Country input field I am getting only the KEY field value when I am selection a row from help. But my requirment is to get KEY and Description both in my input field like "Key_1:Country1" when I will select a row from help.
Can you please help me how can I get that.
Thanks in advance
Biplab
Hi,
You just have to modify your filling the SimpleType code.
Use the following in place of your for loop:
for (int i = 0; i < 40; i++){
valueSet.put("Key_"+i,"Key_"+i+":"+"Country "+i);
}
Hope it helps.
Cheers!!!
Manoj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
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.