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 的参数 ...
随机推荐
- StringUtil
package per.son.utils; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.js ...
- Python中定义字符串
字符串可以用''或者""括起来表示.如果字符串本身包含'怎么办?比如我们要表示字符串 I'm OK ,这时,可以用" "括起来表示: "I'm OK& ...
- 国家发改委发布的数据,前三季度我国生产的手机、PC、集成电路、宽带上网的数量
集微网消息,根据国家发改委发布的数据,前三季度,我国生产集成电路944亿块,同比增长18.2%. 此外,前三季度,生产手机15亿部,同比增长17.6%,其中智能手机11亿部,增长12.1%,占全部手机 ...
- Delphi Dll示例
//MyInt.pas unit MyInt; interface {$IFNDEF MYLIB} function MyAdd(a,b:integer):integer ;stdcall; {$EN ...
- How to disable and clear query ranges in sysquery form
query = new query('Query name'); queryBuildDataSource = query.dataSourceTable(tableNum('table name') ...
- [LeetCode]题解(python):103 Binary Tree Zigzag Level Order Traversal
题目来源 https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/ Given a binary tree, re ...
- Spark Programming--Fundamental operation
max max(key=None) Find the maximum item in this RDD. Parameters:key – A function used to generate ke ...
- The "Real" Project Plan
"I need a project plan by tomorrow morning." As project managers, that's what we hear. But ...
- 开始了ecshop
一个多星期前开始接触ecshop,突然决定要用它来做网站,于是从网上找各种手册与视频,联系官网客服,然后知道官网一共提供三种类型的服务,一种是ecshop授权,不包含任何技术支持,第二种是易开店的标准 ...
- ucenter 整合同步登录的内部实现原理及thinkphp整合ucenter
1.用户登录discuz,通过logging.php文件中的函数uc_user_login对post过来的数据进行验证,也就是对username和password进行验证.2.如果验证成功,将调用位于 ...