fixed bug #7557
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@58235 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
d7b24184c7
commit
a6bfda362d
|
@ -62,6 +62,7 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
|||
|
||||
private MyListbox excepcionPeajeVigenciaList;
|
||||
private List<ExcepcionPeajeVigencia> lsExcepcionPeajeVigencia;
|
||||
private List<ExcepcionPeajeVigencia> excepcionPeajeVigenciaToDelete;
|
||||
private ExcepcionPeajeVigencia excepcionPeajeVigencia;
|
||||
|
||||
private Datebox fecInicio;
|
||||
|
@ -139,6 +140,8 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
|||
public void doAfterCompose(Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
excepcionPeajeVigenciaToDelete = new ArrayList<ExcepcionPeajeVigencia>();
|
||||
|
||||
excepcionPeaje = (ExcepcionPeaje) Executions.getCurrent().getArg().get("excepcionPeaje");
|
||||
excepcionPeajeList = (MyListbox) Executions.getCurrent().getArg().get("excepcionPeajeList");
|
||||
lsExcepcionPeaje = (ArrayList<ExcepcionPeaje>) Executions.getCurrent().getArg().get("lsExcepcionPeaje");
|
||||
|
@ -334,6 +337,10 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
|||
Collections.sort(lsExcepcionPeaje);
|
||||
excepcionPeajeList.setData(lsExcepcionPeaje);
|
||||
}
|
||||
|
||||
if (!excepcionPeajeVigenciaToDelete.isEmpty()) {
|
||||
excepcionPeajeService.deletarVigencias(excepcionPeajeVigenciaToDelete);
|
||||
}
|
||||
Messagebox.show(
|
||||
Labels.getLabel("busquedaExcepcionPeajeController.MSG.suscribirOK"),
|
||||
Labels.getLabel("busquedaExcepcionPeajeController.window.title"),
|
||||
|
@ -383,6 +390,8 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
|||
closeWindow();
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void onClick$btnRemoverExcepcionPeajeVigencia(Event ev) {
|
||||
ExcepcionPeajeVigencia epv = (ExcepcionPeajeVigencia) excepcionPeajeVigenciaList.getSelected();
|
||||
if(epv != null){
|
||||
|
@ -394,7 +403,7 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
|||
excepcionPeajeVigenciaList.setData(lsExcepcionPeajeVigencia);
|
||||
excepcionPeaje.setLsExcepcionPeajeVigencia(lsExcepcionPeajeVigencia);
|
||||
if(epv.getExcepcionPeajeVigenciaId() != null){
|
||||
excepcionPeaje.getLsExcepcionPeajeVigencia().add(epv);
|
||||
excepcionPeajeVigenciaToDelete.add(epv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -485,6 +494,7 @@ public class EditarExcepcionPeajeController extends MyGenericForwardComposer {
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
lsExcepcionPeajeVigencia.add(excepcionPeajeVigencia);
|
||||
if(null != lsExcepcionPeajeVigencia){
|
||||
Collections.sort(lsExcepcionPeajeVigencia);
|
||||
|
|
Loading…
Reference in New Issue