on 12-06-2007 5:14 PM
Hi everyone,
Is it possible to re-use image file stored in the mimes folder of a component in a DC from another DC ? If it is possible, how do we access the image?
Thanks,
Johannes
Did you find any way to share the mime files between diferents DC's?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
This is part of the code I use here in one Project.
public java.lang.String getBitmapURLByIconId( java.lang.String iconId, java.util.Map iconMap )
{
//@@begin getBitmapURLByIconId()
String bitmapByIconId = getBitmapByIconId(iconId, iconMap);
if (null == bitmapByIconId) // Not a Valid Icon..
return "";
WDDeployableObjectPart deployableObjectPart = wdComponentAPI.getDeployableObjectPart();
try {
IWDWebResource webResource = WDWebResource.getWebResource(deployableObjectPart, WDWebResourceType.PNG, bitmapByIconId);
return webResource.getAbsoluteURL();
}
catch (Exception ex) {
wdComponentAPI.getMessageManager().reportException("Error Loading Icon '" + bitmapByIconId + "', " + ex.getMessage(), true);
return "";
}
//@@end
}
In particular, we drive some configuration for Icons / Tooltips from the back-end. The variable "bitmapByIconId" will be populated with whatever Icon name I want to get. What you should look at is basically the IWDWebResource part, don't bother with the rest of the code..
This is part of a DC and I expose some methods in its Interface Controller so I can re-use the same pictures everywhere.
Hope it helps,
Daniel
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.