`
dqqmq
  • 浏览: 11891 次
  • 性别: Icon_minigender_2
  • 来自: 广州
社区版块
存档分类
最新评论

Hello World 简单做个Lily网站

阅读更多

 

<!-- [if !supportLists]-->1、    <!-- [endif]-->配置 JAR 包,加入 lily-2.0.jar

Hibernate 要用的包全加上:

加入开发架构平台支持包

lily-2.0.jar

<!-- [if !supportLists]-->2、    <!-- [endif]-->加入模块配置文件, action.cfg.xml

// 例:供应商管理属于采购模块

<? xml version = "1.0" encoding = "UTF-8" ?>

< action-navigator-configuration >

    < realm name = "demo" >

       < class name = "com.demo.DemoAction" />

       < class name = "com.demo.PersistenceAction" />

    </ realm >

    < realm name = "purchase" >

       < class name = "com.demo.virtual.PurchaseQuery" />

       < class name = "com.demo.domain.Supplier" />

    </ realm >

<!-- [if !supportLists]-->3、    <!-- [endif]-->网页总配置文件, lily.cfg.xml

// 加入网页配置文件。

<? xml version = "1.0" encoding = "UTF-8" ?>

< lily-configuration >

    <!-- mapping resource path -->

    < mappings dyna-load = "true" >

       <!-- default import package and classes -->

       < import > java.util.* </ import >

       < import > net.sf.lily.webObject.* </ import >

       < import > net.sf.lily.webObject.event.* </ import >

       < import > net.sf.lily.webObject.filter.* </ import >

       < import > net.sf.lily.webObject.validate.* </ import >

       < import > net.sf.lily.webObject.suite.* </ import >

       < import > net.sf.lily.iwebObject.* </ import >

       < import > net.sf.lily.webObject.ListViewBuilder$.* </ import >

       < import > net.sf.lily.webObject.ViewBuilder$.* </ import >

       < hibernate-sources >

           < property name = "configuration-class" > org.hibernate.cfg.AnnotationConfiguration </ property >

           < property name = "filepath" > hibernate.cfg.xml </ property >

       </ hibernate-sources >

       < view-sources >

<!—- 加入网页配置文件 -->

           < resource path = "com/demo/purchase.view.xml" />

       </ view-sources >

    </ mappings >

    <!-- ui installer properties -->

    < ui >

       < properties name = "net.sf.lily.cfg.UIInstaller" />

       < properties name = "net.sf.lily.cfg.ExUIInstaller" />

    </ ui >

    <!-- other settings -->

    < options >

       <!-- Echo all ajax response to stdout  -->

       < property name = "show-response" > true </ property >

    </ options >

</ lily-configuration >

<!-- [if !supportLists]-->4、  <!-- [endif]-->写一个 ActionClass ,如供应商 Supplier.java

// 建议常规写法

domain : BaseDomain ,数据对象

bo : BaseDomainBO ,业务处理对象

dao : BaseDomainDAO ,数据处理对象

<!-- [if !supportLists]-->5、  <!-- [endif]-->配置一个网页, *.view.xml

以供应商管理为例,里面有供应商录入、编辑列表、编辑内容页面。

    < class name = "Supplier" label = " 供应商管理 " >

       < property name = "entity" class = "Supplier" >

           < property name = "p1" label = " 供应商名称 " />       

           < property name = "p2" label = " 供应商开票名称 " />

           < property name = "p3" label = " 取代供应商 " />

           < property name = "p4" label = " 供应商编码 " />

           < property name = "p5" label = " 公司性质 " />

           < property name = "p6" label = " 法人 " />

           < property name = "p8" label = " 联系电话 " />

           < property name = "p9" label = " 销售经理 " />

           < property name = "p8" label = " 联系电话 " />         

           < property name = "p10" label = " 注册资金 " />

           < property name = "p11" label = " 经营范围 " />

           < property name = "p12" label = " 注册时间 " />

           < property name = "p13" label = " 平均年营业额 " />

           < property name = "p14" label = " 员工人数 " />

           < property name = "p15" label = " 研发人数 " />

           < property name = "p16" label = " 付款方式 " />

           < property name = "p17" label = " 帐号 " />

           < property name = "p18" label = " 交货方式 " />

           < property name = "p19" label = " 地址 " />

           < property name = "p20" label = " 网页 " />

           < property name = "p21" label = " 订单接受人 " />

           < property name = "p22" label = " 订单接受人联系电话 " />

           < property name = "p23" label = " 传真 " />

           < property name = "p24" label = " 评估表号 " />        

           < property name = "p25" label = " 供应商级别 " />

           < property name = "taxRate" label = "</span

  • 大小: 12.9 KB
  • 大小: 13 KB
  • 大小: 11.4 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics