WAT编程方式简单的例子

摘要: 前面介绍过了WAT的一些基础,今天来个简单的例子。模仿着看看怎么用,并跳转到自己处理的页面,如何和SERVLET结合,基本上什么事情都能做了。<%@ page import="filenet.vw.api.*"%><%@ page errorPage="/WcmError.jsp"

前面介绍过了WAT的一些基础,今天来个简单的例子。
模仿着看看怎么用,并跳转到自己处理的页面,如何和SERVLET结合,基本上什么事情都能做了。

<%@ page import="filenet.vw.api.*"%>
<%@ page errorPage="/WcmError.jsp"
import="com.filenet.wcm.apps.server.util.*,com.filenet.wcm.toolkit.server.base.*,com.filenet.wcm.toolkit.server.util.WcmServerCredentials,com.filenet.wcm.toolkit.server.util.WcmDataStore,java.util.*"%>
class="com.filenet.wcm.apps.server.controller.WcmWorkplaceController"
scope="request">


<%@page import="com.filenet.wcm.toolkit.util.WcmEncodingUtil"%>
<%@page import="java.net.URLEncoder"%>



Form Region Sample Code



<%
controller.configurePage(application, request, WcmController.NO_WINDOW_ID);
WcmDataStore dataStore = controller.getDataStore();
WcmServerCredentials credentials = dataStore.getServerCredentials();
String username = credentials.getUserId();
String password = credentials.getPassword();
VWSession vwSession = credentials.getVWSession();

//We can't name this variable session because JSP's have a variable named session already.
com.filenet.wcm.api.Session ceSession = credentials.getSession();
%>



<%
// See http://localhost:9080/ecm_help/nav/dev_wp_start.htm?../developer_help/workplace/guide/aeuis_cmd_ref.htm#1420

String baseUrl = controller.getWebappRootURL();
String commandId = "1420";
String responseUrl = URLEncoder.encode(baseUrl);
String windowTitle = WcmEncodingUtil.encodeLabel("Sample Code");

String objectStoreName = WcmEncodingUtil.encodeLabel("ObjectStoreName");
String vsId = "{3DEC23E4-03C2-4728-809A-B77A38DA78C7}";
String mimeType = WcmEncodingUtil.encodeURL("application/x-filenet-documentpolicy");
String op = "add";
String prefill = URLEncoder.encode("field1=1&field2=2&field3=3");
String displayForm = "true";
String showConfirm = "true";
String mergeData = "true";
String linkText = "Click here";

String url= baseUrl + "/integrationWebBasedCommand"
+ "?_commandId=" + commandId
+ "&_responseURL=" + responseUrl
+ "&_windowTitle=" + windowTitle
+ "&objectStoreName=" + objectStoreName
+ "&vsId=" + vsId
+ "&mimeType=" + mimeType
+ "&op=" + op
+ "&" + prefill
+ "&showConfirm=" + showConfirm
+ "&mergeData=" + mergeData ;

%>

');"><%=linkText%>



上一篇: Filenet实现报销流程二
下一篇: 根据文档版本VSID,得到文档对象
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

1、一号门博客CMS,由Python, MySQL, Nginx, Wsgi 强力驱动

2、部分文章或者资源来源于互联网, 有时候很难判断是否侵权, 若有侵权, 请联系邮箱:summer@yihaomen.com, 同时欢迎大家注册用户,主动发布无版权争议的 文章/资源.

3、鄂ICP备14001754号-3, 鄂公网安备 42280202422812号