fixbug #6970
Correção de merge git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@52242 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
6020b9c512
commit
952263ae6c
|
@ -14,6 +14,7 @@ import org.zkoss.zkplus.spring.SpringUtil;
|
|||
import org.zkoss.zul.Column;
|
||||
import org.zkoss.zul.Columns;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Grid;
|
||||
import org.zkoss.zul.Hbox;
|
||||
import org.zkoss.zul.Intbox;
|
||||
|
@ -135,6 +136,10 @@ public class GridRutaTramoCoeficiente extends Grid implements RowRenderer, Rende
|
|||
Column columnVia = new Column(Labels.getLabel("gridRutaSecuencia.columnVia.label"));
|
||||
columnVia.setWidth("15%");
|
||||
columns.appendChild(columnVia);
|
||||
|
||||
Column permiteVenda = new Column(Labels.getLabel("gridRutaSecuencia.columnVenda.label"));
|
||||
permiteVenda.setWidth("6%");
|
||||
columns.appendChild(permiteVenda);
|
||||
|
||||
Column kmsReal = new Column(Labels.getLabel("gridRutaSecuencia.columnKmsReal.label"));
|
||||
kmsReal.setWidth("6%");
|
||||
|
@ -276,6 +281,47 @@ public class GridRutaTramoCoeficiente extends Grid implements RowRenderer, Rende
|
|||
}
|
||||
});
|
||||
row.appendChild(cboVia);
|
||||
|
||||
// Cell Venda
|
||||
final Combobox cboVenda = new Combobox();
|
||||
cboVenda.setId(cboVenda.getUuid());
|
||||
cboVenda.setReadonly(true);
|
||||
cboVenda.setWidth("100%");
|
||||
cboVenda.setConstraint("no empty");
|
||||
|
||||
ListModelList listCboVenda = new ListModelList();
|
||||
|
||||
final Comboitem cbiSim = new Comboitem("Sim");
|
||||
cbiSim.setValue("Sim");
|
||||
|
||||
final Comboitem cbiNao = new Comboitem("Não");
|
||||
cbiNao.setValue("Não");
|
||||
|
||||
listCboVenda.add(cbiSim.getValue());
|
||||
listCboVenda.add(cbiNao.getValue());
|
||||
|
||||
if (secuenciaRutaTramoCoeficienteVO.getPermiteVenda() == null && this.getId().equalsIgnoreCase("gridrutasecuenciaida")){
|
||||
listCboVenda.addSelection(cbiNao.getValue());
|
||||
secuenciaRutaTramoCoeficienteVO.setPermiteVenda(Boolean.FALSE);
|
||||
} else if (this.getId().equalsIgnoreCase("gridrutasecuenciavolta")){
|
||||
listCboVenda.addSelection(secuenciaRutaTramoCoeficienteVO.getPermiteVenda()?cbiSim.getValue():cbiNao.getValue());
|
||||
}
|
||||
|
||||
cboVenda.setModel(listCboVenda);
|
||||
|
||||
cboVenda.addEventListener(Events.ON_CHANGE, new EventListener() {
|
||||
|
||||
@Override
|
||||
public void onEvent(Event evt) throws Exception {
|
||||
if (cboVenda.getSelectedItem().getValue().equals(cbiSim.getValue())){
|
||||
secuenciaRutaTramoCoeficienteVO.setPermiteVenda(Boolean.TRUE);
|
||||
} else if (cboVenda.getSelectedItem().getValue().equals(cbiNao.getValue())){
|
||||
secuenciaRutaTramoCoeficienteVO.setPermiteVenda(Boolean.FALSE);
|
||||
}
|
||||
}
|
||||
});
|
||||
row.appendChild(cboVenda);
|
||||
|
||||
boolean esTramoEditable = (secuenciaRutaTramoCoeficienteVO.getTramoId() == null);
|
||||
boolean esTramoServicioEditable = (secuenciaRutaTramoCoeficienteVO.getTramoServicioId() == null);
|
||||
boolean esTramoCoeficienteEditable = (secuenciaRutaTramoCoeficienteVO.getOrgaoTramoId() == null);
|
||||
|
|
|
@ -94,17 +94,16 @@ public class EditarTramoRutaController extends MyGenericForwardComposer {
|
|||
gridRutaSecuencia.setLsVias(viaService.obtenerTodos());
|
||||
}
|
||||
|
||||
public void onSelect$cmbClaseServicio(Event e)throws InterruptedException {
|
||||
if (!validarPreenchimentoEmpresa()){
|
||||
public void onBlur$cmbClaseServicio(Event e)throws InterruptedException {
|
||||
if (cmbClaseServicio.getSelectedItem() != null && !validarPreenchimentoEmpresa()){
|
||||
cmbClaseServicio.setSelectedItem(null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public void onSelect$cmbOrgaoConcedente(Event e)throws InterruptedException {
|
||||
|
||||
if (!validarPreenchimentoEmpresa()){
|
||||
cmbOrgaoConcedente.setSelectedItem(null);
|
||||
public void onBlur$cmbOrgaoConcedente(Event e)throws InterruptedException {
|
||||
if (cmbOrgaoConcedente.getSelectedItem() != null && !validarPreenchimentoEmpresa()){
|
||||
cmbClaseServicio.setSelectedItem(null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue