package info.bukova.isspst.ui.requirement;

import info.bukova.isspst.data.Workflow;
import info.bukova.isspst.ui.DocumentViewModel;

import org.zkoss.bind.annotation.BindingParam;
import org.zkoss.bind.annotation.Command;
import org.zkoss.bind.annotation.ExecutionArgParam;
import org.zkoss.bind.annotation.Init;
import org.zkoss.zul.Window;

public class LimitVM extends DocumentViewModel
{
	private Workflow workflow;
	
	@Init(superclass = true)
	public void init(@ExecutionArgParam("workflow") Workflow workflow) {
		this.workflow = workflow;
	}

	public Workflow getWorkflow() {
		return workflow;
	}

	@Command
	public void save(@BindingParam("window") Window window) {
		window.detach();
	}
	
	public boolean isCanSave() {
		return true;
	}

}
