workflowlist.java

来自「采用tapestry的简单OA系统」· Java 代码 · 共 32 行

JAVA
32
字号
package com.ejsun.entapps.presentation.pages.simpleoa;

import org.apache.tapestry.IRequestCycle;

import com.ejsun.entapps.domain.simpleoa.Form;
import com.ejsun.entapps.domain.simpleoa.WorkflowDescriptor;
import com.ejsun.entapps.presentation.pages.Protected;
import com.ejsun.entapps.service.simpleoa.WorkflowService;

/**
 * @author	Quake Wang
 * @since	2004-5-10
 * @version $Revision: 1.2 $
 * 
 **/
public abstract class WorkflowList extends Protected {
	public abstract WorkflowService getWorkflowService();
	public abstract WorkflowDescriptor getDescriptor();
		
	public WorkflowDescriptor[] getDescriptors() {
		return getWorkflowService().getAllWorkflowDescriptors();
	}
	
	public void initializeWorkflow(IRequestCycle cycle) {
		Form form = getWorkflowService().initializeWorkflow(getDescriptor());
		EditForm editForm = (EditForm) cycle.getPage("EditForm");
		editForm.setFormId(form.getId());
		editForm.setForm(form);
		cycle.activate(editForm);
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?