correção: Ao apagar o combobox, setar como null o atributo do puntoventa
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@28237 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
2482eb2ae4
commit
4fc71289ab
|
@ -602,15 +602,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
cmbParada.setText(puntoVenta.getParada().getDescparada());
|
cmbParada.setText(puntoVenta.getParada().getDescparada());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PuntoVenta puntoVentaPadre = puntoVenta.getPuntoVentaPadre();
|
|
||||||
if (puntoVentaPadre != null) {
|
|
||||||
List<PuntoVenta> ls = new ArrayList<PuntoVenta>();
|
|
||||||
ls.add(puntoVentaPadre);
|
|
||||||
|
|
||||||
cmbPuntoVentaPadre.setModel(new BindingListModelList(ls, false));
|
|
||||||
cmbPuntoVentaPadre.setText(puntoVentaPadre.getNombpuntoventa());
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Punto de Venta: " + e);
|
log.error("Punto de Venta: " + e);
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
|
@ -759,6 +750,10 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
cmbTipoConta.getValue();
|
cmbTipoConta.getValue();
|
||||||
cmbPosicao.getValue();
|
cmbPosicao.getValue();
|
||||||
|
|
||||||
|
//checar uma forma onde o proprio componente coloque como null o atributo
|
||||||
|
if (cmbPuntoVentaPadre.getSelectedItem() == null){
|
||||||
|
puntoVenta.setPuntoVentaPadre(null);
|
||||||
|
}
|
||||||
List<PuntoVenta> lsPuntoVenta = puntoVentaService.buscaPuntoVenta(txtNumPtoVta.getValue());
|
List<PuntoVenta> lsPuntoVenta = puntoVentaService.buscaPuntoVenta(txtNumPtoVta.getValue());
|
||||||
|
|
||||||
if (!lsPuntoVenta.isEmpty()) {
|
if (!lsPuntoVenta.isEmpty()) {
|
||||||
|
@ -2073,21 +2068,6 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
|
||||||
this.ptovtaUsuarioBancarioList = ptovtaUsuarioBancarioList;
|
this.ptovtaUsuarioBancarioList = ptovtaUsuarioBancarioList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onSelect$cmbPuntoVentaPadre(Event ev) throws InterruptedException {
|
|
||||||
Comboitem cbiPuntoVenta = cmbPuntoVentaPadre.getSelectedItem();
|
|
||||||
PuntoVenta puntoVentaSub = (PuntoVenta) cbiPuntoVenta.getValue();
|
|
||||||
|
|
||||||
if (puntoVentaSub.getPuntoVentaPadre() != null) {
|
|
||||||
Messagebox.show(
|
|
||||||
(Labels.getLabel("editarPuntoVentaController.msg.naopodesersubordinadaehsubordinada")).replace("<1>", puntoVentaSub.getNombpuntoventa()).replace("<2>", puntoVentaSub.getPuntoVentaPadre().getNombpuntoventa()),
|
|
||||||
Labels.getLabel("editarPuntoVentaController.window.title"),
|
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
|
||||||
|
|
||||||
cmbPuntoVentaPadre.setSelectedItem(null);
|
|
||||||
cmbPuntoVentaPadre.setText(null);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void onChange$cmbPuntoVentaPadre(Event ev) throws InterruptedException {
|
public void onChange$cmbPuntoVentaPadre(Event ev) throws InterruptedException {
|
||||||
if (puntoVenta.getPuntoventaId() != null) {
|
if (puntoVenta.getPuntoventaId() != null) {
|
||||||
List<PuntoVenta> lsPuntosSubordinados = puntoVentaService.buscarPuntoVentaSubordinados(puntoVenta);
|
List<PuntoVenta> lsPuntosSubordinados = puntoVentaService.buscarPuntoVentaSubordinados(puntoVenta);
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
# <controler>. <id>. <propiedade> = XXX
|
# <controler>. <id>. <propiedade> = XXX
|
||||||
|
|
||||||
#Versao do VentaBoleto:
|
#Versao do VentaBoleto:
|
||||||
versao = ADM_20130624_1RC163
|
versao = ADM_20130625_1RC164
|
||||||
|
|
||||||
# MSG Defaut:
|
# MSG Defaut:
|
||||||
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
MSG.CONSTRAINT.PORCENTAGEM = Os valores devem estar entre 0 e 100
|
||||||
|
|
|
@ -135,6 +135,7 @@
|
||||||
<combobox id="cmbPuntoVentaPadre"
|
<combobox id="cmbPuntoVentaPadre"
|
||||||
mold="rounded" buttonVisible="true" width="90%"
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||||
|
initialValue="@{winEditarPuntoVenta$composer.puntoVenta.puntoVentaPadre}"
|
||||||
selectedItem="@{winEditarPuntoVenta$composer.puntoVenta.puntoVentaPadre}"/>
|
selectedItem="@{winEditarPuntoVenta$composer.puntoVenta.puntoVentaPadre}"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
|
|
Loading…
Reference in New Issue