webMethods and Intelligent Business Operations 10.2 | Designing and Implementing Composite Applications | webMethods CAF and OpenCAF Development Help | User Interface Controls Concepts | Image URLs
 
Image URLs
Image controls that render icons or other images enable configuring the image or icon. Specify the image using an absolute URL or as a relative URL. The relative URL is relative to the root of the web application. The image control assumes any value starting with '/' is an image relative to the portlet application context. The following examples are absolute and relative URLs.
*Absolute URLhttp://www.google.com/images/logo_sm.gif
*Relative URL/myimages/myicon.gif
If you need to produce the image URL independently because some client-side code might dynamically modify the image source, you can produce the URL to an image or any other WAR resource with the following java code:
String url = "/myimages/myicon.gif";
FacesContext context = getFacesContext();
url = context.getApplication().getViewHandler().getResourceURL(context, url);
url = context.getExternalContext().encodeResourceURL(url);
You can automatically replace images with well-known URLs with skinned images.
To make the image URL relative to the My webMethods Server rather than relative to the portlet application context, put fe: at the front of your action link as shown in the following example:
fe:/meta/default/testmws___por1/activePageBean.exportImageButtonaction

Copyright © 2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release