diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java index 6ad7a36747..bb5eaf4ec7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADTabpanel.java @@ -668,11 +668,6 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer collapsedGroups.add(group); } - for (WEditor comp : editors) - { - comp.updateLabelStyle(); - } - // Selective if (col > 0) { @@ -683,7 +678,12 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer + columnName + " - Dependents=" + dependants.size()); if ( ! ( dependants.size() > 0 || changedField.getCallout().length() > 0 - || Core.findCallout(gridTab.getTableName(), columnName).size() > 0)) { + || Core.findCallout(gridTab.getTableName(), columnName).size() > 0)) + { + for (WEditor comp : editors) + { + comp.updateLabelStyle(); + } return; } } @@ -719,6 +719,7 @@ DataStatusListener, IADTabpanel, IdSpace, IFieldEditorContainer comp.setVisible(false); } } + comp.updateLabelStyle(); } // all components //hide row if all editor within the row is invisible diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java index a294ba81f6..f6f11701e3 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/ProcessParameterPanel.java @@ -101,6 +101,7 @@ public class ProcessParameterPanel extends Panel implements this.width = width; // initComponent(); + addEventListener("onDynamicDisplay", this); } // ProcessParameterPanel private void initComponent() { @@ -566,6 +567,9 @@ public class ProcessParameterPanel extends Panel implements } } } + else if (event.getName().equals("onDynamicDisplay")) { + dynamicDisplay(); + } } /** @@ -623,7 +627,7 @@ public class ProcessParameterPanel extends Panel implements else Env.setContext(Env.getCtx(), m_WindowNo, name, value.toString()); - dynamicDisplay(); + Events.postEvent("onDynamicDisplay", this, (Object)null); } private void dynamicDisplay() { @@ -653,6 +657,7 @@ public class ProcessParameterPanel extends Panel implements m_wEditors2.get(i).setVisible(false); } } + editor.setMandatory(mField.isMandatory(true)); editor.updateLabelStyle(); } } 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 e47d057e3d..7170157386 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 @@ -459,9 +459,14 @@ public abstract class WEditor implements EventListener, PropertyChangeLis */ public void setMandatory (boolean mandatory) { - this.mandatory = mandatory; - if (label != null) - label.setMandatory(mandatory); + if (this.mandatory != mandatory) + { + this.mandatory = mandatory; + if (label != null) + { + label.setMandatory(mandatory); + } + } } /**