@Override
 public void onEvent(Event event) throws Exception {
   try {
     Date begin_date = view.getBeginDatabox().getValue();
     Date end_date = view.getEndDatabox().getValue();
     if (view.getSelectedNode() == null) {
       Messagebox.show(
           ErrorMessage.UNSELECT_MONITOR, "提示", Messagebox.OK, Messagebox.INFORMATION);
       return;
     }
     if (begin_date.after(end_date)) {
       Messagebox.show(ErrorMessage.TIME_ERROR, "提示", Messagebox.OK, Messagebox.INFORMATION);
       return;
     }
     Events.sendEvent(new Event(Events.ON_CLICK, view.getQueryBtn()));
     Window win = (Window) Executions.createComponents("/main/report/export.zul", null, null);
     win.setAttribute("colorlist", view.getColorlist());
     win.setAttribute("stateBeanData", view.getStateBean());
     win.setAttribute("persistTimeData", view.getStateItems());
     win.setSizable(false);
     win.setClosable(true);
     win.doModal();
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
  public void openProcedimientos() {
    String pages = "";
    String anio = this.anio + "";

    pages = "/pages/openProcedimientos.zul";

    Map parametros = new HashMap();
    parametros.put("codigo_empresa", codigo_empresa);
    parametros.put("codigo_sucursal", codigo_sucursal);
    parametros.put("anio", anio);
    parametros.put("contratos", "");
    parametros.put("ocultar_filtro_procedimiento", "ocultar_filtro_procedimiento");
    parametros.put("seleccionados", procedimientos_seleccionados);

    OpenProcedimientosAction componente =
        (OpenProcedimientosAction) Executions.createComponents(pages, this, parametros);
    final Window ventana = (Window) componente;
    ventana.setWidth("990px");
    ventana.setHeight("400px");
    ventana.setClosable(true);
    ventana.setMaximizable(true);
    ventana.setTitle("CONSULTAR PROCEDIMIENTOS HABILITADOS");
    ventana.setMode("modal");
    componente.setSeleccionar_componente(this);
  }
 private Component createDialog(Component content, String title) {
   Window dialog = new Window();
   dialog.appendChild(content);
   dialog.setTitle(title);
   dialog.setClosable(true);
   dialog.setSizable(true);
   dialog.setWidth("50%");
   dialog.setHeight("50%");
   dialog.setBorder(true);
   dialog.setParent(view);
   dialog.setMode(Window.MODAL);
   return dialog;
 }
示例#4
0
  public void about() {

    Window win = (Window) Executions.createComponents("about.zul", this, null);
    win.setClosable(true);
    try {
      win.doModal();
    } catch (SuspendNotAllowedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
  }
示例#5
0
  /**
   * @type m�todo de la clase ActionStandardBorder.java
   * @name generarReporte
   * @param idMapper representa el identificador del DTO en el mapa de reportes disponibles
   * @param titulo representa el titulo del reporte en la plantilla definida.
   * @param subtitulo representa el subtitulo del reporte en la plantilla definida.
   * @param list debido los reportes pueden ser generados a partir de una lista de objetos ya
   *     cargados en memoria es decir no hay que ejecutar una consulta SQL a la base de datos, este
   *     par��metro representa esa lista de objetos los cuales son procesados internamente por el
   *     ReportBuilder que es el encargado de la generaci��n de reportes.
   * @param componente especifica el nombre del componente o m��dulo al cual pertenece la entidad
   *     (DTO) del reporte a generar
   * @throws Exception Cualquier Excepcion
   * @desc Eencapsula la funcionalidad de generaci��n din��mica de reportes para tablas b��sicas.
   *     Debe ser invocado en cada uno de los action que necesiten tener esta opci��n
   */
  public void generarReporte(String idMapper, String fuente, String modulo, Component component)
      throws Exception {
    log.info("Ejecutando m�todo [generarReporte]...");

    Map<String, Object> parametros = new HashMap<String, Object>();
    parametros.put("id", idMapper);
    parametros.put("fuente", fuente);
    parametros.put("modulo", modulo);
    parametros.put("SEC_EJECUTABLE_PADRE", component.getAttribute("SEC_EJECUTABLE"));

    Component emergente = getEmergente("SRZ_REPORTE", parametros);
    if (emergente instanceof Window) {
      Window win = (Window) emergente;
      win.setClosable(true);
      emergente.setAttribute("TITULO_NOTIFICACIONES_GRITTER", ((Window) emergente).getTitle());
      win.doModal();
    }
  }
示例#6
0
 /**
  * @param title the window title (see {@link #setTitle}).
  * @param border the border (see {@link #setBorder}).
  * @param closable whether it is closable (see {@link #setClosable}).
  */
 public Window(String title, String border, boolean closable) {
   this();
   setTitle(title);
   setBorder(border);
   setClosable(closable);
 }