ofbiz进击 第四节。 我的form之旅
< form name= "returnHeaderReason" type = "single" default-map-name ="returnHeader" >
<actions >
<entity-one value-field = "returnHeader" entity-name= "ReturnHeader" >
<field-map field-name = "returnId" from-field= "parameters.returnId" />
</entity-one >
</actions >
<field name = "returnReason" title= "退货理由" ><display ></display ></field >
</form >
< auto-fields-entity entity-name = ""/>< auto-fields-service service-name = ""/>
< form name= "listReturnItem" type = "list" list-name= "listReturnItems"
odd-row-style= "alternate-row" header-row-style ="header-row-2" default-table-style = "basic-table hover-bar">
<actions >
<entity-and entity-name = "ReturnItem" use-cache= "false" list= "listReturnItems" >
<field-map field-name = "returnId" from-field= "parameters.returnId" />
</entity-and >
</actions >
<field name = "returnQuantity" title= "退货数量" ><display ></display ></field >
<field name = "returnPrice" title= "退货单价" ><display ></display ></field >
<field name = "returnTotalPrice" title= "退货金额" ><display ></display ></field >
</form >
< row-actions>
<script location= "component://portal/webapp/portal/WEB-INF/actions/returnOrder/listReturnItem.groovy" />
</row-actions >
if (!productId) return;
product = delegator.findOne ("Product" ,[productId:productId], false);
productDescription = product. get("description" )
context. productDescription = productDescription
<field name = "productDescription" title= "商品描述" ><display ></display ></field >
< decorator-section name = "body">
<section >
<widgets >
<decorator-screen name= "FindScreenDecorator" location= "component://common/widget/CommonScreens.xml" >
<decorator-section name= "search-options" >
<include-form name= "SearchReturnOrder" location= "component://portal/widget/ReturnOrderForms.xml" />
</decorator-section >
<decorator-section name= "search-results" >
<include-form name= "ListReturnOrder" location= "component://portal/widget/ReturnOrderForms.xml" />
</decorator-section >
</decorator-screen >
</widgets >
</section >
</decorator-section >
< form name= "SearchReturnOrder" target = "ListReturnOrder" title= "" type= "single"
header-row-style= "header" default-table-style = "basic-table talbe_left_padding">
<field name = "noConditionFind">< hidden value= "Y" /></field >
<field name = "returnId">< text ></text ></field >
<field name = "statusId" title= "${uiLabelMap.CommonStatus}">
<drop-down allow-empty = "true">
<entity-options entity-name = "StatusItem" description= "${description}" >
<entity-constraint name = "statusTypeId" operator= "equals" value = "ORDER_RETURN_STTS"/>
</entity-options >
</drop-down >
</field >
<field name = "createdStamp_fld0_value" title= "申请开始时间" >
<date-time type = "date"/>
</field >
<field name = "createdStamp_fld0_op">
<hidden value = "greaterThanFromDayStart"/>
</field >
<field name = "createdStamp_fld1_value" title= "申请结束时间" >
<date-time type = "date"/>
</field >
<field name = "createdStamp_fld1_op">
<hidden value = "upThruDay"/>
</field >
<field name = "searchButton" title= "${uiLabelMap.CommonFind}" widget-style= "smallSubmit" ><submit button-type = "button"/></ field>
</form >
<entity-constraint name = "statusTypeId" operator= "equals" value = "ORDER_RETURN_STTS"/>
<field name = "createdStamp_fld0_value" title= "申请开始时间" >
<date-time type = "date"/>
</field >
<field name = "createdStamp_fld0_op">
<hidden value = "greaterThanFromDayStart"/>
</field >
<form name="ListReturnOrder" target="" title="" list-name="listIt" type="list" paginate-target="ListReturnOrder"
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar jointd">
<actions>
<service service-name="performFind" result-map="result" result-map-list="listIt">
<field-map field-name="inputFields" from-field="parameters"/>
<field-map field-name="entityName" value="ReturnHeader"/>
<field-map field-name="orderBy" from-field="parameters.sortField"/>
<field-map field-name="viewIndex" from-field="viewIndex"/>
<field-map field-name="viewSize" from-field="viewSize"/>
</service>
</actions>
<row-actions>
<script location="component://portal/webapp/portal/WEB-INF/actions/returnOrder/listReturnOrder.groovy"/>
</row-actions>
<field name="returnId" title="退货单号"><display/></field>
<field name="createdStamp" title="申请时间" sort-field="true"><display/></field>
<field name="orderId" title="原订单号">
<display/>
</field>
<field name="fromPartyId" title="申请人">
<display/>
</field>
<field name="totalPrice" title="总金额">
<display/>
</field>
<field name="statusId" title="退货单状态" sort-field="true">
<display-entity entity-name="StatusItem" key-field-name="statusId" description="${description}"/>
</field>
<field name="backLink" title="退回" widget-style="buttontext" use-when=""RETURN_REQUESTED".equals(statusId)">
<hyperlink target="backReturnOrder" description="退回" confirmation-message="确认要退回该退货单?">
<parameter param-name="returnId"/>
</hyperlink>
</field>
<field name="acceptLink" title="审核" widget-style="buttontext" use-when=""RETURN_REQUESTED".equals(statusId)">
<hyperlink target="acceptReturnOrder" description="审核" confirmation-message="确认提交审核?">
<parameter param-name="returnId"/>
</hyperlink>
</field>
<field name="viewLink" title="查看" widget-style="buttontext">
<hyperlink target="viewReturnOrder" description="查看">
<parameter param-name="returnId"/>
<parameter param-name="orderId"/>
</hyperlink>
</field>
</form>
上面的代码是列表List的代码,需要注意的点是 list-name 的属性一定要是listlt 才行, performFindList 因为这个服务调用的org.ofbiz.common.FindServices类里面的performFindList实现方法,在这个方法里面,是获取reslut名称为listLt的数据的,个人感觉这里面的确不合理,但是既然ofbiz这样做了,一定有它自己的道理,这里就不深究了。然后在讲一下这边的按钮,这三个按钮的话,如果想在同一列里面,就需要自己去写jquery去实现列的整合。这种简单的操作(主要不属于ofbiz的内容)我就不再贴出代码了。
下面在介绍一个List里面存在的标签
<alt-target use-when="contactListParty==null" target="createContactListParty"/>
这个标签多数用于编辑与新增的form里面,是用来判断对象是否存在的,如果对象不存在的情况下,就修改form的target属性。
ofbiz进击 第四节。 我的form之旅的更多相关文章
- ofbiz进击 第六节。 --OFBiz配置之[widget.properties] 配置属性的分析
配置内容分析如下 # -- 定义上下文使用者 -- security.context =default # -- 定义密码限制长度最小值 -- password.length.min =5 # -- ...
- ofbiz进击 第五节。 --OFBiz配置之[general.properties] 共有属性的分析(含email)
文件内容如下 unique.instanceId=ofbiz1 #--为JobManger方法提供实例的ID(必须小于20个字符) currency.uom.id.default=USD ...
- 第三百八十四节,Django+Xadmin打造上线标准的在线教育平台—路由映射与静态文件配置以及会员注册
第三百八十四节,Django+Xadmin打造上线标准的在线教育平台—路由映射与静态文件配置以及会员注册 基于类的路由映射 from django.conf.urls import url, incl ...
- (四)EasyUI 使用——form表单2 & window窗口
form表单组件主要有以下内容(如下图) 6. progressbar进度条 每隔1秒让进度条按随机数填充,直至充满进度条刻度(只能执行一次) 进度条: <div id=" ...
- android内部培训视频_第四节(1)_异步网络操作
第四节(1):异步网络操作 一.结合asyncTask下载网络图片 1.定义下载类,继承自asyncTask,参数分别为:String(url地址),Integer(刻度,本例没有用到),BitMa ...
- Centos7 install Openstack - (第四节)添加计算服务(Nova)
Centos7 install Openstack - (第四节)添加计算服务(Nova) 我的blog地址:http://www.cnblogs.com/caoguo 该文根据openstack官方 ...
- 第四节,Linux基础命令
第四节,Linux基础命令 命令是系统操作员对系统传入的指令,传入指令后回车,系统接收到指令做出相应的行为 1.查看用户位于系统什么位置 [pmd]检查操作用户位于系统的什么位置 命令 ...
- VUE2.0实现购物车和地址选配功能学习第四节
第四节 v-on实现金额动态计算 用¥金额 进行格式处理,可以使用原生js进行转换,但是在vuei,使用filter过滤器更加方便 注: 1.es6语法=>和import等 好处在于res参数后 ...
- delphi 线程教学第四节:多线程类的改进
第四节:多线程类的改进 1.需要改进的地方 a) 让线程类结束时不自动释放,以便符合 delphi 的用法.即 FreeOnTerminate:=false; b) 改造 Create 的参数 ...
随机推荐
- 【转】unity开发android游戏(一)搭建Unity安卓开发环境
http://blog.csdn.net/chenggong2dm/article/details/20654075 1,下载安装Java的JDK: http://www.oracle.com/tec ...
- Android源码剖析之Framework层进阶版(Wms窗口管理)
本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 上一篇我们主要讲了Ams,篇幅有限,本篇再讲讲Wms,即WindowManagerService,管 ...
- 弄清const与指针、引用之间的关系
const和 define在常量定义上的差别 在C++中,我们可以使用const 或者 宏define来定义常量.但是C++鼓励使用const定义常量,而不是宏define.原因有很多. 1.defi ...
- 【Android开发学习笔记】【第五课】Activity的生命周期-上
今天学习Activity当中的七个生命周期函数: 首先得说一个事情,就是在代码当中如果加入了 System.out.println(" ------");之后,如何查看这里面的输出 ...
- BAT 遍历文件夹和子文件夹下所有文件
echo off & color 0A ::指定起始文件夹 set DIR="%cd%" echo DIR=%DIR% :: 参数 /R 表示需要遍历子文件夹,去掉表示不遍 ...
- php--tp中页面之间的跳转
- MongoDB上的索引
1. 将索引建在number键上名为nameIndex并且为正序索引({number:-1}为倒序索引) 如: db.list名.ensureIndex({number:1},{name:" ...
- 【C++】函数指针宏定义
看耗子叔文章学习虚函数表(http://blog.csdn.net/haoel/article/details/1948051)的时候被例子的第一句惊到了 typedef void(*Fun)(voi ...
- jquery中奖实例代码
<!doctype html> <html> <head> <meta http-equiv="Content-Type" content ...
- Oracle数据库之SQL基础(一)
主要内容:用户与表空间:表与约束:查询语句. 一.概述 Oracle安装:访问官网,下载 二.用户与表空间 在安装Oracle时在开始菜单里可以用sql puls登录oracle. ★1.系统用户 s ...