该帖已经被评为良好帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-02-02
addprocess.html报错,说那个message div没有,搞不清楚为什么了
|
|
返回顶楼 | |
发表时间:2007-02-02
lzzzl 写道 addprocess.html报错,说那个message div没有,搞不清楚为什么了
注释掉XiorkFlow\WebRoot\demo\addprocess.js的以下这一行,这行是调试代码时候输出日志用的。 //Message.setOutter(Toolkit.getElementByID("message")); |
|
返回顶楼 | |
发表时间:2007-02-02
没有想到技术发展的这么快,落后了真的落后了
|
|
返回顶楼 | |
发表时间:2007-02-02
xio 写道 chpn 写道 非常感谢!
看了许久还是没明白 我只想有一个画板,其它部分不要 用js控制XiorkFlow画一个工作流图,不是从一个链接载入一个xml文档 //create ur workflow container var container = document.getElmentById("UrDivElementID");[color=red]//UrDivElementID已确定页面上存在[/color] //create XiorkFlow var model = new XiorkFlowModel(); var xiorkFlowWrapper = new XiorkFlowWrapper(container, model); //or u can do it like this: //var xiorkFlowWrapper = new XiorkFlowWrapper(container); //var model = xiorkFlowWrapper.getModel(); //new node var newNodeModel = new NodeModel(); //supported NodeModel,ForkNodeModel,JoinNodeModel,StartNodeModel,EndNodeModel newNodeModel.setText("New Node"); newNodeModel.setPosition(new Point(5,5)); model.addMetaNodeModel(newNodeModel); var newNodeModel2 = new EndNodeModel(); newNodeModel2.setText("New End Node"); newNodeModel2.setPosition(new Point(5,55)); model.addMetaNodeModel(newNodeModel2); //create TransitionModel from newNodeModel to newNodeModel2 var transitionModel = new TransitionModel(newNodeModel, newNodeModel2); model.addTransitionModel(transitionModel); 上面的16行出错,尝试将container = document.getElmentById("UrDivElementID")换为Toolkit.getElementByID("UrDivElementID");也一样,UrDivElementID在页面中确定已经存在. 此错误包含以下代码: XiorkFlowWrapper.prototype._initViewer = function () { this.getViewer().setPosition("relative");//this.getViewer返回undefined // if (this.getModel().isEditable()) { this.getViewer().addMouseListener(new WrapperMetaMouseListener(this)); this.getViewer().addMouseListener(new WrapperSelectMouseListener(this)); this.getViewer().addMouseListener(new MetaMoveMouseListener(this)); this.getViewer().addMouseListener(new WrapperTransitionMouseListener(this)); this.getViewer().addKeyListener(new MetaMoveKeyListener(this)); } }; 这是怎么加事? |
|
返回顶楼 | |
发表时间:2007-02-03
不错,我写过一份工作流,不过感觉特复杂,代码乱得要命,你这个人性化一点,支持可视化编辑
|
|
返回顶楼 | |
发表时间:2007-02-03
很抱歉,上次贴的代码有些些问题。
而且项目本身的设计不够好。 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html xmlns:v="urn:schemas-microsoft-com:vml"> <head> <title>XiorkFlow test</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script charset="UTF-8" src="XiorkFlow/js/XiorkFlowWorkSpace.js" language="javascript"></script> <script type="text/javascript" language="javascript"> //load all js XiorkFlowWorkSpace.build(); function init(){ //create ur workflow container var container = new ScrollPanel(document.getElementById("xiorkflowViewer")); container.setClassName("NAME_XIO_UI_FONT NAME_XIO_XIORKFLOW_VIEWER"); //create XiorkFlow var model = new XiorkFlowModel(); model.setEditable(false);//important var xiorkFlowWrapper = new XiorkFlowWrapper(container, model); //new node var newNodeModel = new NodeModel(); //supported NodeModel,ForkNodeModel,JoinNodeModel,StartNodeModel,EndNodeModel newNodeModel.setText("New Node"); newNodeModel.setPosition(new Point(5,5)); model.addMetaNodeModel(newNodeModel); var newNodeModel2 = new EndNodeModel(); newNodeModel2.setText("New End Node"); newNodeModel2.setPosition(new Point(5,55)); model.addMetaNodeModel(newNodeModel2); //create TransitionModel from newNodeModel to newNodeModel2 var transitionModel = new TransitionModel(newNodeModel, newNodeModel2); model.addTransitionModel(transitionModel); } </script> </head> <body onload="init()"> <div id="xiorkflowViewer" style="width: 100%;height: 100%;border: #e0e0e0 1px solid;"></div> </body> </html> chpn 写道 xio 写道 chpn 写道 非常感谢!
看了许久还是没明白 我只想有一个画板,其它部分不要 用js控制XiorkFlow画一个工作流图,不是从一个链接载入一个xml文档 //create ur workflow container var container = document.getElmentById("UrDivElementID");[color=red]//UrDivElementID已确定页面上存在[/color] //create XiorkFlow var model = new XiorkFlowModel(); var xiorkFlowWrapper = new XiorkFlowWrapper(container, model); //or u can do it like this: //var xiorkFlowWrapper = new XiorkFlowWrapper(container); //var model = xiorkFlowWrapper.getModel(); //new node var newNodeModel = new NodeModel(); //supported NodeModel,ForkNodeModel,JoinNodeModel,StartNodeModel,EndNodeModel newNodeModel.setText("New Node"); newNodeModel.setPosition(new Point(5,5)); model.addMetaNodeModel(newNodeModel); var newNodeModel2 = new EndNodeModel(); newNodeModel2.setText("New End Node"); newNodeModel2.setPosition(new Point(5,55)); model.addMetaNodeModel(newNodeModel2); //create TransitionModel from newNodeModel to newNodeModel2 var transitionModel = new TransitionModel(newNodeModel, newNodeModel2); model.addTransitionModel(transitionModel); 上面的16行出错,尝试将container = document.getElmentById("UrDivElementID")换为Toolkit.getElementByID("UrDivElementID");也一样,UrDivElementID在页面中确定已经存在. 此错误包含以下代码: XiorkFlowWrapper.prototype._initViewer = function () { this.getViewer().setPosition("relative");//this.getViewer返回undefined // if (this.getModel().isEditable()) { this.getViewer().addMouseListener(new WrapperMetaMouseListener(this)); this.getViewer().addMouseListener(new WrapperSelectMouseListener(this)); this.getViewer().addMouseListener(new MetaMoveMouseListener(this)); this.getViewer().addMouseListener(new WrapperTransitionMouseListener(this)); this.getViewer().addKeyListener(new MetaMoveKeyListener(this)); } }; 这是怎么加事? |
|
返回顶楼 | |
发表时间:2007-02-05
xio!!谢谢了,空了研究研究!!
|
|
返回顶楼 | |
发表时间:2007-03-07
膜拜下先,太弓虽了!
数据是存储在页面中的,请问如何存储在数据库中呢 |
|
返回顶楼 | |
发表时间:2007-03-08
这是个很好的开始,为什么作者不继续维护下去???
说不知道工作流的话,可以参考别的,没有跨browser,感到很遗憾。。。。 一个好的项目就这样胎死腹中,未免可惜? |
|
返回顶楼 | |
发表时间:2007-03-09
对楼主的无私奉献精神表示感谢!
请问我能不能在此基础上做修改作为自己用啊? |
|
返回顶楼 | |