集成 Macromedia Flash 和 IBM Lotus Notes/Domino:基于 Domino 解决方案的基于 Flash 的 UI

http://tech.ddvip.com   2008年10月15日    社区交流 收藏本文

内容摘要:利用基于 Macromedia Flash 的视图来呈现 Domino 视图的内容和合并 Domino 视图的设计。利用此解决方案,可以快速地为 Web 用户展示标准的 Domino 视图并方便地为 Lotus Notes 和 Web 客户机更新单个 Domino 视图的设计。

  要应用视图的设计设置,必须将此处显示的代码添加到 onXMLViewDesignLoad 函数中,获取 ?ReadDesign 命令的内容时将执行该函数。同样,遍历结果时使用一个临时数组来保存 XML 节点。

var arrViewCols = [];
arrViewCols = xmlViewDesign.firstChild.childNodes;
for (var col = 0; col<(arrViewCols.length); col++) {
 if (arrViewCols[col].nodeName == "column") {
 var column = dgridView.getColumnAt(col);
 column.headerText = arrViewCols[col].attributes.title;
 column.width = int(arrViewCols[col].attributes.width);
 column.resizable = Boolean(arrViewCols[col].attributes.resize);
 column.setStyle("fontSize",
  int(arrViewCols[col].firstChild.nextSibling.attributes.size));
 column.setStyle("fontFamily",
  arrViewCols[col].firstChild.nextSibling.attributes.face);
 column.setStyle("color",
  arrViewCols[col].firstChild.nextSibling.attributes.color);
 }
}
dgridView.redraw();

  此代码遍历 XML 中定义的每一列,并将设置应用于 DataGrid 组件的列。它通过使用 setStyle 属性设置适当的层叠样式表 (CSS) 值来完成此操作。

  此代码支持的视图设计的设计属性包括:

  列标题文本

  列宽

  列是否可以调整大小

  列字体大小

  当然,通过添加代码以支持更多视图设计的属性,可以轻松地扩展此列表。

  在新解决方案中实现 FlashNotesView.as

  要在新 Flash 影片(例如 FlashNotesView_clean.fla 中包括的影片)开始时使用 FlashNotesView.as,可以在 Flash 影片的 Actions 窗格的第 1 帧中添加此行:

来源:ibm    作者:Jonas Israelsson    责编:豆豆技术应用

正在加载评论...