Using system skinnable icons

Is there a way to use the default system icons on a CommandIcon so that it not only matches the default appearance of the system but also changes when the system skin is changed?

If I use fe:/ui/skins/wm_skin_pearls/images/.gif on the Icon URL I have the default icon on the MwM Preview Server but on the real MwMS it stays the same, even when the skin is different.

The system icon buttons all exhibit images which change according to the user’s skin.

I want to unsure visual consistency on all the application and this is very important for that effect.

Thank you.

If your image path starts with /skin/ then CAF will attempt to render the equivalent image from the current skin.

for example:

/skin/images/Icon_Help.gif

It works. Thank you.

Unfortunately it does not show up in the Designer, only on the server (Preview or remote).

Is there a list of available icons or is it just safe to peek into the installed skins in the Designer?

You can place a fallback image under the WebContent/skin/images folder of your portlet application that designer will use to draw the image during design-time.

Actually, the way the runtime resolves the skin image is that it first checks if the current skin contains the requested image. If the skin has the image then it will use it. If the skin doesn’t have the image, it will fallback to an image at the same path inside your portlet application. So it is a good idea to always have a copy of the image in your portlet application as a fallback just in case.

I don’t believe there is a documented list of images in the provided skins. You could look at the Images tab in the skin editor portlet to see what images are available for a specific skin.