本文整理汇总了Java中org.zkoss.zul.Messagebox.show方法的典型用法代码示例。如果您正苦于以下问题:Java Messagebox.show方法的具体用法?Java Messagebox.show怎么用?Java Messagebox.show使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.zkoss.zul.Messagebox
的用法示例。
在下文中一共展示了Messagebox.show方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: btnCreate_onClick
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Listen("onClick = #btnCreate")
public void btnCreate_onClick() {
if (scanForNulls()) {
return;
}
// get values
Entry e = new Entry();
for(Component c : fieldList) {
IField<?> f = (IField<?>) c;
if (f.getDBValue().getValue() != null && !f.isDisplayOnly())
e.getValues().add(f.getDBValue());
}
// if no user values
if (e.getValues().size() == 0)
return;
// create new entry
try {
db.insertEntry(e);
clearAllFields(detailsView);
} catch (DatabaseOperationException e1) {
Messagebox.show("Unable to create entry");
e1.printStackTrace();
}
}
示例2: readTransactions
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
private List<Cost> readTransactions() throws IOException, Exception {
String firstLine = getFirstLine();
InputStream is = new ByteArrayInputStream(media.getStringData().getBytes());
Reader reader2 = new InputStreamReader(is);
reader = new BufferedReader(reader2);
// reader = new BufferedReader(media.getReaderData());
TransactionReader importTransactions = transactionReaderFactory.getTransactionReader(firstLine);
importTransactions.reset();
List<Cost> result = importTransactions.readFile(reader);
boolean unmatchedTransactions = listContainsUnmatchedTransactions(result);
boolean longDescriptions = listContainsLongDescriptions(result);
if (!unmatchedTransactions && !longDescriptions) {
importBtn.setDisabled(false);
} else if (unmatchedTransactions) {
Messagebox.show("Er zijn nog onbepaalde transacties. Voeg tekstfragmenten toe, waarmee transacties herkend kunnen worden voor een bepaalde kostensoort.", null,
new Messagebox.Button[] { Messagebox.Button.OK }, Messagebox.EXCLAMATION, null);
return filterUnmatchedTransactions(result);
} else if (longDescriptions) {
Messagebox.show("Er zijn nog lange omschrijvingen. Maak deze wat korter om ze in te kunnen lezen.", null, new Messagebox.Button[] { Messagebox.Button.OK }, Messagebox.EXCLAMATION, null);
return filterLongDescriptions(result);
}
return result;
}
示例3: lstUsers_onSelect
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Listen("onSelect = #lstUsers")
public void lstUsers_onSelect() throws SQLException {
if (isUserDirty) {
Messagebox.show("User was modified. Save changes?", "User",
Messagebox.YES | Messagebox.NO
, Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event e) throws Exception {
if(Messagebox.ON_YES.equals(e.getName())){
UpdateUser();
userSelected();
}else if(Messagebox.ON_NO.equals(e.getName())){
userSelected();
}
}
});
return;
} else {
userSelected();
}
}
示例4: lstRoles_onSelect
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Listen("onSelect = #lstRoles")
public void lstRoles_onSelect() {
if (isRoleDirty) {
Messagebox.show("Role was modified. Save changes?", "Role",
Messagebox.YES | Messagebox.NO
, Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event e) throws Exception {
if(Messagebox.ON_YES.equals(e.getName())){
UpdateRole();
roleSelected();
}else if(Messagebox.ON_NO.equals(e.getName())){
roleSelected();
}
}
});
return;
} else {
roleSelected();
}
}
示例5: btnDeleteUser_onClick
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Listen("onClick = #btnDeleteUser")
public void btnDeleteUser_onClick() {
if (selectedUser == null)
return;
Messagebox.show("You are shure, that you want to delete user?", "User delete",
Messagebox.YES | Messagebox.NO
, Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event e) throws Exception {
if(Messagebox.ON_YES.equals(e.getName())){
ConfigLoader.getInstance().getUsers().delete(selectedUser);
selectedUser = null;
refreshUserList();
}
}
});
}
示例6: btnDeleteRole_onClick
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Listen("onClick = #btnDeleteRole")
public void btnDeleteRole_onClick() {
if (selectedRole == null)
return;
Messagebox.show("You are shure, that you want to delete role?", "Role delete",
Messagebox.YES | Messagebox.NO
, Messagebox.QUESTION, new EventListener<Event>() {
@Override
public void onEvent(Event e) throws Exception {
if(Messagebox.ON_YES.equals(e.getName())){
ConfigLoader.getInstance().getRoles().delete(selectedRole);
selectedRole = null;
refreshRoleList();
}
}
});
}
示例7: UpdateRole
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
/**
* Updates selected role
*/
private void UpdateRole() {
if (selectedRole == null)
return;
// if role has been changed
if (isRoleDirty) {
selectedRole.setDescription(txtRoleDesc.getText());
try {
ConfigLoader.getInstance().getRoles().update(selectedRole);
isRoleDirty = false;
} catch (SQLException e) {
Messagebox.show("Unable to save role.", "ERROR", Messagebox.OK, Messagebox.ERROR);
e.printStackTrace();
}
}
}
示例8: validarUsuarioYPassword
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
/**
* Valdia usuario y contra en bd
* @param text
* @param text2
*/
private void validarUsuarioYPassword(String usuario, String password) {
Usuario usuarioProy = getLoginNgc().validarUsuario(usuario, password);
if(usuarioProy==null){
Messagebox.show("Usuario y/o contrase�a incorrectos","Datos inv�lidos",Messagebox.OK,Messagebox.ERROR);
usuarioTextBox.setText(null);
passwordTextBox.setText(null);
usuarioTextBox.setFocus(true);
}else{
WebSessionAccesor.setUsuario(usuarioProy);
validarUsuarioDocente(usuarioProy);
WebSessionAccesor.getTabboxAplication().getSelectedTab().detach();
WebSessionAccesor.getUsuarioTextbox().setValue("Usuario: " + usuarioProy.getNombreCompleto());
WebSessionAccesor.getUsuarioTextbox().setDisabled(true);
Messagebox.show("Autenticaci�n exitosa, favor seleccionar nuevamente la opci�n requerida","Validaci�n exitosa",Messagebox.OK,Messagebox.INFORMATION);
}
}
示例9: onEvent
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
public void onClick$btnEliminar(Event ev) {
if (lsxCurso.getSelectedIndex() == -1)
{
Messagebox.show("Debe seleccionar un item de la lista", "Informacion", Messagebox.OK, Messagebox.INFORMATION);
}
else
{
Messagebox.show("Desea eliminar el curso seleccionado", "Confirmaci�n", Messagebox.OK | Messagebox.CANCEL, Messagebox.QUESTION, new org.zkoss.zk.ui.event.EventListener() {
public void onEvent(Event evt) throws InterruptedException {
if (evt.getName().equals("onOK")) {
CursoDTO dto =(CursoDTO) lsxCurso.getModel().getElementAt(lsxCurso.getSelectedIndex());
cursoOpInt.eliminarCurso(dto);
alert("Curso Eliminado");
}
}
});
List<CursoDTO> listaCursos = cursoOpInt.getCursoList();
ListModel model = new ListModelList(listaCursos);
lsxCurso.setModel(model);
lsxCurso.setItemRenderer(this);
}
}
示例10: doAfterCompose
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
logger.info("cargando ventana de editar cursos");
cursoDTO = (CursoDTO) Executions.getCurrent().getArg().get("dtoCurso");
if (cursoDTO==null)
{
Messagebox.show("No selecciono un curso", "Informacion", Messagebox.OK, Messagebox.INFORMATION);
self.detach();
}
else
{
txtNombreCurso.setValue(cursoDTO.getNombreCurso());
txtIdCurso.setValue(cursoDTO.getIdCurso());
txtIdn.setValue(Long.toString(cursoDTO.getIdn()));
cmbDep.setValue(cursoDTO.getNombreDependencia());
}
}
示例11: okButtonClickEventHandler
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Listen("onClick = #ok")
public void okButtonClickEventHandler() throws WrongValueException {
if (!name.isValid()) {
throw new WrongValueException(name, WrongValueException.NULL_CODE);
} else if (!login.isValid()) {
throw new WrongValueException(login, "Логин обязателен на заполнение");
} else if (!email.isValid()) {
throw new WrongValueException(email, "E-mail это e-mail. Не хитри.");
} else if (!birthDate.isValid()) {
throw new WrongValueException(birthDate, "Дата рождения обязательна и она должна быть в прошлом");
} else {
String info = "name: " + name.getValue() +
"\r\nlogin: " + login.getValue() +
"\r\nemail: " + email.getValue() +
"\r\nbirth: " + birthDate.getValue();
Messagebox.show(info, "Введенная информация", Messagebox.OK, Messagebox.INFORMATION);
}
}
示例12: deleteIdea
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Command
@NotifyChange("wishList")
public void deleteIdea(@BindingParam("wishStatus") final WishStatus ws) {
EventListener<ClickEvent> clickListener = new EventListener<Messagebox.ClickEvent>() {
public void onEvent(ClickEvent event) throws Exception {
if(Messagebox.Button.YES.equals(event.getButton())) {
wishDAO.delete(ws.getWish());
wishStatusList.remove(ws);
refreshRowTemplate(ws);
}
}
};
Messagebox.show(Labels.getLabel("grid.confirm"), //$NON-NLS-1$
Labels.getLabel("grid.rmidea"), new Messagebox.Button[]{ //$NON-NLS-1$
Messagebox.Button.YES, Messagebox.Button.NO }, Messagebox.QUESTION, clickListener);
}
示例13:
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
public void onClick$validateButton (Event e){
Game g = (Game) page.getAttribute("game");
if(StringUtils.equals(player2Combobox.getText(), player1Combobox.getText())){
Messagebox.show(LangUtils.getMessage(LangEnum.IMPOSSIBLE_MATCH));
return;
}
Tournament t = (Tournament) session.getAttribute("tournament");
for(Player p : t.players){
if(!p.forfeit){
if(StringUtils.equals(p.nickname, player1Combobox.getText())){
System.out.println("Setting player 1 : "+p.nickname);
g.setPlayer1(p);
}
if(StringUtils.equals(p.nickname, player2Combobox.getText())){
System.out.println("Setting player 2 : "+p.nickname);
g.setPlayer2(p);
}
}
}
desktop.setAttribute("newGame",g);
self.detach();
}
示例14: invite
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Command
@NotifyChange(value = { "btnsDisabled", "customer", "avaitColumn" })
public void invite() {
QLog.l().logQUser().debug("==> Start: invite - Invite by " + user.getName());
final CmdParams params = new CmdParams();
params.userId = user.getUser().getId();
// QLog.l().logQUser().debug("\n\n\n\nBEFORE INTO EXCECUTE \n\n\n\n\n");
final RpcInviteCustomer result = (RpcInviteCustomer) Executer.getInstance().getTasks()
.get(Uses.TASK_INVITE_NEXT_CUSTOMER).process(params, "", new byte[4]);
if (result.getResult() != null) {
customer = result.getResult();
setKeyRegim(KEYS_INVITED);
BindUtils.postNotifyChange(null, null, Form.this, "*");
this.addServeScreen();
}
else {
Messagebox
.show(l("no_clients"), l("inviting_next"), Messagebox.OK,
Messagebox.INFORMATION);
}
service_list.setModel(service_list.getModel());
refreshListServices();
service_list.invalidate();
// Debug
QLog.l().logQUser().debug("==> End: invite");
}
示例15: kill
import org.zkoss.zul.Messagebox; //导入方法依赖的package包/类
@Command
@NotifyChange(value = { "btnsDisabled", "customer" })
public void kill() {
Messagebox.show("Do you want to remove the client?", "Remove", new Messagebox.Button[]{
Messagebox.Button.YES, Messagebox.Button.NO}, Messagebox.QUESTION,
(Messagebox.ClickEvent t) -> {
QLog.l().logQUser().debug("Kill by " + user.getName() + " customer " + customer.getFullNumber());
if (t.getButton() != null && t.getButton().compareTo(Messagebox.Button.YES) == 0) {
final CmdParams params = new CmdParams();
params.userId = user.getUser().getId();
Executer.getInstance().getTasks().get(Uses.TASK_KILL_NEXT_CUSTOMER)
.process(params, "", new byte[4]);
customer.refreshPrevious();
customer = null;
// Set the current working service to be empty
QUser quser = QUserList.getInstance().getById(params.userId);
quser.setCurrentService("");
setKeyRegim(KEYS_MAY_INVITE);
service_list.setModel(service_list.getModel());
refreshListServices();
service_list.invalidate();
BindUtils.postNotifyChange(null, null, Form.this, "*");
serveCustomerDialogWindow.setVisible(false);
}
});
}