@SuppressWarnings("unchecked")
  @Override
  public void doAfterCompose(Component comp) throws Exception {
    super.doAfterCompose(comp);
    webEmployee = (WebEmployee) ZkUtils.getSessionAttribute("webEmployee");
    Map<String, String> map = new HashMap<String, String>();
    map = ZkUtils.getExecutionArgs();
    String dbId = map.get("dbId");
    currentPage = map.get("currentPage");
    aDbId = dbId;
    codeDb =
        ((ErmCodeDbService) SpringUtil.getBean("ermCodeDbService"))
            .findcodeDbByDbId(dbId, webEmployee);
    if (dbId != null) {
      dbIdTxt.setValue(codeDb.getDbId());
      dbNameTxt.setValue(codeDb.getName());
      resourcesIdTxt.setValue(codeDb.getResourcesId());
      // solr查詢語句
      String solrQuery = "";
      solrQuery += "type_id:DB";
      // resourceId
      if (codeDb.getResourcesId() != null && !codeDb.getResourcesId().trim().equals("")) {
        solrQuery += " resources_id:" + codeDb.getResourcesId();
      }
      List<ErmResourcesMainfileV> resMainDbwsList =
          ((ResourcesMainDbwsSolrSearch) SpringUtil.getBean("resourcesMainDbwsSolrSearch"))
              .resourcesMainSearch(solrQuery);
      if (resMainDbwsList.size() > 0) {
        resourcesNameTxt.setValue(resMainDbwsList.get(0).getTitle());
      }
      orderNoIbx.setValue(codeDb.getOrderNo());
      urlTxt.setValue(codeDb.getUrl());
      if (codeDb.getEzproxy() != null) {
        if (codeDb.getEzproxy().equals("Y")) {
          ezproxyRdo.setSelectedIndex(0);
        } else {
          ezproxyRdo.setSelectedIndex(1);
        }
      }
      ((ErmResourcesSuunitIdService) SpringUtil.getBean("ermResourcesSuunitIdService"))
          .findBySuunitResId(dbId);
    }

    if (dbIdTxt.getValue() == null || dbIdTxt.getValue().equals("")) {
      addSuunitBtn.setDisabled(true);
      delSuunitBtn.setDisabled(true);
    }
    flushList();
    // List<ErmResourcesSuunit> sunitList=new
    // ArrayList<ErmResourcesSuunit>();
    // sunitList=((ErmResourcesSuunitIdService) SpringUtil
    // .getBean("ermResourcesSuunitIdService")).findBySuunitResId(dbId);
    // if (sunitList.size() > 0) {
    // ListModelList<ErmResourcesSuunit> listModel = new
    // ListModelList<ErmResourcesSuunit>(sunitList);
    // listModel.setMultiple(true);
    // resMainSuunitLix.setModel(listModel);
    // }

  }
Пример #2
0
 public void viewReport() throws Exception {
   try {
     JadwalDosenDAO dao = new JadwalDosenDAOImpl();
     if (cmbNamaDosen.getValue() != null
         && cmbProgdi.getValue() != null
         && !cmbTahun.getSelectedItem().getValue().toString().isEmpty()
         && cmbSemester.getValue() != null) {
       datas =
           dao.getJadwalDosen(
               (Dosen) cmbNamaDosen.getSelectedItem().getValue(),
               (ProgramStudi) cmbProgdi.getSelectedItem().getValue(),
               cmbTahun.getSelectedItem().getValue().toString(),
               Integer.valueOf(cmbSemester.getSelectedItem().getValue().toString()));
       lstData.getItems().clear();
       for (JadwalDosen jd : datas) {
         Listitem item = new Listitem();
         item.setValue(jd);
         item.appendChild(new Listcell(jd.getJam()));
         item.appendChild(new Listcell(jd.getSenin()));
         item.appendChild(new Listcell(jd.getSelasa()));
         item.appendChild(new Listcell(jd.getRabu()));
         item.appendChild(new Listcell(jd.getKamis()));
         item.appendChild(new Listcell(jd.getJumat()));
         item.appendChild(new Listcell(jd.getSabtu()));
         lstData.appendChild(item);
       }
       btnExport.setDisabled(false);
     } else {
       Messagebox.show("Silahkan Input Parameter dengan benar");
       btnExport.setDisabled(true);
     }
   } catch (Exception ex) {
     Messagebox.show("Telah terjadi kesalahan..");
   }
 }
Пример #3
0
 public void apagarBotones() {
   txtNombreCardiaca.setFocus(true);
   listCardiaca.clearSelection();
   listCardiaca.selectItem(null);
   btnEditar.setDisabled(true);
   btnEliminar.setDisabled(true);
 }
Пример #4
0
 public void onClick$buttonAceptarP() {
   buttonImprimir.setVisible(true);
   listfinicial.setLabel("Año");
   listffinal.setLabel("Mes");
   lista =
       dbrp.ReportePorMes(
           cmb_tipo.getText(),
           cmb_demanda.getText(),
           (cmb_mes.getSelectedIndex() + 1),
           cmb_anio2.getText());
   ListModelList<ReporteProducto> modeloDeDatos = new ListModelList<ReporteProducto>(lista);
   listademanda.setModel(modeloDeDatos);
   gpb_lista.setVisible(true);
   buttonAceptarP.setVisible(false);
   cmb_mes.setDisabled(true);
   cmb_anio2.setDisabled(true);
   if (cmb_tipo.getText().equals("General")) {
     listffinal.setVisible(true);
     listfinicial.setVisible(true);
     liscat.setVisible(true);
   } else {
     listffinal.setVisible(true);
     listfinicial.setVisible(true);
     liscat.setVisible(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();
   }
 }
Пример #6
0
  /** Metodo utilizado para pegar as operações do crudOperation e configurar os botões */
  private void updateComponents() {

    crudWindowBtnNew.setVisible(this.crudCreateEnable);
    crudWindowBtnEdit.setVisible(this.crudUpdateEnable);
    crudWindowBtnDelete.setVisible(this.crudDeleteEnable);
    crudWindow.setTitle(this.getTitulo());
  }
 public void onSelect$selectedPhysiciansLb(Event event) {
   if (selectedPhysiciansLb.getSelectedItems().size() > 0) {
     deleteBtn.setVisible(true);
   } else {
     deleteBtn.setVisible(false);
   }
 }
Пример #8
0
 public void onCreate$win_reportesproductos() {
   buttonImprimir.setVisible(false);
   Calendar c1 = Calendar.getInstance();
   Calendar c2 = new GregorianCalendar();
   gpb_2.setVisible(false);
   gpb_1.setVisible(true);
   gpb_3.setVisible(false);
   gpb_anio.setVisible(false);
   gpb_lista.setVisible(false);
   cmb_tipo.setText("General");
   cmb_tiempo.setText("Por Año");
   cmb_demanda.setText("Mayor Demanda");
   for (int i = (c1.get(Calendar.YEAR)); i >= ((c1.get(Calendar.YEAR)) - 10); i--) {
     cmb_anio.appendItem("" + i);
     cmb_anio2.appendItem("" + i);
   }
   cmb_anio.setText(Integer.toString(c1.get(Calendar.YEAR)));
   cmb_anio.setReadonly(true);
   cmb_anio2.setText(Integer.toString(c1.get(Calendar.YEAR)));
   cmb_anio2.setReadonly(true);
   buttonDeshacer.setVisible(false);
   cmb_demanda.setReadonly(true);
   cmb_tiempo.setReadonly(true);
   cmb_tipo.setReadonly(true);
   cmb_mes.setText("Enero");
   cmb_mes.setReadonly(true);
 }
Пример #9
0
 private Button createAddBtn() {
   Button btn = new Button();
   btn.setImage("images/easyicon_add.png");
   btn.setTooltiptext("添加");
   btn.addEventListener(Events.ON_CLICK, AddValueBtnEventListener);
   return btn;
 }
Пример #10
0
 public void onInit() throws Exception {
   try {
     View view = Toolkit.getToolkit().getSvdbView(Executions.getCurrent().getDesktop());
     if (!view.isAdmin()) { // 非管理员用户
       IniFile userIniFile = view.getUserIni();
       String addTopN_str =
           userIniFile.getValue(userIniFile.getSections(), UserRightId.DoTopNReportlistAdd);
       String deleteTopN_str =
           userIniFile.getValue(userIniFile.getSections(), UserRightId.DoTopNReportlistDel);
       String editTopN_str =
           userIniFile.getValue(userIniFile.getSections(), UserRightId.DoStatisticReportlistEdit);
       if (!"1".equals(addTopN_str)) {
         addTopN.setDisabled(true);
       }
       if (!"1".equals(deleteTopN_str)) {
         delete.setDisabled(true);
       }
       if (!"1".equals(editTopN_str)) {
         editFlag = false;
       }
     }
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
Пример #11
0
  @Listen("onClick = #btnBuscarF0004, #btnBuscarF0004Filtro")
  public void mostrarCatalogoF0004(Event evento) {

    Button boton = (Button) evento.getTarget();
    idBoton = boton.getId();
    final List<F0004> listF0004 = servicioF0004.buscarTodosOrdenados();
    catalogoF0004 =
        new CatalogoGenerico<F0004>(
            divCatalogoF0004,
            "Catalogo de Codigos Definidos por el Usuario",
            listF0004,
            true,
            false,
            false,
            "SY",
            "RT",
            "Descripcion",
            "Codigo",
            "2 Linea",
            "Numerico") {

          @Override
          protected List<F0004> buscar(List<String> valores) {

            List<F0004> lista = new ArrayList<F0004>();

            for (F0004 f0004 : listF0004) {
              if (f0004.getId().getDtsy().toLowerCase().contains(valores.get(0).toLowerCase())
                  && f0004.getId().getDtrt().toLowerCase().contains(valores.get(1).toLowerCase())
                  && f0004.getDtdl01().toLowerCase().contains(valores.get(2).toLowerCase())
                  && String.valueOf(f0004.getDtcdl())
                      .toLowerCase()
                      .contains(valores.get(3).toLowerCase())
                  && f0004.getDtln2().toLowerCase().contains(valores.get(4).toLowerCase())
                  && f0004.getDtcnum().toLowerCase().contains(valores.get(5).toLowerCase())) {
                lista.add(f0004);
              }
            }
            return lista;
          }

          @Override
          protected String[] crearRegistros(F0004 f0004) {
            String[] registros = new String[6];
            registros[0] = f0004.getId().getDtsy();
            registros[1] = f0004.getId().getDtrt();
            registros[2] = f0004.getDtdl01();
            if (f0004.getDtcdl() != null) registros[3] = String.valueOf(f0004.getDtcdl());
            else registros[3] = null;
            registros[4] = f0004.getDtln2();
            registros[5] = f0004.getDtcnum();
            return registros;
          }
        };
    catalogoF0004.setClosable(true);
    catalogoF0004.setWidth("80%");
    catalogoF0004.setParent(divCatalogoF0004);
    catalogoF0004.doModal();
  }
 public void onSelect$lboxtareas() {
   btnPersonal.setDisabled(false);
   if (this.tareaActividadP.getEstatus() == 'E') {
     btnEjecutada.setDisabled(true);
   } else {
     btnEjecutada.setDisabled(false);
   }
 }
Пример #13
0
 @Listen("onClick = #gpxRegistro")
 public void abrirRegistro() {
   if (clave == null) btnBuscarF0004.setVisible(true);
   else btnBuscarF0004.setVisible(false);
   gpxDatos.setOpen(false);
   gpxRegistro.setOpen(true);
   mostrarBotones(false);
 }
Пример #14
0
 private Button createEnterBtn(CfgValue cfgValue) {
   Button btn = new Button();
   btn.setAttribute("cfgValue", cfgValue);
   btn.setImage("images/easyicon_open.png");
   btn.setTooltiptext("打开");
   btn.addEventListener(Events.ON_CLICK, EnterBtnEventListener);
   return btn;
 }
Пример #15
0
 private Button createCopyElementBtn(CfgValue origValue) {
   Button btn = new Button();
   btn.setAttribute("cfgValue", origValue);
   btn.setImage("images/easyicon_copy.png");
   btn.setTooltiptext("复制");
   btn.addEventListener(Events.ON_CLICK, CopyValueBtnEventListener);
   return btn;
 }
Пример #16
0
  @Listen("onClick=#saveBtn")
  public void addCodeDb() {
    try {
      Map<String, String> map = new HashMap<String, String>();
      map = ZkUtils.getExecutionArgs();
      ErmCodeDb ermCodeDb = new ErmCodeDb();
      List<ErmCodeDb> codeDbList =
          ((ErmCodeDbService) SpringUtil.getBean("ermCodeDbService")).findAllCodeDb(webEmployee);
      String tempId = "OB";
      Long number = (long) codeDbList.size();
      number = number + 1;
      String dbId = tempId + RandomIDGenerator.fmtLong(number, 9);
      ermCodeDb.setDbId(dbId);
      aDbId = dbId;
      dbIdTxt.setValue(dbId);
      if (dbNameTxt.getValue() != null && !"".equals(dbNameTxt.getValue())) {
        ermCodeDb.setName(dbNameTxt.getValue());
      } else {
        ZkUtils.showExclamation(
            Labels.getLabel("webErwSource.nameZhTw") + " " + Labels.getLabel("cannottNull"),
            Labels.getLabel("warn"));
        dbNameTxt.focus();
        return;
      }
      if (resourcesIdTxt.getValue() != null) {
        ermCodeDb.setResourcesId(resourcesIdTxt.getValue());
      }
      ermCodeDb.setHistory("N");
      if (ezproxyRdo.getSelectedItem().getValue() != null) {
        ermCodeDb.setEzproxy(ezproxyRdo.getSelectedItem().getValue().toString());
      }
      if (urlTxt.getValue() != null && !"".equals(urlTxt.getValue())) {
        ermCodeDb.setUrl(urlTxt.getValue());
      }
      if (orderNoIbx.getValue() != null) {
        ermCodeDb.setOrderNo(orderNoIbx.getValue());
      }
      ermCodeDb.setIsDataEffid(1);
      ermCodeDb.setWebEmployee(webEmployee);
      ermCodeDb.setCreateDate(new Date());
      ((ErmCodeDbService) SpringUtil.getBean("ermCodeDbService")).saveCodeDb(ermCodeDb);

      ((WebSysLogService) SpringUtil.getBean("webSysLogService"))
          .insertLog(
              ZkUtils.getRemoteAddr(),
              ermCodeDb.getWebEmployee().getEmployeesn(),
              "codeDb_" + ermCodeDb.getDbId());
      ZkUtils.showInformation(Labels.getLabel("saveOK"), Labels.getLabel("info"));
      dbIdTxt.setValue(ermCodeDb.getDbId());
      addSuunitBtn.setDisabled(false);
      delSuunitBtn.setDisabled(false);
      String url = "ermCodeDb/ermCodeDb.zul";
      ZkUtils.refurbishMethod(url);

    } catch (WrongValueException e) {
      log.error("新增資料庫異常" + e);
    }
  }
 private void manageButtons() {
   if (securityUtils.hasMakerRole(globalUtils.getGlobalPropValue(Commons.URL_SEARCH_USER_ORG))) {
     btn_add.setVisible(true);
     btn_delete.setVisible(true);
   }
   //		if(securityUtils.getUserName().equals(tempUserOrg.getLastModifiedBy())) {
   //			btn_cancel.setVisible(true);
   //		}
 }
Пример #18
0
 public void afterCompose() {
   Components.wireVariables(this, this);
   Components.addForwards(this, this);
   loadSignList();
   if (signList.getSelectedItem() == null) {
     moveDown.setDisabled(true);
     moveUp.setDisabled(true);
   }
 }
 /**
  * Checks the creation permissions of the current user and enables/disables
  * the create buttons accordingly.
  */
 private void checkCreationPermissions() {
     if (!SecurityUtils
             .isSuperuserOrUserInRoles(UserRole.ROLE_CREATE_PROJECTS)) {
         Button createOrderButton = (Button) planner.getPage().getFellow(
                 "createOrderButton");
         if (createOrderButton != null) {
             createOrderButton.setDisabled(true);
         }
     }
 }
 private void doNew() {
   doClear();
   doReadOnly(Boolean.FALSE);
   btnSave.setVisible(true);
   btnClose.setVisible(true);
   btnUpdate.setVisible(false);
   checkEstadoUsuario.setChecked(Boolean.FALSE);
   btnEdit.setVisible(false);
   btnNew.setVisible(false);
 }
Пример #21
0
 @NotifyChange("*")
 @Command
 public void cmd2(
     @SelectorParam("button[label='cmd2'] label") List<Label> labels,
     @SelectorParam("button[label='cmd2']") Button btn,
     @SelectorParam("button[label='null-btn']") Button nullbtn) {
   btn.setLabel("size " + labels.size());
   if (nullbtn != null) {
     btn.setLabel("wrong!!");
   }
 }
 private void revisarEstadoComponentes() {
   logger.log(Level.INFO, "[PreparacionesEmpleadoMttoCtrl][revisarEstadoComponentes]");
   try {
     intCantidadPrepNormales.setReadonly(planillaDetalleSelected == null);
     intCantidadPrepEmbalsamado.setReadonly(planillaDetalleSelected == null);
     intCantidadPrepEnjabado.setReadonly(planillaDetalleSelected == null);
     btnRefrescarIngresoCantidadPreparaciones.setDisabled(planillaDetalleSelected == null);
     btnGuardarIngresoCantidadPreparaciones.setDisabled(planillaDetalleSelected == null);
   } catch (Exception e) {
     e.printStackTrace();
   }
 }
 @Override
 protected Button createRightCaptionButton(
     final String label,
     final String sClass,
     final HtmlBasedComponent parent,
     final org.zkoss.zk.ui.event.EventListener listener) {
   final Button button = new Button(label);
   button.setSclass(sClass);
   button.addEventListener(Events.ON_CLICK, listener);
   parent.appendChild(button);
   return button;
 }
 @Listen("onLeitorDelete = #lb_leitor")
 public void onClick(ForwardEvent event) {
   System.out.println("Apagando um funcionario leitor");
   Button bt_apagar = (Button) event.getOrigin().getTarget();
   Listcell celula = (Listcell) bt_apagar.getParent().getParent();
   Listitem item = (Listitem) celula.getParent();
   Leitor leitorApagar = (Leitor) item.getValue();
   lb_leitor.removeChild(item);
   String nome = leitorApagar.getNome();
   leitorDao.delete(leitorApagar);
   System.out.println("Apagando um funcionario leitor");
   Clients.showNotification("Os dados do funcionario " + nome + " foram apagados");
 }
 @Listen("onLeitorUpdate = #lb_leitor")
 public void onClickAlterarLeitor(ForwardEvent event) {
   Button btn_confirmarLeitor = (Button) event.getOrigin().getTarget();
   Listcell celula = (Listcell) btn_confirmarLeitor.getParent().getParent();
   Listitem itemAlterar = (Listitem) celula.getParent();
   Leitor op = (Leitor) itemAlterar.getValue();
   Map<String, Object> arguments = new HashMap<String, Object>();
   arguments.put("funAlterar", op);
   arguments.put("lb_leitor", lb_leitor);
   Window win =
       (Window) Executions.createComponents("/registos/alteracaoLeitor.zul", null, arguments);
   win.doHighlighted();
 }
Пример #26
0
  /// Showd Data on grid table
  public void showgrid() {
    for (Component c : find(this.getPage(), "#showsell > rows > row")) {
      c.detach();
    }
    float sumallprice = 0;
    for (int i = 0; i < pointcount; i++) {
      Row r = new Row();
      r.appendChild(new Label(Integer.toString(idpro.get(i))));
      r.appendChild(new Label(nameproduct.get(i)));
      r.appendChild(new Label(Integer.toString(qty.get(i))));
      r.appendChild(new Label(Integer.toString(unitprice.get(i))));
      r.appendChild(new Label(Integer.toString(price.get(i))));
      r.appendChild(new Label(namecus.get(i)));
      Button but = new Button("Delete");
      but.setId("" + i);
      but.addEventListener(
          "onClick",
          new EventListener() {
            public void onEvent(Event ee) {
              nameproduct.remove(Integer.parseInt(ee.getTarget().getId()));
              qty.remove(Integer.parseInt(ee.getTarget().getId()));
              unitprice.remove(Integer.parseInt(ee.getTarget().getId()));
              price.remove(Integer.parseInt(ee.getTarget().getId()));
              namecus.remove(Integer.parseInt(ee.getTarget().getId()));
              pointcount--;
              txtsum.setValue("0");
              txtvat.setValue("0");
              idsumprice.setValue("0");
              showgrid();
            }
          });
      r.appendChild(but);
      Component v = find(this.getPage(), "#showsell > rows").get(0);
      v.appendChild(r);
      sumallprice = sumallprice + price.get(i);
      float vatc1;
      String vatc2;
      for (Customereng vc : Customereng.findAllCustomerengs()) {
        vatc2 = vc.getTax();
        vatc1 = Float.parseFloat(vatc2);

        float vat = (sumallprice * vatc1) / 100;
        float sumtotal = vat + sumallprice;
        txtsum.setValue(Float.toString(sumallprice));
        txtvat.setValue(Float.toString(vat));
        idsumprice.setValue(Float.toString(sumtotal));
      }
    }
  }
Пример #27
0
  /**
   * Changes the view for month view.
   *
   * @param event
   * @throws InterruptedException
   */
  public void doShowMonth(Event event) throws InterruptedException {
    this.cal.setMold("month");

    btn_Show1Day.setStyle(btnOriginColor);
    btn_Show5Days.setStyle(btnOriginColor);
    btn_ShowWeek.setStyle(btnOriginColor);
    btn_Show2Weeks.setStyle(btnOriginColor);
    btn_ShowMonth.setStyle(btnPressedColor);

    try {
      synchronizeModel();
    } catch (ParseException e) {
      e.printStackTrace();
    }
  }
Пример #28
0
 public void onClick$buttonAceptar() {
   buttonImprimir.setVisible(true);
   Calendar c1 = Calendar.getInstance();
   Calendar c2 = new GregorianCalendar();
   if (txtFechaLlegada.getText().isEmpty() || txtFechaSalida.getText().isEmpty()) {
     alert("Seleccione fechas!!");
   } else {
     String fechai =
         ""
             + (txtFechaLlegada.getValue().getYear() + 1900)
             + "-"
             + (txtFechaLlegada.getValue().getMonth() + 1)
             + "-"
             + txtFechaLlegada.getValue().getDate();
     String fechau =
         ""
             + (txtFechaSalida.getValue().getYear() + 1900)
             + "-"
             + (txtFechaSalida.getValue().getMonth() + 1)
             + "-"
             + txtFechaSalida.getValue().getDate();
     if (txtFechaLlegada.getValue().after(txtFechaSalida.getValue())) {
       alert("Fecha de Inicio no debe exceder a la fecha límite!!");
     } else {
       if (txtFechaLlegada.getValue().after(c1.getTime())
           || txtFechaSalida.getValue().after(c1.getTime())) {
         alert("las fechas no pueden exceder a la fecha actual!!");
       } else {
         lista = dbrp.ReportePorFecha(cmb_tipo.getText(), cmb_demanda.getText(), fechai, fechau);
         ListModelList<ReporteProducto> modeloDeDatos = new ListModelList<ReporteProducto>(lista);
         listademanda.setModel(modeloDeDatos);
         gpb_lista.setVisible(true);
         buttonAceptar.setVisible(false);
         txtFechaLlegada.setDisabled(true);
         txtFechaSalida.setDisabled(true);
         if (cmb_tipo.getText().equals("General")) {
           listffinal.setVisible(true);
           listfinicial.setVisible(true);
           liscat.setVisible(true);
         } else {
           listffinal.setVisible(true);
           listfinicial.setVisible(true);
           liscat.setVisible(true);
         }
       }
     }
   }
 }
 public void onEliminarClicked(Event event) {
   logger.log(Level.INFO, "[ListConciliacionesCtrl][onEliminarClicked]");
   try {
     if (event instanceof org.zkoss.zk.ui.event.ForwardEvent) {
       ForwardEvent ev = (ForwardEvent) event;
       Button btn = (Button) ev.getOrigin().getTarget();
       if (btn != null) {
         conciliaSelected = (BcoConciliam) btn.getAttribute("data");
         if (conciliaSelected != null) {
           MensajeMultilinea.show(
               "¿Está seguro que desea eliminar este concilia?",
               Constants.MENSAJE_TIPO_INTERRROGACION,
               new EventListener() {
                 public void onEvent(Event evt) throws FmWebException {
                   Integer selected = (((Integer) evt.getData()).intValue());
                   if (selected == Messagebox.OK) {
                     try {
                       respuesta = conciliasBean.eliminarConcilia(conciliaSelected);
                       if (respuesta.getCodigoRespuesta() == Constants.CODE_OPERATION_OK) {
                         MensajeMultilinea.show(
                             respuesta.getMensajeRespuesta(), Constants.MENSAJE_TIPO_INFO);
                         refreshModel(0);
                       } else {
                         MensajeMultilinea.show(
                             respuesta.getMensajeRespuesta(), Constants.MENSAJE_TIPO_ERROR);
                       }
                     } catch (Exception ex) {
                       logger.log(Level.SEVERE, ex.getLocalizedMessage());
                       ex.printStackTrace();
                     }
                   } else if (selected == Messagebox.CANCEL) {
                     // cancelar la eliminacion
                     logger.log(
                         Level.INFO,
                         "[ListConciliacionesCtrl[onEliminarClicked] cancelo la acción");
                   }
                 }
               });
         }
       } else {
         logger.log(Level.SEVERE, "[onEliminarClicked]No se ha seleccionado un concilia");
       }
     }
   } catch (Exception e) {
     logger.log(Level.SEVERE, e.getLocalizedMessage());
     e.printStackTrace();
   }
 }
  public void loadDataToGrafik() throws IOException {
    DefaultCategoryDataset dataset = (DefaultCategoryDataset) this.generateData();
    chart =
        ChartFactory.createBarChart(
            "Statistik Pendidikan Dosen",
            "Prodi",
            "Jumlah Dosen",
            dataset,
            PlotOrientation.HORIZONTAL,
            true,
            true,
            false);
    chart.setBackgroundPaint(new Color(0xCC, 0xFF, 0xCC));

    final CategoryPlot plot = chart.getCategoryPlot();
    plot.setDomainAxisLocation(AxisLocation.BOTTOM_OR_LEFT);
    plot.setRangeAxisLocation(AxisLocation.TOP_OR_LEFT);
    plot.getRangeAxis().setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    final CategoryItemRenderer renderer1 = plot.getRenderer();
    renderer1.setSeriesPaint(0, Color.red);
    renderer1.setSeriesPaint(1, Color.yellow);
    renderer1.setSeriesPaint(2, Color.green);
    BarRenderer br = (BarRenderer) renderer1;
    br.setShadowVisible(false);

    br.setShadowVisible(false);
    BufferedImage bi = chart.createBufferedImage(900, 1500, BufferedImage.TRANSLUCENT, null);
    byte[] bytes = EncoderUtil.encode(bi, ImageFormat.PNG, true);
    AImage image = new AImage("Bar Chart", bytes);
    chartImg.setContent(image);
    btnExport.setDisabled(false);
  }