<!--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. myBatis系列之四:关联数据的查询

    myBatis系列之三:增删改查是基于单表的查询,如果联表查询,返回的是复合对象,需要用association关键字来处理. 如User发表Article,每个用户可以发表多个Article,他们之间 ...

  2. parted在2T以上硬盘上分区操作

    parted分区生产环境如何使用? 1)pertend一般用于当硬盘(raid后)大于2t的时候分区操作,2t以下还是用fdisk分区 2)使用parted一般操作系统都已经安装好了 3)大于2t的因 ...

  3. Linux设置环境变量小结:设置永久变量&临时变量 全局变量&局部变量

    1.总结背景 在linux系统下,如果你下载并安装了应用程序,很有可能在键入它的名称时出现“command not found”的提示内容.如果每次都到安装目标文件夹内,找到可执行文件来进行操作就太繁 ...

  4. JAVA插入sql代码

    插入数据 import java.sql.*; /** * @version 2012-02-22 * @author */ public class InsertDemo { public stat ...

  5. 了解 Office 365

    Office 2016刚刚发布,那么Office 2016和Office 365是什么关系呢?通过Office 365与传统Office套件的对比,我们可以更好地理解SaaS的本质.SaaS的商业模式 ...

  6. 《2016ThoughtWorks技术雷达峰会----js爆炸下的技术选型》

    JS爆炸下的技术选型  刘尚奇    ThoughtWorks, 高级咨询师 JS每6个星期出现一个新框架,那么如何进行JS的选型.以下从四个方面来分析. 1.工具 NPM for all the t ...

  7. JProfiler学习笔记

    JProfiler学习笔记   一.安装JProfiler        从http://www.ej-technologies.com/下载5.1.2并申请试用序列号   二.主要功能简介 1.内存 ...

  8. MVC 表单提交【转】

    [转自]:http://www.cnblogs.com/dengdl/archive/2011/07/14/2106849.html 在做Asp.Net MVC项目中,都知道View负责页面展示数据或 ...

  9. gedit脚本

    明天ctsc,赶紧学了一下gedit的配置 以下假设你只在/home/zzq下写代码(用户名自己改) 首先在/home/zzq下建一个runner.sh,内容如下: #!/bin/bash echo ...

  10. Java核心技术点之泛型

    1. Why ——引入泛型机制的原因 假如我们想要实现一个String数组,并且要求它可以动态改变大小,这时我们都会想到用ArrayList来聚合String对象.然而,过了一阵,我们想要实现一个大小 ...