Author: tchemit Date: 2010-03-18 22:15:02 +0100 (Thu, 18 Mar 2010) New Revision: 1794 Log: notify ui change model validSetp has changed (to relaod Wizard tab accessible) Modified: trunk/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardUtil.java Modified: trunk/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardUtil.java =================================================================== --- trunk/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardUtil.java 2010-03-18 19:40:22 UTC (rev 1793) +++ trunk/jaxx-runtime/src/main/java/jaxx/runtime/swing/wizard/WizardUtil.java 2010-03-18 21:15:02 UTC (rev 1794) @@ -25,6 +25,7 @@ import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.lang.reflect.Array; +import java.util.List; import javax.swing.JTabbedPane; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -99,14 +100,26 @@ return; } if (WizardModel.STEPS_PROPERTY_NAME.equals(propertyName)) { - java.util.List<E> steps = (java.util.List<E>) evt.getNewValue(); - ui.onStepsChanged(steps.toArray((E[]) Array.newInstance(ui.getModel().stepClass, steps.size()))); + List<E> steps = (List<E>) evt.getNewValue(); + ui.onStepsChanged( + steps.toArray((E[]) Array.newInstance( + ui.getModel().stepClass, steps.size())) + ); return; } if (WizardModel.STEP_PROPERTY_NAME.equals(propertyName)) { ui.onStepChanged((E) evt.getNewValue()); return; } + if (WizardModel.VALID_STEP_PROPERTY_NAME.equals(propertyName)) { + Boolean value = (Boolean) evt.getNewValue(); + if (value == null || !value) { + ui.onModelStateChanged(WizardOperationState.NEED_FIX); + } else { + ui.onModelStateChanged(WizardOperationState.PENDING); + } + return; + } if (WizardOperationModel.MODEL_STATE_PROPERTY_NAME.equals(propertyName)) { //TODO should be unicast : only for good stepUI ? ui.onModelStateChanged((WizardOperationState) evt.getNewValue());