cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Unable to see label of action created in action framework

Divyanshi
7-Bedrock

Unable to see label of action created in action framework

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.

 

DS_10805287_0-1704780942060.png

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";

 

}

 

 

ACCEPTED SOLUTION

Accepted Solutions
HelesicPetr
22-Sapphire I
(To:Divyanshi)

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

View solution in original post

30 REPLIES 30
HelesicPetr
22-Sapphire I
(To:Divyanshi)

Hi @Divyanshi 

Have you restart the server? Or have you used a reload actions? HelesicPetr_1-1704786137262.png

 

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

HelesicPetr_0-1704786078101.png

<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.

HelesicPetr
22-Sapphire I
(To:Divyanshi)

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

HelesicPetr
22-Sapphire I
(To:Divyanshi)

Hi @Divyanshi 

remove resourceBundle="com.ptc.windchill.enterprise.part.partResource">

 from the actionmodels element.

HelesicPetr_0-1704787344301.png

PetrH

okay..trying that.

still not there.

Do you want me to delete class file? But then how will I use resource bundle?

DS_10805287_0-1704787815280.png

 

HelesicPetr
22-Sapphire I
(To:Divyanshi)

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

DS_10805287_0-1704788459866.png

 

Java class file:

DS_10805287_1-1704788514672.png

 

As you said I removed resource bundle from action-models:-

DS_10805287_2-1704788567741.png

 

Should I change something?

Should I use either xml or class but not both..?

 

HelesicPetr
22-Sapphire I
(To:Divyanshi)

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 

HelesicPetr_0-1704789490516.png

 

PetrH 

Finally had to restart the system.

But now standard option - "Open in" is missing from the menu. 😓

Divyanshi_0-1704790634569.png

 

HelesicPetr
22-Sapphire I
(To:Divyanshi)

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. 

Divyanshi_1-1704793154400.png

 

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?

 

HelesicPetr
22-Sapphire I
(To:Divyanshi)

Hi @Divyanshi 

The ResourceBundle files are used for different languages.

PetrH  

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:-

 

Divyanshi_0-1704809704972.png

 

How can I give label to this? Also, I'm adding under the  existing New menu as you can see.

 

HelesicPetr
22-Sapphire I
(To:Divyanshi)

Hi @Divyanshi 

Oh this is one of the example where you have to use the RBInfo class

example

acrionModel definition

HelesicPetr_0-1704809986373.png

partResource.class

HelesicPetr_1-1704810003835.png

 

PetrH

Yes I did that. But something may be missing..I dont know.

 

custom-actionModels.xml:-

Divyanshi_0-1704824726861.png

 

 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..?

HelesicPetr
22-Sapphire I
(To:Divyanshi)

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.

 

Divyanshi_0-1704871575285.png

 

HelesicPetr
22-Sapphire I
(To:Divyanshi)

Hi @Divyanshi 

Have you restarted the system?

It is very important.

PetrH

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")..?

HelesicPetr
22-Sapphire I
(To:Divyanshi)

Hi @Divyanshi 

The rbInfo class has to have string "RB" in the end of the file name.

HelesicPetr_3-1704876454634.png

HelesicPetr_4-1704876507204.png

HelesicPetr_2-1704876442369.png

After compilation and restart the name is shown. 

I also define the resourceBundle in the custom-actionModel.xml

HelesicPetr_1-1704876427377.png

HelesicPetr_0-1704876360973.png

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!!

 

Divyanshi_1-1704879663657.png

 

Thanks so much once again! My best wishes to you 🙂

 

 

 

if I'm not wrong this will be called third level navigation right?

Divyanshi_0-1704884206752.png

 

HelesicPetr
22-Sapphire I
(To:Divyanshi)

Hi @Divyanshi 

I would say that it is second level submenu 😄 

PetrH

Haha I get it.

What could be Third Level Navigations?

HelesicPetr
22-Sapphire I
(To:Divyanshi)

@Divyanshi 

I haven't caught your question about Third level Navigation. 

Do you mean something like this?

HelesicPetr_0-1704892047536.png

 

https://uxmovement.com/navigation/the-fastest-navigation-layout-for-a-three-level-menu/

 

PetrH

Announcements

Top Tags