cancel
Showing results for 
Search instead for 
Did you mean: 

search for a string ...

former_member215107
Active Participant
0 Kudos

Hi everybody,

I create a variable attribute "Country" in the context and here the code

to display the Search:

-


IWDAttributeInfo attributeInfo =

wdContext.getNodeInfo().getAttribute(IPrivateRodoWSComView.IContextElement.COUNTRY);

ISimpleTypeModifiable countryType = attributeInfo.getModifiableSimpleType();

// Set field label and populate valueset

countryType.setFieldLabel("Couy");

IModifiableSimpleValueSet valueSet =

countryType.getSVServices().getModifiableSimpleValueSet();

for (int i = 0; i < 40; i++) {

valueSet.put("00000000001000000" + i, "Country " + i);

}

// initialize context value attribute 'Country'

wdContext.currentContextElement().setCountry("Key_0");

-


Now, i have not a variable attribute in the context but a model

attribute which comes from a RFC.

How can i rewrite this code ?

Thanks a lot for your help

rewarded points ...

Rodolphe.

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member197348
Active Contributor
0 Kudos

Hi Rodolphe,

The code what you have written is to populate value attribute. so now you want to populate model attribute similarly.

Then your model structure should be like this

Country cardinality 0...n structure - yourstrcutername

key String

value String

IPrivateRodoWSComView.ICountryElement ele;
for (int i = 0; i < 40; i++) {
ele.createICountryElement(new yourstrcutername());
ele.setKey("00000000001000000" + i);
else.setValue( "Country " + i);
wdContext.nodeCountry().addElement(ele);
}

Regards,

Siva

nikhil_bose
Active Contributor
0 Kudos

try binding country attribute from RFC to the Drop down, usually RFC provides value help.

If not, you can go to the component/custom controller and have similar code.

hope you understand,

nikhil