|
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
|
|
From: Peter De B. (JIRA) <no...@at...> - 2007-11-29 15:22:17
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-474?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_28066 ]
Peter De Bruycker commented on RCP-474:
---------------------------------------
It actually works as it should:
in the messages.properties you put:
firstName.icon=firstNameIcon
and in the images.properties:
firstNameIcon=misc/properties.gif
the entry in the messages.properties file is the name of the entry in the images.properties file.
> 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
> Assignee: Peter De Bruycker
>
> 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
|
|
From: Peter De B. (JIRA) <no...@at...> - 2007-11-29 15:22:17
|
[ http://opensource.atlassian.com/projects/spring/browse/RCP-474?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Peter De Bruycker resolved RCP-474.
-----------------------------------
Resolution: Won't Fix
> 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
> Assignee: Peter De Bruycker
>
> 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
|