on 08-22-2008 4:21 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.