|
From: Pablo D. (JIRA) <no...@at...> - 2007-05-27 22:35:29
|
MessageSourceFieldFaceSource.loadFieldFace(String field, String contextId) fails to load icons
-----------------------------------------------------------------------------------------------
Key: RCP-474
URL: http://opensource.atlassian.com/projects/spring/browse/RCP-474
Project: Spring Framework Rich Client Project
Issue Type: Bug
Components: Application Framework
Reporter: Pablo Depietri
MessageSourceFieldFaceSource.loadFieldFace(String field, String contextId) does not load icons properly.
It uses the folowing code to load the icon:
String iconName = getMessage(contextId, field, ICON_PROPERTY, null);
Icon icon = null;
if (iconName != null) {
icon = getIconSource().getIcon(iconName);
}
By using getMessage(), iconName ends up with the icon path instead of the icon key, which is needed to load an icon from IconSource.
The code should try to load icons using the key names as follows:
Icon icon = null;
String[] iconKeys = getMessageKeys(contextId, field, ICON_PROPERTY);
for (int i = 0; i < iconKeys.length; i++) {
icon = getIconSource().getIcon(iconKeys[i]);
if (icon != null) {
break;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/spring/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|