concertando null pointer de indice do orgao concedente e alterando de textBox para IntBox os campos cantidade de asientos e cant eixos pois existia uma regex que não estava funcionando fixes bug #6491
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@48588 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
5e0cd6b39e
commit
90afd87b90
|
@ -63,12 +63,12 @@ public class EditarOrgaoConcedenteController extends MyGenericForwardComposer {
|
||||||
orgaoCancelacionList.setItemRenderer(new RenderOrgaoCancelacion());
|
orgaoCancelacionList.setItemRenderer(new RenderOrgaoCancelacion());
|
||||||
lsOrgaoCancelacion = orgaoCancelacionService.buscarPorOrgao(orgaoConcedente);
|
lsOrgaoCancelacion = orgaoCancelacionService.buscarPorOrgao(orgaoConcedente);
|
||||||
orgaoCancelacionList.setData(lsOrgaoCancelacion);
|
orgaoCancelacionList.setData(lsOrgaoCancelacion);
|
||||||
txtIndicePeaje.setValue(orgaoConcedente.getIndicePeaje() != null ? orgaoConcedente.getIndicePeaje().toString().replace(".", ",") : "0,0");
|
txtIndicePeaje.setValue(orgaoConcedente.getIndicePeaje() != null ? orgaoConcedente.getIndicePeaje().toString().replace(".", ",") : "");
|
||||||
txtNome.focus();
|
txtNome.focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
if(txtIndicePeaje != null){
|
if(txtIndicePeaje != null && txtIndicePeaje.getValueDecimal() != null){
|
||||||
BigDecimal bg = new BigDecimal(txtIndicePeaje.getValueDecimal().doubleValue());
|
BigDecimal bg = new BigDecimal(txtIndicePeaje.getValueDecimal().doubleValue());
|
||||||
if(bg.equals(new BigDecimal(0))){
|
if(bg.equals(new BigDecimal(0))){
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
|
@ -79,6 +79,8 @@ public class EditarOrgaoConcedenteController extends MyGenericForwardComposer {
|
||||||
}else{
|
}else{
|
||||||
orgaoConcedente.setIndicePeaje(txtIndicePeaje.getValueDecimal());
|
orgaoConcedente.setIndicePeaje(txtIndicePeaje.getValueDecimal());
|
||||||
}
|
}
|
||||||
|
}else{
|
||||||
|
orgaoConcedente.setIndicePeaje(txtIndicePeaje.getValueDecimal());
|
||||||
}
|
}
|
||||||
orgaoConcedenteService.actualizacion(orgaoConcedente);
|
orgaoConcedenteService.actualizacion(orgaoConcedente);
|
||||||
orgaoConcedenteList.updateItem(orgaoConcedente);
|
orgaoConcedenteList.updateItem(orgaoConcedente);
|
||||||
|
|
|
@ -146,8 +146,8 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
|
||||||
private static Logger log = Logger.getLogger(EditarCatalogoDeRutaController.class);
|
private static Logger log = Logger.getLogger(EditarCatalogoDeRutaController.class);
|
||||||
private boolean carregouCombinacao;
|
private boolean carregouCombinacao;
|
||||||
private MyTextbox txtNumRuta;
|
private MyTextbox txtNumRuta;
|
||||||
private MyTextbox txtCantEixos;
|
private Intbox txtCantEixos;
|
||||||
private MyTextbox txtCantAsientos;
|
private Intbox txtCantAsientos;
|
||||||
|
|
||||||
public Ruta getRuta() {
|
public Ruta getRuta() {
|
||||||
return ruta;
|
return ruta;
|
||||||
|
@ -661,14 +661,14 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
txtPrefixo.getValue();
|
txtPrefixo.getValue();
|
||||||
|
|
||||||
if(null != txtCantEixos && txtCantEixos.getValue().equals("0")){
|
if(null != txtCantEixos && txtCantEixos.getValue()!= null && txtCantEixos.getValue() == 0){
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarCatalogoDeRutaController.lblCantEixosZeroInvalido.value"),
|
Labels.getLabel("editarCatalogoDeRutaController.lblCantEixosZeroInvalido.value"),
|
||||||
Labels.getLabel("editarCatalogoDeRutaController.window.title"),
|
Labels.getLabel("editarCatalogoDeRutaController.window.title"),
|
||||||
Messagebox.OK, Messagebox.EXCLAMATION);
|
Messagebox.OK, Messagebox.EXCLAMATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(null != txtCantAsientos && txtCantAsientos.getValue().equals("0")){
|
if(null != txtCantAsientos && txtCantAsientos.getValue() != null && txtCantAsientos.getValue() == 0){
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarCatalogoDeRutaController.lblCantAsientosZeroInvalido.value"),
|
Labels.getLabel("editarCatalogoDeRutaController.lblCantAsientosZeroInvalido.value"),
|
||||||
Labels.getLabel("editarCatalogoDeRutaController.window.title"),
|
Labels.getLabel("editarCatalogoDeRutaController.window.title"),
|
||||||
|
@ -884,19 +884,19 @@ public class EditarCatalogoDeRutaController extends MyGenericForwardComposer
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public MyTextbox getTxtCantEixos() {
|
public Intbox getTxtCantEixos() {
|
||||||
return txtCantEixos;
|
return txtCantEixos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTxtCantEixos(MyTextbox txtCantEixos) {
|
public void setTxtCantEixos(Intbox txtCantEixos) {
|
||||||
this.txtCantEixos = txtCantEixos;
|
this.txtCantEixos = txtCantEixos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public MyTextbox getTxtCantAsientos() {
|
public Intbox getTxtCantAsientos() {
|
||||||
return txtCantAsientos;
|
return txtCantAsientos;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setTxtCantAsientos(MyTextbox txtCantAsientos) {
|
public void setTxtCantAsientos(Intbox txtCantAsientos) {
|
||||||
this.txtCantAsientos = txtCantAsientos;
|
this.txtCantAsientos = txtCantAsientos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -147,14 +147,12 @@
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarCatalogoDeRutaController.lblCantEixos.value')}" />
|
<label value="${c:l('editarCatalogoDeRutaController.lblCantEixos.value')}" />
|
||||||
<textbox id="txtCantEixos" maxlength="2"
|
<intbox id="txtCantEixos" maxlength="2"
|
||||||
constraint="/[0-9]{0,2}|/, no zero" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
|
||||||
value="@{winEditarRuta$composer.ruta.cantEixos}" />
|
value="@{winEditarRuta$composer.ruta.cantEixos}" />
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarCatalogoDeRutaController.lblCantAsientos.value')}" />
|
<label value="${c:l('editarCatalogoDeRutaController.lblCantAsientos.value')}" />
|
||||||
<textbox id="txtCantAsientos" maxlength="2"
|
<intbox id="txtCantAsientos" maxlength="2"
|
||||||
constraint="/[0-9]{0,2}|/, no zero" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox"
|
|
||||||
value="@{winEditarRuta$composer.ruta.cantAsientos}" />
|
value="@{winEditarRuta$composer.ruta.cantAsientos}" />
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
|
|
Loading…
Reference in New Issue