当前位置: 首页>>代码示例>>Java>>正文


Java Events.ON_CLOSE属性代码示例

本文整理汇总了Java中org.zkoss.zk.ui.event.Events.ON_CLOSE属性的典型用法代码示例。如果您正苦于以下问题:Java Events.ON_CLOSE属性的具体用法?Java Events.ON_CLOSE怎么用?Java Events.ON_CLOSE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.zkoss.zk.ui.event.Events的用法示例。


在下文中一共展示了Events.ON_CLOSE属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: btnOK_onClick

private void btnOK_onClick() {
	if (lstResultFields.getItemCount() == 0) {
		Messagebox.show("Result list can not be empty.");
		return;
	}
	if (form.isJoin()) {
		try {
			checkJoinCondition();
		} catch (Exception e) {
			Messagebox.show("Invalid join condition: " + e.getMessage(), 
					"Condition Validation Error", Messagebox.OK, Messagebox.ERROR);
			return;
		}
	}
	ArrayList<ResultColumn> resLst = new ArrayList<ResultColumn>();
	for (int i=0; i<lstResultFields.getItemCount(); i++) {
		resLst.add((ResultColumn) lstResultFields.getItems().get(i).getValue());
	}
	form.setResultList(resLst);
	form.setTitle(txtFormName.getValue());
	
	if (form.isJoin()) {
		//TODO Check join condition;
		form.setOuterJoin(chbOuterJoin.isChecked());
		form.setJoinClause(txtCondition.getText());
	}
	
	// Close dialog
	Event closeEvent = new Event(Events.ON_CLOSE, this);
	Events.postEvent(closeEvent);
	detach();
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:32,代码来源:FormPropertiesDialog.java

示例2: btnOK_onClick

@Listen("onClick = #btnOK")
public void btnOK_onClick() throws SQLException {
	if (StringUtils.isBlank(txtFormName.getText())) {
		showError("Name can not be empty.");
		return;
	}
	if (StringUtils.isBlank(txtFormName.getText()) || form == null) {
		showError("Form can not be empty.");
		return;
	}
	if (StringUtils.isBlank(txtValueField.getText())) {
		showError("Value field can not be empty.");
		return;
	}
	if (StringUtils.isBlank(txtLabelField.getText())) {
		showError("Label field can not be empty.");
		return;
	}
	if (!MenuResolverFactory.isNenuNameAvailable(txtName.getText())) {
		showError("Menu name is already taken.");
		return;
	}
	
	// Updates the menu
	menu.setForm(form);
	menu.setLabelField(txtLabelField.getText());
	menu.setValueField(txtValueField.getText());
	menu.setName(txtName.getText());
	menu.setQualification(txtQualification.getText());
	
	nSelectedAction = DD_OK;
	// Close dialog window
	Event closeEvent = new Event(Events.ON_CLOSE, this);
	Events.postEvent(closeEvent);
	detach();
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:36,代码来源:SearchMenuProperties.java

示例3: btnCancel_onClick

@Listen("onClick = #btnCancel")
public void btnCancel_onClick() {
	nSelectedAction = DD_CANCEL;
	Event closeEvent = new Event(Events.ON_CLOSE, this);
	Events.postEvent(closeEvent);
	detach();
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:7,代码来源:SearchMenuProperties.java

示例4: btnNext_onClick

private void btnNext_onClick() throws Exception {
	if (stage == 0) {
		if (dbConnection == null) {
			Messagebox.show("Select connection.", "Error", Messagebox.OK, Messagebox.EXCLAMATION);
			return;
		}
		showStage(1);
		return;
	}
	if (stage == 1) {
		if(leftForm == null || rightForm == null) {
			Messagebox.show("Select first and second forms.", "Error", Messagebox.OK, Messagebox.EXCLAMATION);
			return;
		}
		showStage(2);
		return;
	}
	if (stage == 2) {
		// TODO validate condition
		form.setDBConnection(dbConnection);
		form.setJoin(true);
		form.setLeftForm(leftForm);
		form.setRigthForm(rightForm);
		form.setJoinClause(txtCondition.getText());
		form.setOuterJoin(chbOuterJoin.isChecked());
		// close window
		nSelectedAction = DD_OK;
		Event closeEvent = new Event(Events.ON_CLOSE, this);
		Events.postEvent(closeEvent);
		detach();
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:32,代码来源:CreateJoinFormDialog.java

示例5: btnOK_onClick

@Listen("onClick = #btnOK")
public void btnOK_onClick() {
	nSelectedAction = DD_OK;
	Event closeEvent = new Event(Events.ON_CLOSE, this);
	Events.postEvent(closeEvent);
	detach();
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:7,代码来源:ExpandWindow.java

示例6: btnOK_onClick

@Listen("onClick = #btnOK")
public void btnOK_onClick() {
	if (lstForms.getSelectedItem() == null) {
		Messagebox.show("Select form first.", "Error", Messagebox.OK, Messagebox.EXCLAMATION);
		return;
	}
	selectedForm = lstForms.getSelectedItem().getValue();
	nSelectedAction = DD_OK;
	Event closeEvent = new Event(Events.ON_CLOSE, this);
	Events.postEvent(closeEvent);
	detach();
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:12,代码来源:SelectFormDialog.java

示例7: btnCancel_onClick

protected void btnCancel_onClick() {
	Event closeEvent = new Event(Events.ON_CLOSE, this);
	Events.postEvent(closeEvent);
	detach();
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:5,代码来源:FormPropertiesDialog.java

示例8: btnCancel_onClick

private void btnCancel_onClick() {
	nSelectedAction = DD_CANCEL;
	Event closeEvent = new Event(Events.ON_CLOSE, this);
	Events.postEvent(closeEvent);
	detach();
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:6,代码来源:CreateJoinFormDialog.java


注:本文中的org.zkoss.zk.ui.event.Events.ON_CLOSE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。