/*
 * 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.PeriodoVacacional;
import java.text.SimpleDateFormat;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

/**
 *
 * @author Rafius
 */
public class RenderPeriodoVacacional implements ListitemRenderer {

    public void render(Listitem lstm, Object o) throws Exception {
        PeriodoVacacional pv = (PeriodoVacacional) o;

        Listcell lc = new Listcell(pv.getPeriodovacacionalId().toString());
        lc.setParent(lstm);

        SimpleDateFormat sf = new SimpleDateFormat("dd/MM/yyyy");
        lc = new Listcell(sf.format(pv.getFecinicio()));
        lc.setParent(lstm);

        lc = new Listcell(sf.format(pv.getFecfinal()));
        lc.setParent(lstm);
        lstm.setAttribute("data", pv);
    }
}
