dorado获取参数的几种方法

1.获取detaSet中得参数
Map parameters = (Map)dataSet.getParameters();
		String userName = (String)parameters.get("creater");
		String projectName = (String)parameters.get("flowProjectName");
		String sysOrgId = (String)parameters.get("orgDeptName");

2.获取Session中的参数。

SysUserInfo user = (SysUserInfo) DoradoContext.getContext().getAttribute("sysUserInfo");

 

3.设置Session中得参数,有些参数需要在整个会话中用的,我们可以把他设置到Session中

DoradoContext.getContext().setAttribute(DoradoContext.Sessoion, "sessionFlag", "1");

 4.获取跟在url后面的参数

String auditId =(String) DoradoContext.getContext().getParameter("auditId");

  5.,有些参数在View里面使用,从后台放在url里面穿到前台的时候在前台需要用,可以通过如下代码接受,然后在View里面就可以用了。

		<script type="text/javascript">
	       var flowProjectId = <%=request.getParameter("flowProjectId")%>;
	       var quarterId = <%=request.getParameter("quarterId")%>;
	       var proceedId = <%=request.getParameter("proceedId")%>;
           var flowTaskId = <%=request.getParameter("flowTaskId")%>;
	       var flowCaseId = <%=request.getParameter("flowCaseId")%>;
	        var id = <%=request.getParameter("id")%>;
	       <%String aaa=request.getParameter("transitions");
	        if(aaa!=null&&!aaa.equals(""))
	        { aaa=new String(aaa.getBytes("ISO-8859-1"),"UTF-8");}%>
	       var transitions = <%=aaa%>;
        </script>

 

你可能感兴趣的:(dorado)