cancel
Showing results for 
Search instead for 
Did you mean: 

"Value Help" - required in NWDS 2004s

Former Member
0 Kudos

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

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

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