@Command public void showMessageDetail() { final HashMap<String, Object> messageMap = new HashMap<String, Object>(); messageMap.put("selectedMessage", this.messageList.getSelectedMessage()); Executions.createComponents("/user/messageDetail.zul", null, messageMap); }
/** * When the 'about' toolbarButton is clicked.<br> * * @throws IOException * @throws InterruptedException */ public void onClick$btnAbout(Event event) throws IOException, InterruptedException { /* get an instance of the borderlayout defined in the zul-file */ Borderlayout bl = (Borderlayout) Path.getComponent("/outerIndexWindow/borderlayoutMain"); /* get an instance of the searched CENTER layout area */ Center center = bl.getCenter(); Executions.createComponents("/WEB-INF/xhtml/pages/default.zul", null, null); }
public AddNodeWindow(AbstractQuestionRelation p) { this.setParent(p); // create ui from template Executions.createComponents("/WEB-INF/zk/survey/design/AddNodeWindow.zul", this, null); Selectors.wireVariables(this, this, Selectors.newVariableResolvers(getClass(), Div.class)); Selectors.wireComponents(this, this, false); Selectors.wireEventListeners(this, this); // type box and default selection ntds = nodeRO.getNodeTypeDescriptions(); ListModelList<String> typeModel = new ListModelList<String>(); for (Map<String, String> ntd : ntds) { String nodeTypeLabel = ntd.get("label"); typeModel.add(nodeTypeLabel); } String defaultContactType = p.getQuestion().getDefaultNewContactType(); if (defaultContactType != null) { Map<String, String> ntd = GeneralUtil.getNodeDescription(ntds, defaultContactType); if (ntd != null) { String nodeTypeLabel = ntd.get("label"); typeModel.addToSelection(nodeTypeLabel); } } typeBox.setModel(typeModel); onNodeTypeChanged(); this.setWidth("200px"); this.setVflex("1"); this.setClosable(true); }
@Override public void mostrarTabla(ESexo sexo, ZKWindow zkWindow) { TablaMacro tablaMacro = (TablaMacro) Executions.createComponents( "/WEB-INF/macros/graficas/TablaGraficas.zul", zkWindow, new HashMap<String, Object>()); String sexoL = ESexo.getSexo(sexo); String tipo_tabla = ETipoTabla.getTipo(ETipoTabla.LENGTH); Map<String, Object> map = new HashMap<String, Object>(); map.put("sexo", sexoL); map.put("tipo", tipo_tabla); map.put("edad_inicial", 0); map.put("edad_final", 2); List<Tabla_anios_meses> tabla_talla_pesos = getServiceLocator().getTabla_anios_mesesService().listar(map); // log.info("Listado: " + tabla_talla_pesos.size()); /* Mostrar tabla */ tablaMacro.setSexo(sexo); tablaMacro.setTipo_tabla(Tipo_tabla.ANIOS_MESE); tablaMacro.setTitleValorReturn("ESTATURA"); tablaMacro.mostrarTabla(tabla_talla_pesos); mostrarVentanaParaUsuario(tablaMacro, zkWindow, "Tabla de Talla para edad de 0 a 2 Anios"); }
@Command public void nuevoItem() { java.util.Map<String, Object> params = new java.util.HashMap<String, Object>(); DetallePagosmovimiento prov = new DetallePagosmovimiento(); prov.setId_estado("A"); prov.setTipomov("E"); prov.setFecha(new java.util.Date()); prov.setUlt_usuarioa(UsuarioLogueado.getIdUsuario()); prov.setMonto(BigDecimal.ZERO); // prov.setPorcentajefactura(new BigDecimal("100.00")); params.put("ITEM_SEL", prov); params.put("ACCION_ACTUAL", EnumAcciones.ADD); final Window w = (Window) Executions.createComponents(formPath, null, params); w.setTitle("Registrar pago"); w.doModal(); w.addEventListener( "onDetachForm", new EventListener() { @Override public void onEvent(Event event) throws Exception { BindUtils.postGlobalCommand(null, null, "refrescar", null); } }); }
public void onClick$upBn() { final UpfileWindow w = (UpfileWindow) Executions.createComponents( "/admin/personal/businessdata/meeting/upfile.zul", null, null); w.addEventListener( Events.ON_CHANGE, new EventListener() { public void onEvent(Event arg0) throws Exception { String filePath = (String) Executions.getCurrent().getAttribute("path"); String fileName = (String) Executions.getCurrent().getAttribute("title"); String upTime = (String) Executions.getCurrent().getAttribute("upTime"); String[] arr = new String[4]; arr[0] = filePath; arr[1] = fileName; arr[2] = upTime; arr[3] = Jxkh_DataFile.TRAIN.toString(); fileList.add(arr); fileListbox.setModel(new ListModelList(fileList)); } }); try { w.doModal(); } catch (SuspendNotAllowedException e) { e.printStackTrace(); } catch (InterruptedException e) { e.printStackTrace(); } }
@Listen("onClick=#addSuunitBtn") public void openAddSunnit() { Map<String, String> map = new HashMap<String, String>(); map.put("dbId", aDbId); Executions.createComponents( "/WEB-INF/pages/system/ermResMainEjeb/ermResSuunitAdd.zul", this.getSelf(), map); } //
public void exportReport() throws Exception { try { // JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(datas); if (cmbExportType.getSelectedItem().getValue().toString().equals("pdf")) { Window pdfPreviewWnd = (Window) Executions.createComponents("/zul/pdfpreview/PdfPreview.zul", null, null); Jasperreport pdfReport = (Jasperreport) pdfPreviewWnd.getFellow("report"); pdfReport.setType(cmbExportType.getSelectedItem().getValue().toString()); pdfReport.setSrc("reports/statistikpendidikandosen/StatistikPendidikanDosen.jasper"); Map parameters = new HashMap(); parameters.put("chart", chart.createBufferedImage(500, 300)); pdfReport.setParameters(parameters); pdfReport.setDatasource(null); pdfPreviewWnd.doModal(); } else { report.setType(cmbExportType.getSelectedItem().getValue().toString()); report.setSrc("reports/statistikpendidikandosen/StatistikPendidikanDosen.jasper"); Map parameters = new HashMap(); parameters.put( "chart", chart.createBufferedImage(500, 300, BufferedImage.TRANSLUCENT, null)); report.setParameters(parameters); report.setDatasource(null); } } catch (Exception ex) { Messagebox.show(ex.getMessage()); } }
public void exportReport() throws Exception { try { JRBeanCollectionDataSource dataSource = new JRBeanCollectionDataSource(datas); Map param = new HashMap(); param.put("dosen", ((Dosen) cmbNamaDosen.getSelectedItem().getValue()).getNama()); param.put("prodi", ((ProgramStudi) cmbProgdi.getSelectedItem().getValue()).getNama()); param.put("tahun", cmbTahun.getSelectedItem().getValue().toString()); param.put("semester", cmbSemester.getSelectedItem().getValue() + ""); if (cmbExportType.getSelectedItem().getValue().toString().equals("pdf")) { Window pdfPreviewWnd = (Window) Executions.createComponents("/zul/pdfpreview/PdfPreview.zul", null, null); Jasperreport pdfReport = (Jasperreport) pdfPreviewWnd.getFellow("report"); pdfReport.setType(cmbExportType.getSelectedItem().getValue().toString()); pdfReport.setSrc("reports/jadwaldosen/JadwalDosen.jasper"); pdfReport.setParameters(param); pdfReport.setDatasource(dataSource); pdfPreviewWnd.doModal(); } else { report.setType(cmbExportType.getSelectedItem().getValue().toString()); report.setSrc("reports/jadwaldosen/JadwalDosen.jasper"); report.setParameters(param); report.setDatasource(dataSource); } } catch (Exception ex) { Messagebox.show(ex.getMessage()); } }
public void onMostrarModuloOrdenamiento() throws Exception { if (orden_servicioAction != null) orden_servicioAction.detach(); Map parametros = new HashMap(); parametros.put("nro_identificacion", admision_seleccionada.getNro_identificacion()); parametros.put("nro_ingreso", admision_seleccionada.getNro_ingreso()); parametros.put("estado", admision_seleccionada.getEstado()); parametros.put("codigo_administradora", admision_seleccionada.getCodigo_administradora()); parametros.put("id_plan", admision_seleccionada.getId_plan()); parametros.put("tipo_hc", ""); parametros.put("ocultaValor", ""); parametros.put("admision", admision_seleccionada); parametros.put("opcion_formulario", tbxAccion.getValue()); /* este parametros es para que oculte las vistas */ parametros.put("ocultarInformacion", "_Ocultar"); parametros.put("ocultar_consentimiento", "S"); parametros.put("ocultarEstado", "ocultarEstado"); orden_servicioAction = (Orden_servicio_internoAction) Executions.createComponents("/pages/orden_servicio_interno.zul", null, parametros); orden_servicioAction.inicializar(this); divModuloOrdenamiento.appendChild(orden_servicioAction); orden_servicioAction.obtenerBotonImprimir().setVisible(false); // cargo_farmacologico = true; // } }
public void onEditarClicked(ForwardEvent event) { logger.log(Level.INFO, "[ListConciliacionesCtrl][onEditarClicked]"); try { if (event instanceof ForwardEvent) { ForwardEvent ev = (ForwardEvent) event; Button btn = (Button) ev.getOrigin().getTarget(); if (btn != null) { conciliaSelected = (BcoConciliam) btn.getAttribute("data"); if (conciliaSelected != null) { HashMap map = new HashMap(); map.put("gestorPeriodoCtrl", this); map.put("conciliaSelected", conciliaSelected); map.put("accion", Constants.ACCION_MANTTO_MODIFY); map.put("token", UtilFormat.getToken()); Executions.createComponents( "/WEB-INF/xhtml/mantenimientos/conciliasCRUD/conciliaMtto.zul", null, map); } else { MensajeMultilinea.show("Seleccione un registro!!", Constants.MENSAJE_TIPO_ALERTA); } } } } catch (Exception e) { MensajeMultilinea.show( "Ocurrió una excepción al crear componente!!", Constants.MENSAJE_TIPO_ERROR); e.printStackTrace(); } }
// @NotifyChange({"detallePagoModel","totalDetallePagos","saldoPagos","montoWarning"}) // @Command // public void eliminarDetallePago(){ // if(this.detallePagoSeleccionado == null){ // Clients.showNotification("Seleccione un detalle de pago"); // return; // } // detallePagoModel.remove(detallePagoSeleccionado); // refrescarDetallePago(); // } // @Command public void nuevoInforme() { java.util.Map<String, Object> params = new java.util.HashMap<String, Object>(); final ActividadesMordenproduccion prov = new ActividadesMordenproduccion(); prov.setId_estado("A"); prov.setEstado("C"); // Cancelado prov.setFechaini(new java.util.Date()); prov.setFechafin(new java.util.Date()); prov.setUlt_usuarioa(UsuarioLogueado.getIdUsuario()); prov.setId_mov(itemSel.getId()); DetalleFasesProduccion dm = detalleFasesProduccionMapper.selectByPrimaryKey(itemSel.getId_det_fase_actual()); prov.setId_fase(dm.getId_fase()); params.put("ITEM_SEL", prov); params.put("ACCION_ACTUAL", EnumAcciones.ADD); // params.put("CAT_ACTUAL", catActual); final Window w = (Window) Executions.createComponents("/produccion/formDetalleActividad.zul", null, params); w.setTitle("Nueva Actividad"); w.doModal(); w.addEventListener( "onDetachForm", new EventListener() { @Override public void onEvent(Event event) throws Exception { // detalleInformeModel.add((ActividadesMordenproduccion)event.getData()); BindUtils.postGlobalCommand(null, null, "refrescarDetallePago", null); } }); }
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); }
@Command public void desplegarFormPersonas() { // z =Datos personales,Apoderado Map params = new HashMap(); Window w = (Window) Executions.createComponents("/personas/formBuscaPersonas.zul", null, params); // w.setTitle("REGISTRAR DATOS PERSONALES"); w.doModal(); w.addEventListener( "onDetachForm", new EventListener<Event>() { // @Override public void onEvent(Event arg0) throws Exception { Object obj = arg0.getData(); if (obj instanceof Personas) { perSel = (Personas) obj; BindUtils.postGlobalCommand(null, null, "refrescarPersonas", null); } // System.out.println(obj); } }); }
/** * when the "new" button is clicked. * * <p>Calls the Customer dialog. * * @param event */ public void onClick$bt_Orders_CustomerNew(Event event) { // logger.debug(event.toString()); /** !!! DO NOT BREAK THE TIERS !!! */ // We don't create a new DomainObject() in the frontend. // We GET it from the backend. Customer aCustomer = getCustomerService().getNewCustomer(); aCustomer.setOffice(getUserWorkspace().getOffice()); // init // customer.setBranche(Workspace.getBranche()); // init // TODO get the init values from a setup configuration aCustomer.setBranche(getBrancheService().getBrancheById(new Integer(1033).longValue())); // init aCustomer.setKunMahnsperre(false); // init /* * We can call our Dialog zul-file with parameters. So we can call them * with a object of the selected item. For handed over these parameter * only a Map is accepted. So we put the object in a HashMap. */ HashMap<String, Object> map = new HashMap<String, Object>(); map.put("customer", aCustomer); /* * we can additionally handed over the listBox, so we have in the dialog * access to the listbox Listmodel. This is fine for syncronizing the * data in the customerListbox from the dialog when we do a delete, edit * or insert a customer. */ // call the zul-file with the parameters packed in a map Executions.createComponents("/WEB-INF/pages/customer/customerDialog.zul", null, map); }
public void onSetBatchButton(Event event) { final Window win = (Window) Executions.createComponents(batchMonitors_TargetUrl, null, null); win.setAttribute("monitorlistbox", monitorlistbox); Label pall = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("all"); win.setAttribute("all", pall); Label pok = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("ok"); win.setAttribute("ok", pok); Label pwarn = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("warn"); win.setAttribute("warn", pwarn); Label perror = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("error"); win.setAttribute("error", perror); Label pforbid = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("forbid"); win.setAttribute("forbid", pforbid); Label pbad = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("bad"); win.setAttribute("bad", pbad); Label pnullspecial = (Label) setMonitorWin.getDesktop().getPage("setMonitorPage").getFellow("nullspecial"); win.setAttribute("null", pnullspecial); try { win.doModal(); } catch (SuspendNotAllowedException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
public void onClick$btnNuevo() { Map<String, Object> parametros = new HashMap<String, Object>(); parametros.put("ctrlWinCardiaca", this); Window win = (Window) Executions.createComponents(editCardiaca, null, parametros); win.doHighlighted(); apagarBotones(); }
@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 cetak() throws Exception { Window win = (Window) Executions.createComponents("/zul/admin/rpt_daftar_perusahaan.zul", null, null); Textbox sql = (Textbox) win.getFellow("sql"); Kecamatan kec = (Kecamatan) cmbKecamatan.getSelectedItem().getValue(); sql.setValue("SELECT * FROM perusahaan WHERE kecamatan_id=" + kec.getId()); win.doModal(); }
public void onClick$toolbarButtonNuevo() { Window win = (Window) Executions.createComponents( "/Modulo_Control_Productos/RegistroProductos.zul", null, null); win.setTitle("Registrar Nuevo Producto"); win.doModal(); }
/** * 生成报告按钮事件 * * @param event * @throws Exception */ public void onClick$CreateReportBtn(Event event) throws Exception { if (topNList.getSelectedItem() == null) { try { Messagebox.show("请选择报告!", "提示", Messagebox.OK, Messagebox.INFORMATION); } catch (InterruptedException e) { e.printStackTrace(); } return; } View view = Toolkit.getToolkit().getSvdbView(event.getTarget().getDesktop()); String loginname = view.getLoginName(); Listitem item = topNList.getSelectedItem(); String section = item.getId(); this.iniFile = new IniFile(INI_FILE); try { this.iniFile.load(); } catch (Exception e) { } Map<String, String> reportDefine = this.iniFile.getSectionData(section); String Period = reportDefine.get("Period"); String filetype = reportDefine.get("fileType"); if (filetype == null) { filetype = "html"; } Date tmStart = null; Date tmEnd = new Date(); if (Period.equals("Month")) tmStart = Toolkit.getToolkit().delDay(new Date(), 30); else if (Period.equals("Week")) tmStart = Toolkit.getToolkit().delDay(new Date(), 7); else if (Period.equals("Day")) tmStart = Toolkit.getToolkit().delDay(new Date(), 1); else { Toolkit.getToolkit().showError("报告区间不支持:"); return; } TopNReport tmpTopNReport = new TopNReport(section, reportDefine, tmStart, tmEnd, view, false); // tmpTopNReport.createReport(); Thread thread = new Thread(tmpTopNReport); thread.setName("TopNReport -- TopNReport.java"); thread.start(); final Window win = (Window) Executions.createComponents("/main/progress/topnprogress.zul", null, null); win.setAttribute("topnreport", tmpTopNReport); win.setAttribute("filetype", filetype); win.setAttribute("reportname", tmpTopNReport.strReportName); win.doModal(); // AMedia(String name, String format, String ctype, URL url, String charset) // 刷新日志数据 // addlog // View view = Toolkit.getToolkit().getSvdbView(event.getTarget().getDesktop()); String minfo = loginname + " " + "在" + OpObjectId.topn_report.name + "中进行了手动生成报告操作."; AppendOperateLog.addOneLog(loginname, minfo, OpTypeId.add, OpObjectId.topn_report); onSelecttopNList(event); }
/** * 添加TOPN报告 * * @param event * @throws InterruptedException * @throws SuspendNotAllowedException */ public void onClick$addTopN(Event event) throws SuspendNotAllowedException, InterruptedException { final Window win = (Window) Executions.createComponents(EditTOPN, null, null); win.setAttribute("isedit", false); win.setAttribute("tTopNReportComposer", this); win.setAttribute("iniFile", iniFile); win.doModal(); refreshInifile(); }
public void onClick$btnHistorial() { Map<String, Object> parametros = new HashMap<String, Object>(); parametros.put("paciente", paciente); Window win = (Window) Executions.createComponents( "/sigma/vistas/servicios/servicios/CatalogoHistorial.zul", null, parametros); win.doHighlighted(); }
private void reload() { div2.getChildren().clear(); if (session.getAttribute("user") != null) { Executions.createComponents("leftpanel.zul", div2, null); System.out.println("create leftpanel.zul"); } else { div2.getChildren().clear(); // div2.appendChild(new Label("Please login")); } }
public static void showWindow() { ViewWindow window = (ViewWindow) Executions.createComponents("/pages/window/window.zul", null, null); WorkWithPartnerMZ work = new WorkWithPartnerMZ(); Object[] objs = work.getListRows().toArray(); window.setObj(objs); window.setLoad(true); window.doModal(); }
/** * Shows the welcome page in the borderlayouts CENTER area.<br> * * @throws InterruptedException */ public void showWelcomePage() throws InterruptedException { // get an instance of the borderlayout defined in the zul-file Borderlayout bl = (Borderlayout) Path.getComponent("/outerIndexWindow/borderlayoutMain"); // get an instance of the searched CENTER layout area Center center = bl.getCenter(); // clear the center child comps center.getChildren().clear(); // call the zul-file and put it in the center layout area Executions.createComponents("/WEB-INF/xhtml/pages/default.zul", center, null); }
public CrudWindow() { Map<String, Object> params = new HashMap<String, Object>(); params.put("crudWindow", this); crudWindowComponent = Executions.createComponents("~./builderSoft/components/CrudWindow.zul", this, params); // Selectors.wireComponents(this, this, false); // Selectors.wireEventListeners(this, this); processRecursive(crudWindowComponent, this); }
@Override public void onEvent(Event arg0) throws Exception { // TODO Auto-generated method stub try { final Window win = (Window) Executions.createComponents("/main/progress/topnprogress.zul", null, null); win.setAttribute("topnreport", topNReport); win.doModal(); } catch (Exception e) { } }
public void loadTab(String tabId, String uri, Jobdetails record) { List tabpanels = usertabs.getTabpanels().getChildren(); for (Object child : tabpanels) { Components.removeAllChildren((Component) child); } this.selectedItem = record; Map arguments = new HashMap(3); arguments.put("selectedItem", record); arguments.put("recordMode", "EDIT"); arguments.put(ContextType.VIEW, view); Executions.createComponents(uri, getTab(tabId).getLinkedPanel(), arguments); }
public void agregarEventoFiltrar() throws SuspendNotAllowedException, InterruptedException { if (parametros == null) parametros = new HashMap<String, Object>(); parametros.put("listaDetalles", listaDetalle); VentanaFiltroDetalleAction win = (VentanaFiltroDetalleAction) Executions.createComponents("/ventana_filtro_detalle.zul", null, parametros); win.doModal(); }