deleted the discarded code.

This commit is contained in:
zhaowei8188127 2013-05-21 22:49:55 +08:00
parent 52e4332baa
commit 213888ca75
4 changed files with 79 additions and 21 deletions

View File

@ -1,5 +1,20 @@
1 安装maven
2 下载工程文件
3 进入工程目录,输入命令 mvn eclipse:eclipse,建立eclipse工程
4 导入myeclipse或eclipse
5 使用myeclipse插件部署到tomcat中 或者使用 mvn package命令打包成war文件手动部署到tomcat
环境配置
1. 下载安装git bash
2. 下载安装maven
3. 下载安装myeclipse8.5(群共享里面有)
4. 下载代码github页面https://github.com/justinliucs/haflow
git clone git@github.com:justinliucs/haflow.git
5. 将工程导入MyEclipse
a 进入工程根目录,输入命令 mvn eclipse:eclipse,建立eclipse工程
b 导入myeclipse或eclipse
c 使用myeclipse插件部署到tomcat中 或者使用 mvn package命令打包成war文件手动部署到tomcat
如何阅读源码
1. 在工程里搜索demo.jsp这个是项目的主页
跟踪rOpenFlow(this)这个方法,查看整个项目工作原理。
当在主页左侧导航树结构中右键点击打开按钮时触发该rOpenFlow方法。
大部分js函数在如下两个文件中实现
src/main/webapp/static/js/src.js
src/main/webapp/static/dojolib/haflow/flow.js

View File

@ -0,0 +1,46 @@
package haflow.util.test;
//import haflow.discarded.FlowJson;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.Unmarshaller;
public class TestXml {
// public static void main(String[] args) {
// loadXML();
// saveXML();
// }
//
// public static void saveXML() {
// try {
// JAXBContext jc = JAXBContext.newInstance(flow.getClass());
// Marshaller m = jc.createMarshaller();
//
// m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
// m.marshal(flow, new FileOutputStream("src/main/resources/po.xml"));
// } catch (JAXBException e) {
// e.printStackTrace();
// } catch (FileNotFoundException e) {
// e.printStackTrace();
// }
// }
//
// public static FlowJson flow;
// public static void loadXML(){
// try {
// File file = new File("src/main/resources/flow.xml");
// JAXBContext jaxbContext = JAXBContext.newInstance(FlowJson.class);
// Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
// flow = (FlowJson) jaxbUnmarshaller.unmarshal(file);
// System.out.println(flow.toString());
// } catch (JAXBException e) {
// e.printStackTrace();
// }
// }
}

View File

@ -1,6 +1,5 @@
package haflow.xml.controller;
import haflow.flow.controller.EntryJsonController;
import haflow.util.xml.FlowType;
import haflow.util.xml.Project;
@ -49,7 +48,7 @@ public class FullController {
public @ResponseBody Project saveFlow(@RequestBody Project project) {
System.out.println(project.toString());
try {
URL url = EntryJsonController.class.getClassLoader()
URL url = FullController.class.getClassLoader()
.getResource("popo.xml");
JAXBContext jc = JAXBContext.newInstance(project.getClass());

View File

@ -58,10 +58,10 @@
data-dojo-props="iconClass:'dijitIconOpen', onClick:openFlow">Open</div>
<div data-dojo-type="dijit.MenuItem" id="openFlow2"
data-dojo-props="iconClass:'dijitIconOpen', onClick:openFlow2">Open2</div> -->
<div data-dojo-type="dijit.MenuItem" id="save"
data-dojo-props="iconClass:'dijitIconSave', onClick:saveFlow" >Save</div>
<!-- <div data-dojo-type="dijit.MenuItem" id="save"
data-dojo-props="iconClass:'dijitIconSave', onClick:saveFlow" >Save</div> -->
<div data-dojo-type="dijit.MenuItem" id="save2"
data-dojo-props="iconClass:'dijitIconSave', onClick:saveFlow2" >Save2</div>
data-dojo-props="iconClass:'dijitIconSave', onClick:saveFlow2" >Save Project</div>
<div data-dojo-type="dijit.MenuItem" id="newFlow"
data-dojo-props="iconClass:'dijitIconUndo', onClick:rNewFlow" >New Flow</div>
<div data-dojo-type="dijit.MenuItem" id="newErModule"
@ -72,8 +72,8 @@
<div data-dojo-type="dijit.PopupMenuBarItem" id="fun">
<span>Run</span>
<div data-dojo-type="dijit.Menu" id="helpMenu">
<div data-dojo-type="dijit.MenuItem" id="run"
data-dojo-props="iconClass:'dijitIconUndo', onClick:runFlow" >Run</div>
<!-- <div data-dojo-type="dijit.MenuItem" id="run"
data-dojo-props="iconClass:'dijitIconUndo', onClick:runFlow" >Run</div> -->
<div data-dojo-type="dijit.MenuItem" id="runCurrent"
data-dojo-props="iconClass:'dijitIconUndo', onClick:runCurrentFlow" >Run Current</div>
</div>
@ -102,9 +102,7 @@
<div data-dojo-type="dijit/tree/ForestStoreModel" data-dojo-id="continentModel"
data-dojo-props="store:continentStore, query:{type:'FLOW'},
rootId:'continentModel', rootLabel:'Entry Flows'"></div>
rootId:'continentModel', rootLabel:'Entry Flows'"></div>
<div data-dojo-type="dijit.Tree" id="menuTree"
data-dojo-props="model: continentModel, label:'工程', openOnClick:false">
@ -142,15 +140,15 @@
<div data-dojo-type="dijit.layout.TabContainer" data-dojo-props="region:'center', tabStrip:true" id="topTabs">
<!-- added by zhaowei -->
<!--
<div id="flowTab" data-dojo-type="dijit.layout.ContentPane" data-dojo-props='title:"Flow Widgets", style:"padding:10px;display:none;"'>
<div id="flowContentr" class="flowContent" >
<p></p>
</div>
</div>
<!-- end added by zhaowei -->
-->
</div>
</div>
<!-- end of region="center" TabContainer -->
@ -167,7 +165,7 @@
</ul>
</div>
<!-- btab 1 -->
<!--
<div id="btab1" data-dojo-type="dijit.layout.ContentPane" data-dojo-props='title:"Info", style:" padding:10px; "'>
<p>You can explore this single page after applying a Theme
for use in creation of your own theme.</p>
@ -187,7 +185,7 @@
</form>
</div><!-- end:info btab1 -->
</div>
<div id="btab2" data-dojo-type="dijit.layout.ContentPane" data-dojo-props='title:"Info2", style:" padding:10px; "'>
<div>
<form id="form11" method="GET" action="<c:url value="/run1" />">
@ -229,7 +227,7 @@
<div id="hiveContentPane" dojoType="dojox.layout.ContentPane" href="<c:url value="/hive" />">
Loading contents.html.
</div>
</div>
</div> -->
</div><!-- end Bottom TabContainer -->