Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
Hi,
I am unable to see label when I create one action in Parts details page.
Action is there, it is clickable and the link opens. But can not see the label name.
I created CustomAction.java file in actionFramework package
package actionFramework;
import wt.util.resource.*;
@RBUUID("actionFramework.CustomAction")
public class CustomAction extends WTListResourceBundle {
@RBEntry("Open In Google")
public static final String Google_Des = "custom.openInGoogle.description";
}
Solved! Go to Solution.
Hi @Divyanshi
If you change RBInfo file, you always need to restart the system.
Also with deleting a temp files.
You had done something wrong if your "Open in" text disappeared.
if you user RB info define all following sets label, description, tooltip
PetrH
Hi @Divyanshi
Have you restart the server? Or have you used a reload actions?
There is no issue, you just need to set a label in the custom-actions that the name is shown.
I use your config and I don't have any problem with the action
<action name="openInGoogle">
<description>Open In Google</description>
<label>
Open In Google
</label>
<command windowType="popup" url="https://www.google.com/" />
</action>
PetrH
I'm trying this. Hope this time it works for me.
Is my java file correct? Please tell.
Hi @Divyanshi
I can not see any issue.
Try to delete the class and do not use it.
You can set the description in the action.xml file same as the label.
PS> I just copied your config add a label and it works in my system.
PetrH
Hi @Divyanshi
remove resourceBundle="com.ptc.windchill.enterprise.part.partResource">
from the actionmodels element.
PetrH
okay..trying that.
still not there.
Do you want me to delete class file? But then how will I use resource bundle?
Hi @Divyanshi
As I said. you miss the label.
The action is in the menu, but the label is not shown.
So you need to define the label. In XML file as I wrote or in the resource bundle class
@RBEntry("Open In Google")
public static final String OPENINGOOGLE_LABEL = "custom.openInGoogle.label";
PetrH
PS: description is not shown text,
yes I have done same.
But I'm doing both.
custom-actions.xml
Java class file:
As you said I removed resource bundle from action-models:-
Should I change something?
Should I use either xml or class but not both..?
Hi @Divyanshi
XML definition overwrites the class definition.
so it should not mater if you use one or both definitions.
I guess that you did some miss-writing mistake and you can not see it.
If you change the xml you need to reload the xml config
you have two options. Restart the system or use the Reload Action button in customization menu
PetrH
Finally had to restart the system.
But now standard option - "Open in" is missing from the menu. 😓
Hi @Divyanshi
If you change RBInfo file, you always need to restart the system.
Also with deleting a temp files.
You had done something wrong if your "Open in" text disappeared.
if you user RB info define all following sets label, description, tooltip
PetrH
Everything is fine now.
I added resource bundle back into action models element.
Thanks so much for your help 😊. This was pretty urgent for me to deliver.
Now I have to try 3rd level navigation. Hope it works quickly.
PS : If we can do everything through xml configurations, what and when is the use of resource bundle files?
okay...do you know how we can attach label for a new action model?
For example, I want to add a third level navigation like below:-
How can I give label to this? Also, I'm adding under the existing New menu as you can see.
Hi @Divyanshi
Oh this is one of the example where you have to use the RBInfo class
example
acrionModel definition
partResource.class
PetrH
Yes I did that. But something may be missing..I dont know.
custom-actionModels.xml:-
RB file CustomAction.java code:-
package actionFramework;
import wt.util.resource.*;
@RBUUID("actionFramework.CustomAction")
public class CustomAction extends WTListResourceBundle {
@RBEntry("Custom Third Level")
public static final String PRIVATE_CONSTANT_1 = "object.custom_third_level.description";
}
Also, to pick description value ,I modified resourceCustomize.rbInfo as follows:-
actionFramework.CustomAction/object.custom_third_level.description.value=Custom Third Level
This file is found at: <Windchill>/src/wt/util/resource/resourceCustomize.rbInfo
then I executed the below command in windchill shell:-
ant -f bin/tools.xml bundle_custom
I'm not sure if what I'm doing is completely correct or not. So far label is still missing as earlier screenshot.
Please tell me if something is wrong.
I want to reframe that in a better way.
objecty.custom_third_level.description
Can you tell from where does it fetch the value of description..so that that value appears as label..?
Hi @Divyanshi
Use all definitions.
package actionFramework;
import wt.util.resource.*;
@RBUUID("actionFramework.CustomAction")
public class CustomAction extends WTListResourceBundle {
@RBEntry("Custom Third Level")
public static final String THIRDLEVEL_1 = "object.custom_third_level.description";
@RBEntry("Custom Third Level")
public static final String THIRDLEVEL_2 = "object.custom_third_level.label";
@RBEntry("Custom Third Level")
public static final String THIRDLEVEL_3 = "object.custom_third_level.tooltip";
}
PetrH
its still same.
Yes, every time I am restarting.
what is the value of these description, labels? From where does it take?
Is it the value of @RBEntry...like here it is @RBEntry("Custom Third Level")..?
Hi @Divyanshi
The rbInfo class has to have string "RB" in the end of the file name.
After compilation and restart the name is shown.
I also define the resourceBundle in the custom-actionModel.xml
PetrH
Thats a valid point. Thanks so much.
I have restarted my system after making these changes...waiting for the results.
Thanks so much! You're really superb!!
Thanks so much once again! My best wishes to you 🙂
if I'm not wrong this will be called third level navigation right?
Haha I get it.
What could be Third Level Navigations?
I haven't caught your question about Third level Navigation.
Do you mean something like this?
https://uxmovement.com/navigation/the-fastest-navigation-layout-for-a-three-level-menu/
PetrH