cancel
Showing results for 
Search instead for 
Did you mean: 

Metadata extension

Former Member
0 Kudos

Hey all,

I am trying to display the property label from a resource file. I have done the followings.

1. created a service (com.watercorp.bms.bundle.par) with a resource bundle (MyBundle.properties) with key and value pairs (Comment_status=status)

2. deployed the service.

3. Created a metadata extension (watercorp_prop_label)with resource bundle pointing to com.watercorp.bms.bundle.MyBundle

4. Created a property pointing to metadata extension (watercorp_prop_label) and value for "Key for Label" is set to "comment_status"

Now I expect the label for that property to be "status"

But it is still showing "comment_status"

Does anyone have any idea.

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

1. first check that your MyBundle.properties is really deployed on the server (you have to tell to NWDS to deploy also the source codes) somewhere inside this JAR:

<b>\usr\sap\EED\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.watercorp.bms.bundle\srclib.api\com.watercorp.bms.bundleApi.src.jar</b>. Is it here? Continue to second paragraph...

2. Ok - did you restarted the J2EE after deployment? Yes? Continue to third paragraph...

3. Your config seems OK, but one more check doesn't hurt

Still not working? Check the defaultTrace for some logs...

Hope this helps,

Romano

Former Member
0 Kudos

Romano,

Not much luck.

I checked the deployed com.watercorp.bms.bundleApi.src.jar and the property file is there.

I restarted J2EE and could not find any log in the detaultTrace.

Thnank you.

Former Member
0 Kudos

Ok,

Your resourceBundle project is deployed. Is it registered (can you see when deploying that the classloader registered your service)?

public class UtilsWrapper implements IUtilsWrapper {
...
public void init(IServiceContext serviceContext) {
mm_serviceContext = serviceContext;
CrtClassLoaderRegistry.addClassLoader(this.getKey(), this.getClass().getClassLoader());
} 
...

Now check the config:

1. you have created a metadata extension

(watercorp_prop_label) with resource bundle pointing to com.watercorp.bms.bundle.MyBundle (this is the path to your MyBundle file == you can see in your NWDS project the MyBundle.properties file in folder /src.api/com/watercorp/bms/bundle/).

2. in your property definition the <i>'Key for label'</i> is coresponding to the key defined in MyBundle.properties and the <i>'Metadata extension'</i> is <b>watercorp_prop_label</b>

Now you should see your new label (I hope...)

Romano