<!--ProductCategory.xml-->

 <?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-2.0.xsd"
default-menu-title="ProductCategory" default-menu-index="1"> <subscreens default-item="ProductCategoryList"/> <widgets>
<subscreens-panel id="productCategory-panel" type="popup" title="ProductCategory"/>
</widgets>
</screen>
 <!--ProductCategoryList.xml-->

 <?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-2.0.xsd"
default-menu-title="ProductCategoryList" default-menu-index="1"> <transition name="editProductCategoryContent"><default-response url="../EditProductCategoryContent"/></transition> <actions>
<entity-find entity-name="mantle.product.category.ProductCategory" list="productCategoryList">
<search-form-inputs />
</entity-find>
</actions>
<widgets>
<form-list name="ListProductCategory" list="productCategoryList">
<field name="productCategoryId">
<default-field>
<link url="editProductCategoryContent" text="${productCategoryId}"/>
</default-field>
</field>
<auto-fields-entity entity-name="mantle.product.category.ProductCategory" field-type="find-display" include="nonpk"/>
</form-list>
</widgets>
</screen>
 <!--EditProductCategoryContent.xml-->

 <?xml version="1.0" encoding="UTF-8"?>
<screen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/xml-screen-2.0.xsd"
default-menu-title="ProductCategoryList" default-menu-index="1">
<parameter name="productCategoryId" required="true"/> <transition name="updateProductCategoryContent"><service-call name="update#mantle.product.category.ProductCategoryContent"/>
<default-response url="."/></transition>
<transition name="deleteProductCategoryContent"><service-call name="delete#mantle.product.category.ProductCategoryContent"/>
<default-response url="."/></transition> <transition name="uploadProductCategoryContent">
<actions><script><![CDATA[
import org.moqui.context.ResourceReference
org.moqui.context.ExecutionContext ec = context.ec org.apache.commons.fileupload.FileItem contentFile = context.contentFile
String fileName = contentFile.getName()
ec.logger.info("Uploading file [${fileName}] for ProductCategory [${productCategoryId}] in repository [${repositoryName}] with content type [${categoryContentTypeEnumId}] and locale [${locale}]") // String contentLocation = "content://${repositoryName}/mantle/ProductCategory/${productCategoryId}/content/${fileName}"
String contentLocation = "dbresource://mantle/productCategory/${productCategoryId}/content/${fileName}"
ResourceReference newRr = ec.resource.getLocationReference(contentLocation)
InputStream fileStream = contentFile.getInputStream()
newRr.putStream(fileStream)
fileStream.close() ec.service.sync().name("create", "mantle.product.category.ProductCategoryContent").parameters([productCategoryId: productCategoryId,
contentLocation: contentLocation, categoryContentTypeEnumId: categoryContentTypeEnumId, locale: locale]).call()
]]></script></actions>
<default-response url="."/>
</transition> <actions>
<entity-find entity-name="mantle.product.category.ProductCategoryContent" list="productCategoryContentList">
<econdition field-name="productCategoryId" from="productCategoryId"/>
<order-by field-name="contentLocation"/>
</entity-find>
</actions>
<widgets>
<container>
<container-dialog id="UploadCategoryContentDialog" button-text="Upload Content">
<form-single name="UploadCategoryProductContent" transition="uploadProductCategoryContent">
<field name="productCategoryId"><default-field><hidden/></default-field></field>
<field name="contentFile"><default-field><file/></default-field></field>
<field name="categoryContentTypeEnumId"><default-field>
<drop-down><entity-options>
<entity-find entity-name="moqui.basic.Enumeration">
<econdition field-name="enumTypeId" value="ProductCategoryContentType"/>
<order-by field-name="description"/>
</entity-find>
</entity-options></drop-down>
</default-field></field>
<field name="locale"><default-field><text-line size="6"/></default-field></field>
<field name="submitButton"><default-field><submit confirmation="Really Add?"/></default-field></field>
</form-single>
</container-dialog>
</container>
<form-list name="ListProductCategoryContent" transition="updateProductCategoryContent" list="productCategoryContentList">
<field name="productCategoryContentId"><default-field><display/></default-field></field>
<field name="productCategoryId"><default-field><display/></default-field></field>
<field name="contentLocation"><default-field title="Location"><display/></default-field></field>
<field name="categoryContentTypeEnumId"><default-field title="Content Type">
<drop-down><entity-options><entity-find entity-name="moqui.basic.Enumeration">
<econdition field-name="enumTypeId" value="ProductCategoryContentType"/>
<order-by field-name="description"/>
</entity-find></entity-options></drop-down>
</default-field></field>
<field name="locale"><default-field><text-line size="6"/></default-field></field>
<field name="submitButton"><default-field title="Update"><submit/></default-field></field>
<field name="deleteLink">
<default-field title=" ">
<!-- the parameters for this will be auto-mapped: productId, contentLocation -->
<link url="deleteProductCategoryContent" text="Delete" confirmation="Really Delete?"/>
</default-field>
</field>
</form-list> </widgets>
</screen>

工作框架各种使用整理 -- 展示数据列表并做update的更多相关文章

  1. 工作框架各种使用整理---使用Cache

    <service verb="get" noun="Products"> <implements service="sang.pro ...

  2. freemarker 展示数据列表并传值给后台

    select id="initiatorId" name="initiatorId">                  <#if initiato ...

  3. 从后端到前端之Vue(四)小试牛刀——真实项目的应用(树、tab、数据列表和分页)

    学以致用嘛,学了这么多,在真实项目里面怎么应用呢?带着问题去学习才是最快的学习方式.还是以前的那个项目,前后端分离,现在把前端换成vue的,暂时采用脚本化的方式,然后在尝试工程化的方式. 现在先实现功 ...

  4. 大数据技术之_25_手机APP信息统计系统项目_01_APP 数据生成模块 + 数据收集模块 + 数据处理模块框架搭建 + 业务需求处理 + 数据展示模块 +项目总结 + 问题总结

    一 项目概述1.1 角色1.2 业务术语1.3 项目效果展示二 项目需求三 项目概要3.1 项目技术架构3.2 项目目录结构3.3 项目技术选型3.4 项目整体集群规划3.5 创建项目工程四 APP ...

  5. salesforce lightning零基础学习(七) 列表展示数据时两种自定义编辑页面

    上一篇Lightning内容描述的是LDS,通过LDS可以很方便的实例化一个对象的数据信息.当我们通过列表展示数据需要编辑时,我们常使用两种方式去处理编辑页面:Pop Up Window弹出修改详情以 ...

  6. (第4篇)hadoop之魂--mapreduce计算框架,让收集的数据产生价值

    摘要: 通过前面的学习,大家已经了解了HDFS文件系统.有了数据,下一步就要分析计算这些数据,产生价值.接下来我们介绍Mapreduce计算框架,学习数据是怎样被利用的. 博主福利 给大家赠送一套ha ...

  7. 转载 ASP.NET SignalR 与LayIM配合,轻松实现网站客服聊天室(一) 整理基础数据

    ASP.NET SignalR 与LayIM配合,轻松实现网站客服聊天室(一) 整理基础数据   最近碰巧发现一款比较好的Web即时通讯前端组件,layim,百度关键字即可,我下面要做的就是基于这个前 ...

  8. ElasticSearch(十)Elasticsearch检索出的数据列表按字段匹配的优先顺序及搜索单词拼音一部分搜不到数据

    检索出的数据列表按字段匹配的优先顺序 一.举例 比如,发布一篇文章,文章包括基本的字段包括标题.发布时间.点击率.关键字.内容.当在页面中输入“教育”搜索关键词,会检索出指定字段包括“教育”的所有数据 ...

  9. python操作三大主流数据库(4)python操作mysql④python服务端flask和前端bootstrap框架结合实现新闻展示

    python操作mysql④python服务端flask和前端bootstrap框架结合实现新闻展示 参考文档http://flask.pocoo.org/docs/0.11/http://flask ...

随机推荐

  1. linux关于文件的那些事儿

    一个文件的权限对于系统的安全来说是很重要的,linux是一个支持多任务多用户的系统,我们都不希望一些自己的文件被别人看到或者修改! 对于一个文件的权限我们可以用 ls -l 命令来查看,例如: [ro ...

  2. Hadoop多硬盘配置时的注意事项

    <!-- hdfs-site.xml --> <property> <name>dfs.datanode.fsdataset.volume.choosing.pol ...

  3. java 知识点随记

    JAVA 读取配置文件: Properties props= new Properties();//文件在src目录下,编译会被加载到classpath下. Props.load(Test.class ...

  4. 【CSS】理解CSS

    CSS(Cascading Style Sheet,层叠样式表),及其精巧且富有表达力,开发者可以用最为高效的方式高度掌控网页内容的表示. 1. 盒模型 CSS中的一个基本概念是盒模型(box mod ...

  5. [每日菜单]lunch menu for Wednesday, February 24 2016

    HIGHLIGHTS ​** Boiled Broccoli原味西兰花  ​ Steamed Turbot with Chili剁椒蒸多宝鱼  ​* Rye Bread黑麦面包  CHINESE CU ...

  6. POJ 1584 A Round Peg in a Ground Hole --判定点在形内形外形上

    题意: 给一个圆和一个多边形,多边形点可能按顺时针给出,也可能按逆时针给出,先判断多边形是否为凸包,再判断圆是否在凸包内. 解法: 先判是否为凸包,沿着i=0~n,先得出初始方向dir,dir=1为逆 ...

  7. NOIP2011多项式系数[快速幂|组合数|逆元]

    题目描述 给定一个多项式(by+ax)^k,请求出多项式展开后x^n*y^m 项的系数. 输入输出格式 输入格式: 输入文件名为factor.in. 共一行,包含5 个整数,分别为 a ,b ,k , ...

  8. HOLOLENS如何调节屏幕亮度和音量?

    圆环左边的两个是亮度按键,右边的是两个音量按键,值得注意的是,无论是两个音量键还是亮度键,它们都被设置成了一凸一凹,凸的按键为音量/亮度+键,凹为-键,其工业设计可见一斑.

  9. Beanstalk消息队列的实现

    在工作中要用到消息队列,但是主管为了追求开发速度,让用了一个简易的类  beanstalk 下面来说明这个东西 参考博客:https://my.oschina.net/u/698121/blog/15 ...

  10. 转: vim 的编辑格式设置

    http://www.cnblogs.com/freewater/archive/2011/08/26/2154602.html :set encoding=utf-8:set fileencodin ...