Project

General

Profile

« Previous | Next » 

Revision 41f187f1

Added by Patrick Plitzner over 7 years ago

ref #5458 Validation for settings dialogs

View differences:

src/main/java/eu/etaxonomy/cdm/vaadin/view/dbstatus/AbstractSettingsDialogWindow.java
55 55
	    window.setContent(mainLayout);
56 56
	    return window;
57 57
	}
58
	
59
	/**
60
	 * Update OK/Cancel button depending on {@link #isValid()}
61
	 */
62
	protected void updateButtons(){
63
		okButton.setEnabled(isValid());
64
	}
65
	
66
	/**
67
	 * Evaluates if this dialog has all necessary values set in 
68
	 * a correct state
69
	 * @return <code>true</code> if the status of this dialog is valid
70
	 */
71
	protected abstract boolean isValid();
58 72

  
59 73
}

Also available in: Unified diff