Skip to Content
0
Former Member
Mar 30, 2006 at 08:45 PM

Retrieving Allowed Values of a property.

19 Views

Hi,

I created a custom property and have like 5 or 6 values assigned to it.

From the API, as mentioned below, I could only find a way to get these values if they are set to a resource and if the property is a multi-valued.

String namespace = "http://com.sap.netweaver.bc.rf.sample/xmlns/sample";

String name = "property";

IPropertyName propertyName = new PropertyName(namespace, name);

IProperty property = resource.getProperty(propertyName);

if( property.isMultivalued() ) {

// property is multi valued

List values = property.getValues();

...........................

If the property is not Multi-Valued and not set to a resource, is there any way to retrieve all the "Allowed Values" for that particular property.

I appreciate if anyone can throw some light on it.

Thanks,

Ravi.