package com.rjconsultores.ventaboletos.web.utilerias.render;

import org.zkoss.zul.Checkbox;
import org.zkoss.zul.Listcell;
import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;

import com.rjconsultores.ventaboletos.entidad.PricingFormapago;

public class RenderPricingFormaPago implements ListitemRenderer {

	@Override
	public void render(Listitem lstm, Object o) throws Exception {
		PricingFormapago ppg = (PricingFormapago) o;

		Listcell lc = new Listcell();
		lc = new Listcell(ppg.getFormaPago().getDescpago());
		lc.setParent(lstm);

		Checkbox ckbIndexcepcion = new Checkbox();
		if (ppg.getIndexcepcion()) {
			ckbIndexcepcion.setChecked(true);
		} else {
			ckbIndexcepcion.setChecked(false);
		}
		ckbIndexcepcion.setDisabled(true);
		lc = new Listcell();
		ckbIndexcepcion.setParent(lc);
		lc.setParent(lstm);

		lstm.setAttribute("data", ppg);

	}
}
