cancel
Showing results for 
Search instead for 
Did you mean: 

inserting values in simple type which is already present in Dictionary

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

srinivas_sistu
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

Thanks,

Problem solved

Answers (1)

Answers (1)

PradeepBondla
Active Contributor
0 Kudos

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