cancel
Showing results for 
Search instead for 
Did you mean: 

How to access Dictionary SimpleTypes in View's code??

Amey-Mogare
Contributor
0 Kudos

Hello All,

I want to access the description corresponding to a 'Value' of a dictionary SimpleType. How do I achieve this?

Please help me.

regards,

Amey

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

ISimpleTypeModifiable modifiable = wdContext.getNodeInfo().getAttribute("Your Attribute").getModifiableSimpleType();
	  modifiable.hasSVService()
	  ISimpleValueServices simpleValueServices = modifiable.getSVServices();
	  IModifiableSimpleValueSet simpleValueSet = simpleValueServices.getModifiableSimpleValueSet();
	  
	  for(int x=0; x<10;x++)
	  {
		  simpleValueSet.put(String.valueOf(x), String.valueOf(x));
	  }

Use get and put methods to insert and retrieve values to/from simple type.

Regards

Vinod V

Amey-Mogare
Contributor
0 Kudos

Thank you very much Vinod. That solved my problem.

regards,

Amey

Answers (2)

Answers (2)

Former Member
0 Kudos

ISimpleTypeModifiable xxxx =

wdThis.wdGetAPI().getContext().getModifiableTypeOf("Context");

IModifiableSimpleValueSet aaaa=

countryType.getSVServices().getModifiableSimpleValueSet();

This context shud be a simple type

PradeepBondla
Active Contributor
0 Kudos

Hi,

create a attribute in context node which should be mapped to the dictionary simple type.

this way you can access.

regards,

Pradeep