From fad0f9219bc4eed7574e45d46f84a31c52850230 Mon Sep 17 00:00:00 2001 From: "lucas.taia" Date: Fri, 17 Oct 2014 19:39:00 +0000 Subject: [PATCH] ajuste (fixes bug 5729 ) git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@38707 d1611594-4594-4d17-8e1d-87c2c4800839 --- .../AtualizarCorridaFecHusoFecVeranoController.java | 13 +++++++++---- .../atualizarCorridaFecHusoFecVerano.zul | 8 ++++---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/esquemaoperacional/AtualizarCorridaFecHusoFecVeranoController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/esquemaoperacional/AtualizarCorridaFecHusoFecVeranoController.java index 01a001668..501d45146 100644 --- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/esquemaoperacional/AtualizarCorridaFecHusoFecVeranoController.java +++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/esquemaoperacional/AtualizarCorridaFecHusoFecVeranoController.java @@ -1,5 +1,8 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.Date; import java.util.List; @@ -8,12 +11,13 @@ import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Controller; import org.zkoss.util.resource.Labels; import org.zkoss.zk.ui.Component; +import org.zkoss.zk.ui.WrongValueException; import org.zkoss.zk.ui.event.Event; import org.zkoss.zul.Combobox; import org.zkoss.zul.Comboitem; -import org.zkoss.zul.Datebox; import org.zkoss.zul.Intbox; import org.zkoss.zul.Messagebox; +import org.zkoss.zul.Textbox; import com.rjconsultores.ventaboletos.entidad.Estado; import com.rjconsultores.ventaboletos.service.CorridaService; @@ -32,7 +36,7 @@ public class AtualizarCorridaFecHusoFecVeranoController extends MyGenericForward @Autowired private CorridaService corridaService; - private Datebox datInicial; + private Textbox datInicial; private Combobox cmbEstado; private List lsEstados; private Intbox ibxCorridaId; @@ -52,12 +56,13 @@ public class AtualizarCorridaFecHusoFecVeranoController extends MyGenericForward this.lsEstados = lsEstados; } - public void onClick$btnAtualizarCorridas(Event ev) throws InterruptedException { + public void onClick$btnAtualizarCorridas(Event ev) throws InterruptedException, WrongValueException, ParseException { Comboitem cbiEstado = cmbEstado.getSelectedItem(); if (cbiEstado != null) { + DateFormat df = new SimpleDateFormat("dd/MM/yyyy"); Estado estado = (Estado) cbiEstado.getValue(); - Date dataAPartirDe = datInicial.getValue(); + Date dataAPartirDe = df.parse(datInicial.getValue()); Integer corridaId = ibxCorridaId.getValue(); Boolean sucesso = false; if (corridaId == null) { diff --git a/web/gui/esquema_operacional/atualizarCorridaFecHusoFecVerano.zul b/web/gui/esquema_operacional/atualizarCorridaFecHusoFecVerano.zul index b385a942e..ca9ca9cce 100644 --- a/web/gui/esquema_operacional/atualizarCorridaFecHusoFecVerano.zul +++ b/web/gui/esquema_operacional/atualizarCorridaFecHusoFecVerano.zul @@ -12,13 +12,13 @@ - + - +