fixes bug #9684
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@73103 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
590cf8061c
commit
53777f95cd
|
@ -4,24 +4,35 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.PricingRuta;
|
|
||||||
import org.zkoss.zul.Listcell;
|
import org.zkoss.zul.Listcell;
|
||||||
import org.zkoss.zul.Listitem;
|
import org.zkoss.zul.Listitem;
|
||||||
import org.zkoss.zul.ListitemRenderer;
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.PricingRuta;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
*/
|
*/
|
||||||
public class RenderPricingRuta implements ListitemRenderer {
|
public class RenderPricingRuta implements ListitemRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
public void render(Listitem lstm, Object o) throws Exception {
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
PricingRuta pc = (PricingRuta) o;
|
PricingRuta pc = (PricingRuta) o;
|
||||||
|
|
||||||
Listcell lc = new Listcell();
|
Listcell lc = new Listcell();
|
||||||
|
|
||||||
if (pc.getRuta() != null) {
|
if (pc.getRuta() != null && pc.getRuta().getRutaId() != null) {
|
||||||
lc = new Listcell(pc.getRuta().getRutaId().toString() + " - " + pc.getRuta().getDescruta() + " - " + pc.getRuta().getPrefixo() );
|
String descLinha = "";
|
||||||
|
if (pc.getRuta().getRutaId() != -1) {
|
||||||
|
String sentido = pc.getRuta().getIndSentidoIda() == null || Boolean.TRUE.equals(pc.getRuta().getIndSentidoIda()) ? "IDA" : "VOLTA";
|
||||||
|
String descClasse = pc.getRuta().getClaseServicio() != null ? pc.getRuta().getClaseServicio().getDescclase() : "null";
|
||||||
|
descLinha = pc.getRuta().getNumRuta() + " - " + pc.getRuta().getDescruta() + " - "
|
||||||
|
+ pc.getRuta().getRutaId().toString() + " - " + descClasse + " - " + sentido;
|
||||||
|
} else {
|
||||||
|
descLinha = pc.getRuta().getDescruta();
|
||||||
|
}
|
||||||
|
lc = new Listcell(descLinha);
|
||||||
} else {
|
} else {
|
||||||
lc = new Listcell("-");
|
lc = new Listcell("-");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue