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


Java Messagebox类代码示例

本文整理汇总了Java中org.zkoss.zul.Messagebox的典型用法代码示例。如果您正苦于以下问题:Java Messagebox类的具体用法?Java Messagebox怎么用?Java Messagebox使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: if

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
/**
 * Boton buscar tramites.
 * 
 */
public final void onClick$btnBuscarTramites() {
	
	// TODO PENDIENTE (PASAR A LISTENER??)
	mostrarMessageBox("NO IMPLEMENTADO",
            Labels.getLabel(ConstantesWEB.WARNING), Messagebox.OK,
            Messagebox.EXCLAMATION);
	
	/*
    tramites.clear();
    if (!StringUtils.isEmpty(filtroTramite.getValue())) {
        tramites.addAll(servicioTramites.getTramites(
                filtroTramite.getValue(), tramiteActivo.isChecked()));
        listTramites.setModel(modelTramites);
    } else {
        tramites.addAll(servicioTramites.getTramites(null,
                tramiteActivo.isChecked()));
        listTramites.setModel(modelTramites);
    }
    */
}
 
开发者ID:GovernIB,项目名称:sistra,代码行数:25,代码来源:OrganismoController.java

示例2: if

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
/**
 * Click desbloquear.
 */
public final void onClick$btnDesbloquear() {
	if (versionSeleccionada()) {
        final Listitem item = (Listitem) listVersiones.getSelectedItem()
                .clone();
        final TramiteVersion version = (TramiteVersion) item.getValue();

       // Comprobamos si esta bloqueada 
       // TODO DESBLOQUEAR TB POR ALGUN ADMIN??            
       if ("S".equals(version.getBloqueadoModificacion())) {
    	   // Si esta bloqueada por usuario logado, abrimos ventana desbloquear
    	   // TODO CONTROL DESBLOQUEO USUARIO
    	   //if (usuarioLogado.getUsername().equals(
           //        version.getBloqueadoModificacionPor())) {
    		   abreDesbloquear(version);
    	   //}        	   
       } else {
    	   mostrarMessageBox(Labels.getLabel("versiones.noDesbloquear"),
                   Labels.getLabel(ConstantesWEB.WARNING), Messagebox.OK,
                   Messagebox.EXCLAMATION);
       }
	}            
}
 
开发者ID:GovernIB,项目名称:sistra,代码行数:26,代码来源:TramiteController.java

示例3: habilitaInclude

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
/**
   * M�todo para On click$btn aceptar de la clase EntornoWModal.
   */
  public final void onClick$btnAceptar() {
      
  	if (listOrganismos.getSelectedIndex() == ConstantesZK.SINSELECCION) {
      	mostrarMessageBox(Labels.getLabel("entorno.faltaDato"),
                  Labels.getLabel(ConstantesWEB.INFO), Messagebox.OK,
                  Messagebox.EXCLAMATION);
      	return;
      }	
          
      OrganoResponsable value = (OrganoResponsable) ((Listitem) listOrganismos
                  .getSelectedItem()).getValue();
usuarioLogado.setOrganismo(value.getCodigo());
      wEntorno.detach();

      session.setAttribute(ConstantesWEB.TRAMITE, null);
      session.setAttribute(ConstantesWEB.TRAMITE_ID, null);
      session.setAttribute(ConstantesWEB.VERSION, null);
      session.setAttribute(ConstantesWEB.VERSION_NUM, null);
      
      // Se pone zul vacio ya que hay problemas a veces con cacheos
      contenedorPrincipal.setSrc("/ventanaVaciaParaInclude.zul");
      habilitaInclude(contenedorPrincipal, "/gestor/ges-organismo.zul",
              null);

  }
 
开发者ID:GovernIB,项目名称:sistra,代码行数:29,代码来源:EntornoWModal.java

示例4: if

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
/**
  * Click boton editar error.
  */
 public final void onClick$btnEditaError() {
 	final Map<String, Object> map = new HashMap<String, Object>();
     if (listErrores.getSelectedIndex() == ConstantesZK.SINSELECCION) {
         mostrarMessageBox(Labels.getLabel("alertaPlataforma.noSeleccionado"),
                 Labels.getLabel(ConstantesWEB.WARNING), Messagebox.OK,
                 Messagebox.EXCLAMATION);
     } else {
     	// TODO VER TEMA PERMISOS
     	AlertaPlataforma error = (AlertaPlataforma) ((Listitem) listErrores.getSelectedItem()
                 .clone()).getValue();
         map.put(ConstantesWEB.PARAM_MODO_ACCESO, TypeModoAcceso.EDICION);            
map.put(ConstantesWEB.ERROR_PLATAFORMA, error);            
         final Window ventana = (Window) creaComponente(
                 "/configuracion/windows/con-alertaPlataforma-win.zul", this.self, map);
         abreVentanaModal(ventana);
     }
 }
 
开发者ID:GovernIB,项目名称:sistra,代码行数:21,代码来源:ConfiguracionController.java

示例5: Event

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
/**
 * M�todo para On click$btn aceptar de la clase EntornoWModal.
 */
public final void onClick$btnAceptar() {
	if (treeUA.getSelectedItem()  == null ) {
    	mostrarMessageBox(Labels.getLabel("error.noSeleccion"),
                Labels.getLabel(ConstantesWEB.INFO), Messagebox.OK,
                Messagebox.EXCLAMATION);
    	return;
    }	
        
    UnidadAdministrativa value = (UnidadAdministrativa) ((DefaultTreeNode) treeUA.getSelectedItem().getValue()).getData();        

    // Generamos evento de seleccion
    final Event event = new Event(ConstantesZK.EVENTO_SELECCION_SELECTOR, padre,
    		new SeleccionSelector(ConstantesWEB.SELECTOR_UNIDAD_ADMINISTRATIVA, value));
    Events.postEvent(event);
   
    
	wSelectorUnidadAdministrativa.detach();                
}
 
开发者ID:GovernIB,项目名称:sistra,代码行数:22,代码来源:SelectorUnidadAdministrativaWModal.java

示例6: confirmarBorrado

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
/**
 * Muestra mensaje de confirmacion de borrado. En caso de aceptar lanza
 * funcion confirmacionBorrado que deber� ser sobreescrita en la
 * implementacion.
 * 
 * @param obj
 *            Objeto a ser pasado a la funcion postConfirmarBorrado en caso
 *            de que se confirme el borrado (opcional). Por si se quiere
 *            pasar algo para particularizar funcionamiento
 *            postConfirmarBorrado.
 * 
 */
protected final void confirmarBorrado(final Object obj) {
    mostrarMessageBox(Labels.getLabel("mensaje.confirmacionBorrado"),
            Labels.getLabel("mensaje.atencion"), Messagebox.YES
                    + Messagebox.NO, Messagebox.EXCLAMATION,
            new EventListener() {					
                public void onEvent(final Event event) {
                    if (((Integer) event.getData()).intValue() == Messagebox.YES) {
                        // Invocamos evento confirmacion borrado
                        final Event ev = new Event(
                        		ConstantesZK.EVENTO_POST_CONFIRMAR_BORRADO,
                                componentCompose, obj);
                        Events.postEvent(ev);
                    }
                }
            });
}
 
开发者ID:GovernIB,项目名称:sistra,代码行数:29,代码来源:BaseComposer.java

示例7: 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

示例8: tbbNewForm_onClick

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
@Listen("onClick = #tbbNewForm")
public void tbbNewForm_onClick() {
	TableTreeNode table = modelTree.getSelectedTable();
	if (table == null) {
		Messagebox.show("Select a table first.", "Error", Messagebox.OK,
				Messagebox.EXCLAMATION);
		return;
	}
	if (currentForm != null) {
		Messagebox.show("Close form before creating the new one.");
	}
	if (currentForm == null) {
		currentForm = new Form();
		currentForm.setDBConnection(table.getConnection());
		currentForm.setName("New untitled form");
		currentForm.setTitle("Untitled Form");
		currentForm.setTableName(table.getTable().getName());
		currentForm.setCatalog(table.getTable().getCatalog());
		currentForm.setView("");
		currentForm.setJoin(false); // regular form
		setDefaultResultList(currentForm);
		checkStudioStates();
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:25,代码来源:BuilderComposer.java

示例9: tbbCloseForm_onClick

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
@Listen("onClick = #tbbCloseForm")
public void tbbCloseForm_onClick() {
	if (currentForm == null)
		return;
	if (designerCanvas.isCanvasDirty()) {
		Messagebox.show("Do you want to save changes?", "Save changes", 
				Messagebox.YES | Messagebox.NO | Messagebox.CANCEL, 
				Messagebox.QUESTION, new EventListener<Event>() {

					@Override
					public void onEvent(Event evnt) throws Exception {
						if (Messagebox.ON_YES.equals(evnt.getName())) {
							saveForm();
							closeForm();
						} else if (Messagebox.ON_NO.equals(evnt.getName())) {
							closeForm();
						}
					}
		});
	} else {
		closeForm();
	}
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:24,代码来源:BuilderComposer.java

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: createUser

import org.zkoss.zul.Messagebox; //导入依赖的package包/类
private boolean createUser() throws WrongValueException,
		NoSuchAlgorithmException, UnsupportedEncodingException {
	
	// validate user input
	if (StringUtils.isBlank(txtLogin.getText())) {
		Messagebox.show("Login can not be empty.");
		return false;
	}
	if (StringUtils.isBlank(txtPassword.getValue())) {
		Messagebox.show("Password can not be empty.");
		return false;
	}
	// create user object
	user = LoginProvider.createUser(txtLogin.getText(), txtPassword.getValue());
	user.setEnabled(true);
	user.setFullName(txtFullName.getText());
	return true;
}
 
开发者ID:sinnlabs,项目名称:dbvim,代码行数:19,代码来源:AddUserDialog.java


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