From 435e43407eb847540f2d2e009fa6f0e090a47a51 Mon Sep 17 00:00:00 2001 From: frederico Date: Wed, 4 May 2016 18:28:16 +0000 Subject: [PATCH] =?UTF-8?q?fixed=20bug=20#7416=20-=20adi=C3=A7=C3=A3o=20fi?= =?UTF-8?q?ltro=20de=20MAC=20tela=20de=20Esta=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@55568 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../seguridad/BusquedaEstacionController.java | 18 +++++++++++++++++- web/WEB-INF/i3-label_es_MX.label | 2 ++ web/WEB-INF/i3-label_pt_BR.label | 2 ++ web/gui/seguridad/busquedaEstacion.zul | 7 ++++++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/BusquedaEstacionController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/BusquedaEstacionController.java index 8839b9b91..dc1a1e7cd 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/BusquedaEstacionController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/BusquedaEstacionController.java @@ -46,12 +46,14 @@ public class BusquedaEstacionController extends MyGenericForwardComposer { private Paging pagingEstacion; private Textbox txtDescEstacion; private Combobox cmbPuntoVenta; + private Textbox txtMAC; private Longbox txtNumCaja; private static Logger log = Logger.getLogger(BusquedaEstacionController.class); @Override public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); + estacionList.setItemRenderer(new RenderEstacion()); estacionList.addEventListener("onDoubleClick", new EventListener() { @@ -98,7 +100,21 @@ public class BusquedaEstacionController extends MyGenericForwardComposer { estacionBusqueda.addSortAsc("descestacion"); estacionBusqueda.addFilterEqual("activo", Boolean.TRUE); - + if (txtMAC.getValue() != null && !txtMAC.getValue().isEmpty()) { + if(txtMAC.getValue().length() != 17){ + try { + Messagebox.show(Labels.getLabel("editarEstacionController.MSG.informarMACCompleto"), + Labels.getLabel("editarEstacionController.window.title"), + Messagebox.OK, Messagebox.INFORMATION); + } catch (InterruptedException ex) { + log.error(ex); + Clients.alert(Labels.getLabel("MSG.Error"), Labels.getLabel("editarEstacionController.window.title"), Messagebox.INFORMATION); + } + return; + } + Long l = Long.parseLong(txtMAC.getValue().replaceAll("-", ""), 16); + estacionBusqueda.addFilterLike("descmac", l.toString()); + } plwEstacion.init(estacionBusqueda, estacionList, pagingEstacion); if (estacionList.getData().length == 0) { diff --git a/web/WEB-INF/i3-label_es_MX.label b/web/WEB-INF/i3-label_es_MX.label index c65d51036..44891b4d9 100644 --- a/web/WEB-INF/i3-label_es_MX.label +++ b/web/WEB-INF/i3-label_es_MX.label @@ -3527,6 +3527,7 @@ busquedaEstacionController.ID.label = ID busquedaEstacionController.lhDescMac.label = Descripción MAC busquedaEstacionController.lhNumCaja.label = Caja busquedaEstacionController.lhPuntoVenta.label = Punto de venta +busquedaEstacionController.lhMAC.label = MAC busquedaEstacionController.btnPesquisa.label = Búsqueda busquedaEstacionController.nomeImpressora.label = Impresora busquedaEstacionController.nomeImpressoraRelatorio.label = Impresora reporte @@ -3560,6 +3561,7 @@ editarEstacionController.numEmpresa.label=Cód. Empresa editarEstacionController.numFilial.label=Cód. Filial editarEstacionController.numPdv.label=Num. PDV editarEstacionController.txtIpServidor.value = Dirección Sitef +editarEstacionController.MSG.informarMACCompleto = Informe o MAC completo para filtro. #Editar Estacion Sitef editarEstacionController.tab.label.sitef = SiTef diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label index 475732ed6..f4e63a728 100644 --- a/web/WEB-INF/i3-label_pt_BR.label +++ b/web/WEB-INF/i3-label_pt_BR.label @@ -3591,6 +3591,7 @@ busquedaEstacionController.ID.label = ID busquedaEstacionController.lhDescMac.label = Descrição Mac busquedaEstacionController.lhNumCaja.label = Caixa busquedaEstacionController.lhPuntoVenta.label = Ponto Venda +busquedaEstacionController.lhMAC.label = MAC busquedaEstacionController.btnPesquisa.label = Pesquisa busquedaEstacionController.nomeImpressora.label = Impressora busquedaEstacionController.nomeImpressoraRelatorio.label = Impressora Relatório @@ -3624,6 +3625,7 @@ editarEstacionController.numEmpresa.label=Cód. Empresa editarEstacionController.numFilial.label=Cód. Filial editarEstacionController.numPdv.label=Num. PDV editarEstacionController.txtIpServidor.value = Endereço Sitef +editarEstacionController.MSG.informarMACCompleto = Informe o MAC completo para filtro. #Editar Estacion Sitef editarEstacionController.tab.label.sitef = SiTef diff --git a/web/gui/seguridad/busquedaEstacion.zul b/web/gui/seguridad/busquedaEstacion.zul index 7502c1e86..85c540066 100644 --- a/web/gui/seguridad/busquedaEstacion.zul +++ b/web/gui/seguridad/busquedaEstacion.zul @@ -34,7 +34,6 @@