package info.bukova.isspst.ui.tripbill;

import java.util.List;

import info.bukova.isspst.data.TripBill;
import info.bukova.isspst.services.tripbill.TripBillService;
import info.bukova.isspst.ui.BigDecimalConverter;
import info.bukova.isspst.ui.ListViewModel;

import org.zkoss.bind.annotation.Init;
import org.zkoss.zk.ui.select.annotation.WireVariable;

public class TripBillList extends ListViewModel<TripBill> {

	@WireVariable
	private TripBillService tripBillService;
	private BigDecimalConverter converter;

	@Init(superclass = true)
	public void initTripBill() {
		service = tripBillService;
		dataClass = TripBill.class;
		formZul = "tripBillForm.zul";
		//dataFilter = new MUnitFilter(getFilterTemplate());
		converter = new BigDecimalConverter();
	}

	@Override
	protected List<TripBill> getListFromService() {
		return tripBillService.getMy();
	}

	public BigDecimalConverter getConverter() {
		return converter;
	}

	@Override
	public boolean isAbleToAdd() {
		return false;
	}
	
}
