Java源码示例:com.vaadin.data.fieldgroup.FieldGroup.CommitException

示例1
private void initializeButtons() {
	this.saveButton.addClickListener(new ClickListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void buttonClick(ClickEvent event) {
			try {
				fieldGroup.commit();
				self.isSaved = true;
				self.close();
			} catch (CommitException e) {
				e.printStackTrace();
			}
		}
		
	});
}
 
示例2
@Override
public void commit() throws CommitException
{
    fieldGroup.commit();        
    for (IModuleConfigForm form: allForms)
        form.commit();
}
 
示例3
@Override
public void buttonClick(ClickEvent event) {
	try {
		binder.commit();
		
		Account account = binder.getItemDataSource().getBean();
		mvpPresenterHandlers.tryCreateAccount(account);
		
	} catch (CommitException e) {
		username.setValidationVisible(true);
		password.setValidationVisible(true);
		firstName.setValidationVisible(true);
		lastName.setValidationVisible(true);			
	} 		
}
 
示例4
protected void initializeButtons() {
	this.grid.setComponentAlignment(this.buttonSave, Alignment.BOTTOM_CENTER);
	this.buttonSave.setImmediate(true);
	this.buttonSave.setEnabled(false);
	this.buttonSave.addClickListener(new ClickListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void buttonClick(ClickEvent event) {
			try {
				//
				// Commit changes
				//
				self.fieldGroup.commit();
				//
				// Save
				//
				self.isSaved = true;
				//
				// We can close
				//
				self.close();
			} catch (CommitException e) {
				logger.warn("Couldn't commit, the save button should NOT be enabled.");
			}
		}			
	});
}
 
示例5
protected void initializeButtons() {
	this.grid.setComponentAlignment(this.buttonSave, Alignment.BOTTOM_CENTER);
	this.buttonSave.setImmediate(true);
	this.buttonSave.setEnabled(false);
	this.buttonSave.addClickListener(new ClickListener() {
		private static final long serialVersionUID = 1L;

		@Override
		public void buttonClick(ClickEvent event) {
			try {
				//
				// Commit changes
				//
				self.fieldGroup.commit();
				//
				// Save
				//
				self.isSaved = true;
				//
				// We can close
				//
				self.close();
			} catch (CommitException e) {
				logger.warn("Couldn't commit, the save button should NOT be enabled.");
			}
		}			
	});
}
 
示例6
/**
 * Commit all changes made in the UI values to the underlying bean object
 * @throws CommitException if data cannot be committed
 */
public void commit() throws CommitException;