code: @Override
  	public void handleRequest(final Request request) {
  		// A dodgy example of using the unsaved changes flag on the
  		// cancel button.
  		String t1 = textField.getText();
  		String t2 = textArea.getText();
  
  		boolean hasChanges = (t1 != null && t1.length() > 0) || (t2 != null && t2.length() > 0);
  
  		this.cancelBtn.setUnsavedChanges(hasChanges);
  	}
docs: {@inheritDoc}