/*
 * 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.MercadoCompetido;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

/**
 *
 * @author rodrigo
 */
public class RenderMercadoCompetido implements ListitemRenderer {

    public void render(Listitem lstm, Object o) throws Exception {
        MercadoCompetido mercadoCompetido = (MercadoCompetido) o;

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

        lc = new Listcell(mercadoCompetido.getClaseServicio().getDescclase());
        lc.setParent(lstm);

        lc = new Listcell(mercadoCompetido.getOrigem().getDescparada());
        lc.setParent(lstm);

        lc = new Listcell(mercadoCompetido.getDestino().getDescparada());
        lc.setParent(lstm);

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