cancel
Showing results for 
Search instead for 
Did you mean: 

custom meta-data property

Former Member
0 Kudos

Hi all,

I am trying to create a custom meta-data property.

I have followed the

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/knowledge management and collaboration developers guide.html >>>>

<b>Implementing a Metadata Extension for KMC Properties</b>

My ResourceBundle file has following values:

	label.key1=value1
	label.key2=value2
	label.key3=value3
	label.key4=value4

In System Config > Content Mgt > Global services >> Property Metadata >>>>

i created a metadata extension using a dropdown .. later, i created a property too..

Meta-data property details:

	<i>propertyId</i>=myTest_property
	Group=default
	Metadata Extension=Test_Dropdown_MetadataExtension

Metadata Extension details:

	Bundle File: com.sap.km.ui.provider.SimpleDynamicValueProvider
	Dynamic Values Class:  com.sap.km.ui.provider.SimpleDynamicValueProvider

The values in the dropdown are coming as <<i>propertyId</i>>.key1, <<i>propertyId</i>>.key2, <<i>propertyId</i>>.key3 ..etc.. instead of coming as value1,value2,value3,value4.

why is this so ?

Also, if i want to have a property with text field.. what changes should i do?

Please help me..Awaiting your reply.

Regards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

did you fill the Allowed values property on the metadata property? This should be filled with label.key1,label.key2....

I never use the dynamic value class, so I guess you could leave this field empty.

If you want a simple string property, you should leave the Allowed values property blank.

And finally be sure that the name of your bundle file is the one you set in the metadaextension as Bundle file.

Hope it helps.

Gregori Coll Ingles.

Former Member
0 Kudos

Hi,

did you set the "key for label" property in the property-definition? You need to put in the label key in order to map the bundle file with the property.

Regards, Eik Sunke

Former Member
0 Kudos

Hi Eik,All,

Thanks for the reply.

For ex: My ResourceBundle file has following values (as in the link given in my previous post):

value.lbl.SampleProperty.techKey.0=(default value)
value.lbl.SampleProperty.techKey.1=Value 1
value.lbl.SampleProperty.techKey.2=Value 2
value.lbl.SampleProperty.techKey.3=Value 3
value.lbl.SampleProperty.techKey.4=Value 4
value.lbl.SampleProperty.techKey.5=Value 5
value.lbl.SampleProperty.techKey.6=Value 6
value.lbl.SampleProperty.techKey.7=Value 7
value.lbl.SampleProperty.techKey.8=Value 8
value.lbl.SampleProperty.techKey.9=Value 9

& my <i>Property Id =myTest_dropdown</i>

The values in the dropdown are coming as


myTest_dropdown.techKey0
myTest_dropdown.techKey1
myTest_dropdown.techKey2
..
..
myTest_dropdown.techKey9

Can you please tell me what value should i given in "<b>key for label</b>" field??

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Hi Gregori,
	Thanks for the reply. 
	I have left the "Allowed Values" field empty as i am going to bring those values from my JAVA class.

Awaiting your reply.

Regards,

SK.

Former Member
0 Kudos

HI,

I was wrong didn't know you where talking about using a java class.

May be you have something wrong in the getValueLabel method on your class. What you could do is to set in the resource bundle the labels as myTest_dropdown.techKey.0....

I guess that something is wrong when you get the first part of the lables on the resource bundle file.

Hope it helps.

Gregori Coll Ingles.

Former Member
0 Kudos

Hi Gregori,All,

i have taken the sample project file from SDN:

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/kmc/knowledge management and collaboration developers guide.html >>>>

<b>Implementing a Metadata Extension for KMC Properties </b>

Also, when I change the metadata extension to return different values, the dropdown for the property does not update to the new values. Is there come caching going on here??? Any idea?

Regards,

Sk.

Former Member
0 Kudos

I know what you are using, that's why I told you that you probably needed to do some modifications when getting the diferent labels.

About the cache, I have no idea, if your are in a test environment it would be good to reboot the system. This is not allways posible depending on the users connected.

Please re-read the java code and try to find any error or posible misspeling.

best regards,

Gregori Coll Ingles.