diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java index b86b424060..c55d62b8db 100644 --- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java +++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java @@ -157,9 +157,15 @@ public class GridFieldVO implements Serializable else if (columnName.equalsIgnoreCase("IsParent")) vo.IsParent = "Y".equals(rs.getString (i)); else if (columnName.equalsIgnoreCase("Description")) - vo.Description = rs.getString (i); + { + String s = rs.getString (i); + vo.Description = s != null ? s.intern() : s; + } else if (columnName.equalsIgnoreCase("Help")) - vo.Help = rs.getString (i); + { + String s = rs.getString (i); + vo.Help = s != null ? s.intern() : s; + } else if (columnName.equalsIgnoreCase("Callout")) vo.Callout = rs.getString (i); else if (columnName.equalsIgnoreCase("AD_Process_ID")) diff --git a/org.adempiere.base/src/org/compiere/model/PO.java b/org.adempiere.base/src/org/compiere/model/PO.java index fb94e0cbb2..d54a4f368a 100644 --- a/org.adempiere.base/src/org/compiere/model/PO.java +++ b/org.adempiere.base/src/org/compiere/model/PO.java @@ -1381,7 +1381,21 @@ public abstract class PO else if (DisplayType.isLOB(dt)) m_oldValues[index] = get_LOB (rs.getObject(columnName)); else if (clazz == String.class) - m_oldValues[index] = decrypt(index, rs.getString(columnName)); + { + String value = (String)decrypt(index, rs.getString(columnName)); + if (value != null) + { + if (get_Table_ID() == I_AD_Column.Table_ID || get_Table_ID() == I_AD_Element.Table_ID + || get_Table_ID() == I_AD_Field.Table_ID) + { + if ("Description".equals(columnName) || "Help".equals(columnName)) + { + value = value.intern(); + } + } + } + m_oldValues[index] = value; + } else m_oldValues[index] = loadSpecial(rs, index); // NULL diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ToolBarButton.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ToolBarButton.java index 799eec3ca0..71eb9838d2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ToolBarButton.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ToolBarButton.java @@ -44,9 +44,10 @@ public class ToolBarButton extends org.zkoss.zul.Toolbarbutton super.setDisabled(disabled); if (disabled) { LayoutUtils.addSclass("disableFilter", this); + this.setSclass(getSclass().intern()); } else { if (this.getSclass() != null && this.getSclass().indexOf("disableFilter") >= 0) - this.setSclass(this.getSclass().replace("disableFilter", "")); + this.setSclass(this.getSclass().replace("disableFilter", "").intern()); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java index 0d4549a2ba..486d0f1076 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditor.java @@ -555,7 +555,8 @@ public abstract class WEditor implements EventListener, PropertyChangeLis public void updateLabelStyle() { if (getLabel() != null) { - getLabel().setStyle( (isZoomable() ? STYLE_ZOOMABLE_LABEL : "") + (isMandatoryStyle() ? STYLE_EMPTY_MANDATORY_LABEL : STYLE_NORMAL_LABEL)); + String style = (isZoomable() ? STYLE_ZOOMABLE_LABEL : "") + (isMandatoryStyle() ? STYLE_EMPTY_MANDATORY_LABEL : STYLE_NORMAL_LABEL); + getLabel().setStyle(style.intern()); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditorPopupMenu.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditorPopupMenu.java index 9cc97cf6c4..740c5bbf30 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditorPopupMenu.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditorPopupMenu.java @@ -154,7 +154,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener { zoomItem = new Menuitem(); zoomItem.setAttribute(EVENT_ATTRIBUTE, ZOOM_EVENT); - zoomItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Zoom"))); + zoomItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Zoom")).intern()); zoomItem.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); zoomItem.addEventListener(Events.ON_CLICK, this); @@ -165,7 +165,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener { requeryItem = new Menuitem(); requeryItem.setAttribute(EVENT_ATTRIBUTE, REQUERY_EVENT); - requeryItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh"))); + requeryItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh")).intern()); requeryItem.setImage(ThemeManager.getThemeResource("images/Refresh16.png")); requeryItem.addEventListener(Events.ON_CLICK, this); this.appendChild(requeryItem); @@ -175,7 +175,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener { prefItem = new Menuitem(); prefItem.setAttribute(EVENT_ATTRIBUTE, PREFERENCE_EVENT); - prefItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "ValuePreference"))); + prefItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "ValuePreference")).intern()); prefItem.setImage(ThemeManager.getThemeResource("images/VPreference16.png")); prefItem.addEventListener(Events.ON_CLICK, this); this.appendChild(prefItem); @@ -185,7 +185,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener { newItem = new Menuitem(); newItem.setAttribute(EVENT_ATTRIBUTE, NEW_EVENT); - newItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "New"))); + newItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "New")).intern()); newItem.setImage(ThemeManager.getThemeResource("images/New16.png")); newItem.addEventListener(Events.ON_CLICK, this); this.appendChild(newItem); @@ -196,7 +196,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener { updateItem = new Menuitem(); updateItem.setAttribute(EVENT_ATTRIBUTE, UPDATE_EVENT); - updateItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Update"))); + updateItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Update")).intern()); updateItem.setImage(ThemeManager.getThemeResource("images/InfoBPartner16.png")); updateItem.addEventListener(Events.ON_CLICK, this); this.appendChild(updateItem); @@ -206,7 +206,7 @@ public class WEditorPopupMenu extends Menupopup implements EventListener { showLocationItem = new Menuitem(); showLocationItem.setAttribute(EVENT_ATTRIBUTE, SHOWLOCATION_EVENT); - showLocationItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "ShowLocation"))); + showLocationItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "ShowLocation")).intern()); showLocationItem.setImage(ThemeManager.getThemeResource("images/InfoBPartner16.png")); showLocationItem.addEventListener(Events.ON_CLICK, this); this.appendChild(showLocationItem); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java index a9c64bd5a2..e9adc95ad6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java @@ -121,7 +121,10 @@ public final class ThemeManager { * @return full resource url */ public static String getThemeResource(String name) { - String theme = getTheme(); - return ITheme.THEME_PATH_PREFIX + theme + "/" + name; + StringBuilder builder = new StringBuilder(ITheme.THEME_PATH_PREFIX); + builder.append(getTheme()); + builder.append("/").append(name); + String url = builder.toString().intern(); + return url; } }