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 的参数 ...
随机推荐
- [daily][archlinux][pacman] local database 损坏
下午,开心的看着dpdk的文档,做做各种小实验. 后台正常yaourt -Syu,三个多G的下载,我总是过很久才update一次. 然后KDE窗口各种异常,我知道又在开始更x相关的东西了.可是因为X异 ...
- <from>;<input>;readonly:只读;disabled:不可用;checked:用来做选中;selected:用在下拉列表中,设置那一项被选中
表单元素: ①②③④⑤⑥⑦★ 一.<from> 1. 代表表单 2 . action:提交为哪个页面 method:① get :显示提交,由长度限制 ② post: 隐藏提交 二.文 ...
- 【Android测试】【随笔】与 “58同城” 测试开发交流
◆版权声明:本文出自胖喵~的博客,转载必须注明出处. 转载请注明出处:http://www.cnblogs.com/by-dream/p/5384698.html 初衷 一直都有一个这样的想法: 虽然 ...
- CSS优先级别计算
a.b.c.d,可以以这四种等级为依据确定CSS选择器的优先级: a-----style 行内样式 个数 +1000 b-----id 个数+100 c-----类 个数+10 d-----类型个数 ...
- 转:ASP.NET MVC3 Model验证总结
http://www.wyjexplorer.cn/Post/2012/8/3/model-validation-in-aspnet-mvc3 ASP.NET MVC3中的Model是自验证的,这是通 ...
- Swift-09-可空链式调用(Optional Chaining)
我对这个的理解就是:我们有可能会用到其他的属性或者方法,当我们在使用其他的时候,可以使用点语法去访问另一个的属性,这样的使用,就形成了链式访问. 可空链式调用是一种可以请求和调用属性.方法及下表的过程 ...
- curl get post 数据
1.get方式传值 function testGet(){ $ch = curl_init (); //初始化一个cURL会话 $url = "127.0.0.1/testPage?test ...
- MySQL注释符
mysql注释符有三种:1.#...(注释至行末,推荐)2.-- ...(两条短线之后又一个空格)3./*...*/(多行注释) 1.
- 移动端公共css样式
@media screen and ( min-width: 319px){html{ font-size: 100px;}}@media screen and ( min-width: 359px) ...
- openni2 和opencv读取数据
http://blog.csdn.net/aptx704610875/article/details/49585241