fixes bug 6517
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@46463 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
da2a0c398c
commit
3e9a4faabf
|
@ -860,7 +860,8 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
return false;
|
||||
}
|
||||
if (pricingRutaList.getModel().getSize() == 0) {
|
||||
|
||||
if (pricingRutaList.getModel().getSize() == 0 && verificarContemTodas()) {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarPricingController.MSG.rutaVazio"),
|
||||
Labels.getLabel("editarPricingController.window.title"),
|
||||
|
@ -894,6 +895,17 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
return true;
|
||||
}
|
||||
|
||||
private Boolean verificarContemTodas() {
|
||||
String TODAS = "TODAS";
|
||||
for(int i = 0; i < pricingMercadoList.getModel().getSize(); i++ ){
|
||||
PricingMercado princingMercado = (PricingMercado) pricingMercadoList.getModel().getElementAt(i);
|
||||
if(princingMercado.getOrigen().getDescparada().equals(TODAS) || princingMercado.getDestino().getDescparada().equals(TODAS)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||
if (!validarObligatorios()) {
|
||||
|
@ -1677,6 +1689,7 @@ public class EditarPricingController extends MyGenericForwardComposer {
|
|||
Map args = new HashMap();
|
||||
args.put("pricingMercado", pMercado);
|
||||
args.put("pricingMercadoList", pricingMercadoList);
|
||||
//args.put("lsPricingMercado", lsPricingMercado);
|
||||
|
||||
openWindowPosi("/gui/pricing/editarPricingMercado.zul",
|
||||
Labels.getLabel("editarPricingController.windowMercado.title"), args, MODAL, "center,top");
|
||||
|
|
Loading…
Reference in New Issue