Skip to main content
1-Visitor
February 10, 2014
Solved

How to configure action icon by resource bundle

  • February 10, 2014
  • 3 replies
  • 2473 views

Hi.

I need configure action icon using my resourceBundle file (extends WTListResourceBundle).

Code example:

@RBEntry("my_img_folder/action_icon.png")

public static final String MY_ACTION_ICON = "myObjectType.myActionName.icon";

"my_img_folder" is located in codebase/netmarkets/images.

But i cann't see icon in action menu.

My resourceBundle file works, because if i specify any other icon from netmarkets/images, i can see it in action menu.

What am i doing wrong or maybe forgot to do?

Thanks.

Best answer by VasiliyRepecki

I found a solution in Help Center. Сhapter "Defining Menus -> Displaying Actions -> Trouble Shooting"

Icons for some actions are missing

To follow UI standards, the action service is designed to only show the icons in the actions menu if those icons also appear in some toolbar anywhere in the system. If you need to workaround this for some action that doesn’t belong in any toolbar, you could create a dummy model with your action such as:
<model name=toolbarModelNotUsedAnywhere> <action name=myActiontype=myActionType/> </model>
Then the action service will show the icon defined for that action in the actions menu.

Caution: in my case this model exists already at NetMarkets-actionmodels

3 replies

12-Amethyst
February 10, 2014

Hello,

Check the format and dimension of your image which you have pasted inside netmarkets/images. Windchill is taking only the images which have 16X16 dimension and .gif format.

1-Visitor
February 10, 2014

I tried with this conditons (gif and 16x16). Does not work.

Maybe it necessary register my_img_folder in some way?

VasiliyRepecki1-VisitorAuthorAnswer
1-Visitor
February 27, 2014

I found a solution in Help Center. Сhapter "Defining Menus -> Displaying Actions -> Trouble Shooting"

Icons for some actions are missing

To follow UI standards, the action service is designed to only show the icons in the actions menu if those icons also appear in some toolbar anywhere in the system. If you need to workaround this for some action that doesn’t belong in any toolbar, you could create a dummy model with your action such as:
<model name=toolbarModelNotUsedAnywhere> <action name=myActiontype=myActionType/> </model>
Then the action service will show the icon defined for that action in the actions menu.

Caution: in my case this model exists already at NetMarkets-actionmodels