/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.rjconsultores.ventaboletos.web.utilerias.render;

import com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueParada;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

/**
 *
 * @author Desenvolvimento
 */
public class RenderTaxaEmbarqueParada implements ListitemRenderer {

    public void render(Listitem lstm, Object o) throws Exception {
        TaxaEmbarqueParada taxaParada = (TaxaEmbarqueParada) o;

        Listcell lc = new Listcell(taxaParada.getTaxaembarqueparadaId() == null ? " - " : taxaParada.getTaxaembarqueparadaId().toString());
        lc.setParent(lstm);

        lc = new Listcell(taxaParada.getParadaId() == null ? " - " : taxaParada.getParadaId().getDescparada());
        lc.setParent(lstm);

        lc = new Listcell(taxaParada.getOrgaoconcedenteId() == null ? " - " : taxaParada.getOrgaoconcedenteId().getDescOrgao());
        lc.setParent(lstm);
        lc = new Listcell(taxaParada.getKmate() == null ? " - " : taxaParada.getKmate().toString());
        lc.setParent(lstm);

        lc = new Listcell(taxaParada.getIndtipo() == 'K' ? "Não" : "Sim");
        lc.setParent(lstm);

        lc = new Listcell(taxaParada.getValortaxa() == null ? " - " : taxaParada.getValortaxa().toString());
        lc.setParent(lstm);

        lstm.setAttribute("data", taxaParada);
    }
}
