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


Java Messagebox.show方法代码示例

本文整理汇总了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();
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:26,代码来源:SearchComposer.java

示例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;
	}
 
开发者ID:beemsoft,项目名称:techytax-zk,代码行数:24,代码来源:VatViewCtrl.java

示例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();
	}
	
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:24,代码来源:AdministrationConsoleComposer.java

示例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();
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:23,代码来源:AdministrationConsoleComposer.java

示例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();
			}
		}
	});
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:20,代码来源:AdministrationConsoleComposer.java

示例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();
			}
		}
	});
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:20,代码来源:AdministrationConsoleComposer.java

示例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();
		}
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:20,代码来源:AdministrationConsoleComposer.java

示例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);
	}
}
 
开发者ID:zerstoren1234567,项目名称:PruebaDesarrollo,代码行数:22,代码来源:LoginCtl.java

示例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);			
	}
	
	
}
 
开发者ID:zerstoren1234567,项目名称:PruebaDesarrollo,代码行数:27,代码来源:AdministrarCursosCtl.java

示例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());    
     }
     
         
}
 
开发者ID:zerstoren1234567,项目名称:PruebaDesarrollo,代码行数:21,代码来源:EditarCursoCtl.java

示例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);
    }
}
 
开发者ID:java-course-ee,项目名称:java-course-ee,代码行数:19,代码来源:MyComposer.java

示例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);
}
 
开发者ID:fpaitrault,项目名称:ChristmasWishList,代码行数:17,代码来源:UserGrid.java

示例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();
}
 
开发者ID:Meijinfr,项目名称:Run4WinTournamentManager,代码行数:26,代码来源:AddSingleResultComposer.java

示例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");
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:31,代码来源:Form.java

示例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);

                }
            });
}
 
开发者ID:bcgov,项目名称:sbc-qsystem,代码行数:34,代码来源:Form.java


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