cancel
Showing results for 
Search instead for 
Did you mean: 

get Allowed Values of a property

Former Member
0 Kudos
48

How can i get Allowed Values os property defined by me in Global Services  Property Metadata  Properties??

Im trying with IService service = ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.PROPERTY_STRUCTURE_SERVICE); but i think its wrong

Any idea?

View Entire Topic
Former Member
0 Kudos

Hi, try this:


IPropertyConfigurationService propConfigService =
	(IPropertyConfigurationService) ResourceFactory
		.getInstance()
		.getServiceFactory()
		.getService("PropertyConfigurationService");
IMetaModel mm = propConfigService.getMetaModel();
IMetaName name = mm.searchByProperty(
	new Property(
		new PropertyName(
			"<property namespace>", 
			"<property id>"
		),
		""
	)
);
IMetaValueListIterator iterator = name.allowedValueIterator();

Former Member
0 Kudos

thanks but i didn´t have IPropertyConfigurationService in the NWDS 2004s SP9 plugins.

Former Member
0 Kudos

I don't follow you here...

What do you mean by that? You can't find the jar file with the class?

Check in the portal folders. Some jar files don't come with the NWDS plugins.

The code I sent you is working in a NW04s SP9.

Former Member
0 Kudos

thank you very much