filenet 的 wat 方式编程之二

摘要: Ui module 和 dataprovider 都是从 wcmModule 继承过来的. 提供了以下几个方法:addChild(…)getController()getDataStore()getModuleProperty(…)

Ui module 和 dataprovider 都是从 wcmModule 继承过来的. 提供了以下几个方法:
addChild(…)
getController()
getDataStore()
getModuleProperty(…)
setModuleProperty(..)
initialize()

initialize() - Called by WcmController when the module is registered, and has access
to the data store. This is the place to instantiate objects.
addChild(…) - Add the module as a child to this module.
setModuleProperty() - Set a key-value in the data store
getController() - Get the reference to the controller.
getDataStore() – get the data store object



WcmUIModule
定义了 ui module 的基本方法 ,包括:
render(…) 向页面输出 HTML
setJSP(…) 设置 render 用到的 jsp 页面.
onStartPage(…) event handle .

wcmuimodule 的 SETJSP() 的参数是基于/UI-INF/jsp/modules 这个路径的。比如 setjsp(“apps/xxx.jsp”) 那么他的路径就是/UI-INF/jsp/modules/apps/xxx.jsp
所以这里的参数路径是相对来的。
WcmJSPModule
从 WcmUIModule 继承过来.
包含了要 render 的 JSP 页面.
通过内部JSP 得到 module 对象以及数据等.
getCurrentModule(HttpServletRequest) 从请求返回当前当前模块实例 。

WcmXSLModule
将xml 数据 通过 xslt 转换输出为 html 呈现在用户界面 。
Setxml() xml 文件 ,来源于一个XML字符串或者 dataprovider。
Setxml有很多重载的方法, 比如:
public void setXML(java.lang.String xmlString)
Sets the source XML as String.
Parameters:
xmlString - Source XML in a String 字符串。
public void setXML(org.w3c.dom.Document domDocument)
Sets the source XML as Document.
Parameters:
domDocument - Source XML in DOM Document 文档。
public void setXML(java.io.InputStream inputStream)
Sets the source XML as InputStream
Parameters:
inputStream - InputStream object with the source XML
public void setXML(java.io.Reader reader)
Sets the source XML as Reader 文件流。
Parameters:
reader - Reader object with the source XML

Setxsl() xsl 文件必须在APP_ROOT/WEB-INF/xsl/ 这个目录下面.
setXSLParameter(string ,object) – Sets the XSL Parameter
Example:
setXSLParameter("columns", new Integer(5));
setXSLParameter("title", “Folder Navigation”);
所有的 wcmXSLModule 都会调用 wcmXSLUtil 里面的方法去处理 .
用 xml+xslt 的方式在 filenet workplace 中展示的例子如:WcmNavigationListView(文件夹平铺) ,WcmItemsListView(查询出来的文件列表等)

上一篇: filenet 的 wat 方式编程之一.
下一篇: java db2 DB2 SQL error: SQLCODE: -204, SQLSTATE: 4
 评论 ( What Do You Think )
名称
邮箱
网址
评论
验证
   
 

 


  • 微信公众号

  • 我的微信

站点声明:

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

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

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