on 08-07-2008 7:33 AM
Hi,
I have a Simple type created in my local dictionary, and i have a drop down whoose value attribute refering to simple type.
Now I have to insert values in the simple type which is already present in Dictionary can anyone help on this.
Hi,
You can do it in two ways...
1. Simply Edit your simple type(Goto Dictionary->Simple Types->Select your Simple Type ->Enumaration->Add)
or
you can add values to the context element using "Simple Value Set" as given below...
//Here gfgfg is your context node with 1:n cardinality and hghgh is your context attribute(of your simple type) which is mapped to the dropdown....
wdContext.currentGfgfgElement().setHghgh("Select");
StringTokenizer keyShare_property =
new StringTokenizer("Alok;Srinivas;Sunil");
StringTokenizer valueShare_property =
new StringTokenizer("Alok;Srinivas;Sunil");
IWDAttributeInfo infoShare_property =
wdContext.nodeGfgfg().getNodeInfo().getAttribute("hghgh");
ISimpleTypeModifiable modShare_property =
infoShare_property.getModifiableSimpleType();
IModifiableSimpleValueSet svsShare_property =
modShare_property.getSVServices().getModifiableSimpleValueSet();
for (int count = 0; keyShare_property.hasMoreTokens(); count++) {
svsShare_property.put(
keyShare_property.nextToken(";"),
valueShare_property.nextToken(";"));
}
Regards,
Srinivas.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Why dont you go for DROP DOWN BY INDEX. its very simple...
create a drop down by index UI element, just map the "texts" property of the UI element to the value attribute ( which is your dictionary simple type)
PradeeP
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.