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 a40c4fb50d..dd049b10ea 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 @@ -559,12 +559,17 @@ public abstract class WEditor implements EventListener, PropertyChangeLis } } - public void updateStyle() { - applyLabelStyles(); - applyFieldStyles(); + public void updateStyle(boolean applyDictionaryStyle) { + applyLabelStyles(applyDictionaryStyle); + applyFieldStyles(applyDictionaryStyle); } - protected void applyLabelStyles() { + public void updateStyle() { + applyLabelStyles(true); + applyFieldStyles(true); + } + + protected void applyLabelStyles(boolean applyDictionaryStyle) { if (label != null) { boolean zoomable = isZoomable(); String style = (zoomable ? STYLE_ZOOMABLE_LABEL : "") + (isMandatoryStyle() ? STYLE_EMPTY_MANDATORY_LABEL : STYLE_NORMAL_LABEL); @@ -573,7 +578,7 @@ public abstract class WEditor implements EventListener, PropertyChangeLis style = style + STYLE_MOBILE_ZOOMABLE; } } - if (gridField.getAD_LabelStyle_ID() > 0) + if (applyDictionaryStyle && gridField.getAD_LabelStyle_ID() > 0) { String s = buildStyle(gridField.getAD_LabelStyle_ID()); if (!Util.isEmpty(s)) { @@ -593,12 +598,13 @@ public abstract class WEditor implements EventListener, PropertyChangeLis label.setStyle(style); } - protected void applyFieldStyles() { - if (gridField.getAD_FieldStyle_ID() > 0) + protected void applyFieldStyles(boolean applyDictionaryStyle) { + String style = null; + if (applyDictionaryStyle && gridField.getAD_FieldStyle_ID() > 0) { - String style = buildStyle(gridField.getAD_FieldStyle_ID()); - setFieldStyle(style); + style = buildStyle(gridField.getAD_FieldStyle_ID()); } + setFieldStyle(style); } protected void setFieldStyle(String style) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index efdabf830b..ed466c4efd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -1093,6 +1093,7 @@ public class FindWindow extends Window implements EventListener, ValueCha editor.setMandatory(false); editor.setReadWrite(true); editor.dynamicDisplay(); + editor.updateStyle(false); editor.addValueChangeListener(this); Label label = editor.getLabel(); Component fieldEditor = editor.getComponent(); @@ -1111,6 +1112,7 @@ public class FindWindow extends Window implements EventListener, ValueCha editorTo.setMandatory(false); editorTo.setReadWrite(true); editorTo.dynamicDisplay(); + editorTo.updateStyle(false); editorTo.addValueChangeListener(this); // if (displayLength > 0) // set it back @@ -1146,6 +1148,7 @@ public class FindWindow extends Window implements EventListener, ValueCha m_sEditorsFlag.add(null); m_sEditorsTo.add(null); editor.fillHorizontal(); + editor.updateStyle(false); } panel.appendChild(new Space()); if (group != null) @@ -2010,6 +2013,7 @@ public class FindWindow extends Window implements EventListener, ValueCha editor.setReadWrite(enabled); editor.setVisible(enabled); editor.dynamicDisplay(); + editor.updateStyle(false); if (editor instanceof WPaymentEditor) { ((WPaymentEditor)editor).getComponent().setEnabled(true, false); }