Modified: ofbiz/trunk/framework/widget/dtd/widget-common.xsd
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/dtd/widget-common.xsd?rev=1781731&r1=1781730&r2=1781731&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/dtd/widget-common.xsd (original) +++ ofbiz/trunk/framework/widget/dtd/widget-common.xsd Sun Feb 5 11:09:59 2017 @@ -1,692 +1,692 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> - - <xs:complexType name="ConditionRootType"> - <xs:choice> - <xs:element ref="and" /> - <xs:element ref="or" /> - <xs:element ref="xor" /> - <xs:element ref="not" /> - <xs:element ref="if-service-permission" /> - <xs:element ref="if-has-permission" /> - <xs:element ref="if-entity-permission" /> - <xs:element ref="if-validate-method" /> - <xs:element ref="if-compare" /> - <xs:element ref="if-compare-field" /> - <xs:element ref="if-regexp" /> - <xs:element ref="if-empty" /> - </xs:choice> - </xs:complexType> - <xs:element name="AllConditionals" abstract="true" /> - <xs:element name="and" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="AllConditionals" /> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="xor" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="AllConditionals" /> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="or" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:sequence> - <xs:element maxOccurs="unbounded" ref="AllConditionals" /> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="not" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:sequence> - <xs:element ref="AllConditionals" /> - </xs:sequence> - </xs:complexType> - </xs:element> - <xs:element name="if-service-permission" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:attribute type="xs:string" name="service-name" use="required" /> - <xs:attribute type="xs:string" name="resource-description" use="optional" /> - <xs:attribute type="xs:string" name="context-map" use="optional" /> - <xs:attribute name="main-action" use="optional"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="CREATE" /> - <xs:enumeration value="UPDATE" /> - <xs:enumeration value="DELETE" /> - <xs:enumeration value="VIEW" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="if-has-permission" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:attribute type="xs:string" name="permission" use="required" /> - <xs:attribute type="xs:string" name="action" /> - </xs:complexType> - </xs:element> - <xs:element name="if-entity-permission" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:choice minOccurs="0"> - <xs:element minOccurs="0" maxOccurs="1" ref="permission-condition-getter" /> - <xs:element minOccurs="0" maxOccurs="1" ref="related-role-getter" /> - <xs:element minOccurs="0" maxOccurs="1" ref="auxiliary-value-getter" /> - </xs:choice> - <xs:attribute type="xs:string" name="entity-name" use="required" /> - <xs:attribute type="xs:string" name="entity-id" use="required"> - <xs:annotation> - <xs:documentation>Can have multiple pipe separated values, but don't use spaces.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="target-operation" use="required"> - <xs:annotation> - <xs:documentation>Can have multiple pipe separated values, but don't use spaces.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="display-fail-cond" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="permission-condition-getter"> - <xs:complexType> - <xs:attribute type="xs:string" name="entity-name" /> - <xs:attribute type="xs:string" name="operation-field-name" /> - <xs:attribute type="xs:string" name="role-field-name" /> - <xs:attribute type="xs:string" name="auxiliary-field-name" /> - <xs:attribute type="xs:string" name="status-field-name" /> - <xs:attribute type="xs:string" name="privilege-field-name" /> - </xs:complexType> - </xs:element> - <xs:element name="related-role-getter"> - <xs:complexType> - <xs:attribute type="xs:string" name="entity-name" /> - <xs:attribute type="xs:string" name="role-entity-name" /> - <xs:attribute type="xs:string" name="role-type-field-name" /> - <xs:attribute type="xs:string" name="party-field-name" /> - <xs:attribute type="xs:string" name="owner-entity-field-name" /> - <xs:attribute type="xs:string" name="entity-id-name" /> - </xs:complexType> - </xs:element> - <xs:element name="auxiliary-value-getter"> - <xs:complexType> - <xs:attribute type="xs:string" name="entity-name" /> - <xs:attribute type="xs:string" name="auxiliary-field-name" /> - <xs:attribute type="xs:string" name="entity-id-name" /> - </xs:complexType> - </xs:element> - <xs:element name="if-validate-method" substitutionGroup="AllConditionals"> - <xs:annotation> - <xs:documentation>Calls a static Java method that takes a String and returns a boolean.</xs:documentation> - </xs:annotation> - <xs:complexType> - <xs:attribute type="xs:string" name="field" use="required" /> - <xs:attribute type="xs:string" name="method" use="required" /> - <xs:attribute type="xs:string" name="class" default="org.apache.ofbiz.base.util.UtilValidate" /> - </xs:complexType> - </xs:element> - <xs:element name="if-compare" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:attribute name="field" type="xs:string" use="required" /> - <xs:attribute name="operator" use="required"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="less" /> - <xs:enumeration value="greater" /> - <xs:enumeration value="less-equals" /> - <xs:enumeration value="greater-equals" /> - <xs:enumeration value="equals" /> - <xs:enumeration value="not-equals" /> - <xs:enumeration value="contains" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="value" type="xs:string" use="required" /> - <xs:attribute name="type" default="String"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="PlainString" /> - <xs:enumeration value="String" /> - <xs:enumeration value="BigDecimal" /> - <xs:enumeration value="Double" /> - <xs:enumeration value="Float" /> - <xs:enumeration value="Long" /> - <xs:enumeration value="Integer" /> - <xs:enumeration value="Date" /> - <xs:enumeration value="Time" /> - <xs:enumeration value="Timestamp" /> - <xs:enumeration value="Boolean" /> - <xs:enumeration value="Object" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="format" /> - </xs:complexType> - </xs:element> - <xs:element name="if-compare-field" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:attribute name="field" type="xs:string" use="required" /> - <xs:attribute name="operator" use="required"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="less" /> - <xs:enumeration value="greater" /> - <xs:enumeration value="less-equals" /> - <xs:enumeration value="greater-equals" /> - <xs:enumeration value="equals" /> - <xs:enumeration value="not-equals" /> - <xs:enumeration value="contains" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="to-field" type="xs:string" /> - <xs:attribute name="type" default="String"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="PlainString" /> - <xs:enumeration value="String" /> - <xs:enumeration value="BigDecimal" /> - <xs:enumeration value="Double" /> - <xs:enumeration value="Float" /> - <xs:enumeration value="Long" /> - <xs:enumeration value="Integer" /> - <xs:enumeration value="Date" /> - <xs:enumeration value="Time" /> - <xs:enumeration value="Timestamp" /> - <xs:enumeration value="Boolean" /> - <xs:enumeration value="Object" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="format" /> - </xs:complexType> - </xs:element> - <xs:element name="if-regexp" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:attribute type="xs:string" name="field" use="required" /> - <xs:attribute type="xs:string" name="expr" use="required" /> - </xs:complexType> - </xs:element> - <xs:element name="if-empty" substitutionGroup="AllConditionals"> - <xs:complexType> - <xs:attribute type="xs:string" name="field" use="required" /> - </xs:complexType> - </xs:element> - - <xs:element name="AllActions" abstract="true" /> - <xs:element name="set" substitutionGroup="AllActions"> - <xs:complexType> - <xs:attribute type="xs:string" name="field" use="required" /> - <xs:attribute type="xs:string" name="from-field" /> - <xs:attribute type="xs:string" name="value" /> - <xs:attribute type="xs:string" name="default-value" /> - <xs:attribute name="global" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="type"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="PlainString" /> - <xs:enumeration value="String" /> - <xs:enumeration value="BigDecimal" /> - <xs:enumeration value="Double" /> - <xs:enumeration value="Float" /> - <xs:enumeration value="List" /> - <xs:enumeration value="Long" /> - <xs:enumeration value="Integer" /> - <xs:enumeration value="Date" /> - <xs:enumeration value="Time" /> - <xs:enumeration value="Timestamp" /> - <xs:enumeration value="Boolean" /> - <xs:enumeration value="Object" /> - <xs:enumeration value="NewList" /> - <xs:enumeration value="NewMap" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="to-scope" default="screen"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="screen" /> - <xs:enumeration value="user" /> - <xs:enumeration value="application" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="from-scope" default="screen"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="screen" /> - <xs:enumeration value="user" /> - <xs:enumeration value="application" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="property-map" substitutionGroup="AllActions"> - <xs:complexType> - <xs:attribute type="xs:string" name="resource" use="required" /> - <xs:attribute type="xs:string" name="map-name" use="required" /> - <xs:attribute name="global" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="property-to-field" substitutionGroup="AllActions"> - <xs:complexType> - <xs:attribute type="xs:string" name="resource" use="required" /> - <xs:attribute type="xs:string" name="property" use="required" /> - <xs:attribute type="xs:string" name="field" use="required" /> - <xs:attribute type="xs:string" name="default" /> - <xs:attribute name="no-locale" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="arg-list-name" /> - </xs:complexType> - </xs:element> - <xs:element name="script" substitutionGroup="AllActions"> - <xs:complexType> - <xs:attribute type="xs:string" name="location" use="required" /> - </xs:complexType> - </xs:element> - <xs:element name="entity-one" substitutionGroup="AllActions"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" ref="field-map" /> - <xs:element minOccurs="0" maxOccurs="unbounded" ref="select-field" /> - </xs:sequence> - <xs:attribute name="entity-name" type="xs:string" use="required" /> - <xs:attribute name="value-field" type="xs:string" use="required" /> - <xs:attribute name="use-cache" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="auto-field-map" default="true"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="get-related-one" substitutionGroup="AllActions"> - <xs:complexType> - <xs:attribute name="value-field" type="xs:string" use="required" /> - <xs:attribute name="relation-name" type="xs:string" use="required" /> - <xs:attribute name="use-cache" type="xs:string" default="false" /> - <xs:attribute name="to-value-field" type="xs:string" use="required" /> - </xs:complexType> - </xs:element> - <xs:element name="get-related" substitutionGroup="AllActions"> - <xs:complexType> - <xs:attribute type="xs:string" name="value-field" use="required" /> - <xs:attribute type="xs:string" name="relation-name" use="required" /> - <xs:attribute type="xs:string" name="map" /> - <xs:attribute type="xs:string" name="order-by-list" /> - <xs:attribute type="xs:string" name="use-cache" default="false" /> - <xs:attribute type="xs:string" name="list" use="required" /> - </xs:complexType> - </xs:element> - <xs:element name="condition-list"> - <xs:complexType> - <xs:choice maxOccurs="unbounded"> - <xs:element ref="condition-expr" /> - <xs:element ref="condition-list" /> - <xs:element ref="condition-object" /> - </xs:choice> - <xs:attribute name="combine" default="and"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="and" /> - <xs:enumeration value="or" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="having-condition-list"> - <xs:complexType> - <xs:choice maxOccurs="unbounded"> - <xs:element ref="condition-expr" /> - <xs:element ref="condition-list" /> - <xs:element ref="condition-object" /> - </xs:choice> - <xs:attribute name="combine" default="and"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="and" /> - <xs:enumeration value="or" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="condition-expr"> - <xs:complexType> - <xs:attribute type="xs:string" name="field-name" use="required" /> - <xs:attribute name="operator" default="equals"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="less" /> - <xs:enumeration value="greater" /> - <xs:enumeration value="less-equals" /> - <xs:enumeration value="greater-equals" /> - <xs:enumeration value="equals" /> - <xs:enumeration value="not-equals" /> - <xs:enumeration value="in" /> - <xs:enumeration value="not-in" /> - <xs:enumeration value="between" /> - <xs:enumeration value="like" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute type="xs:string" name="from-field" /> - <xs:attribute type="xs:string" name="value" /> - <xs:attribute name="ignore-if-null" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="ignore-if-empty" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="ignore-case" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="ignore" default="false"> - <xs:annotation> - <xs:documentation> - Ignore the condition if flag is true. - Defaults to false. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="condition-object"> - <xs:complexType> - <xs:attribute type="xs:string" name="field" use="required" /> - </xs:complexType> - </xs:element> - <xs:element name="select-field"> - <xs:complexType> - <xs:attribute type="xs:string" name="field-name" use="required" /> - </xs:complexType> - </xs:element> - <xs:element name="order-by"> - <xs:complexType> - <xs:attribute type="xs:string" name="field-name" use="required" /> - </xs:complexType> - </xs:element> - <xs:element name="limit-range"> - <xs:complexType> - <xs:attribute name="start" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation>Should resolve into a non-negative integer.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="size" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation>Should resolve into a non-negative integer.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="limit-view"> - <xs:complexType> - <xs:attribute name="view-index" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation>Should resolve into a non-negative integer.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="view-size" type="xs:string" use="required"> - <xs:annotation> - <xs:documentation>Should resolve into a positive integer.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="use-iterator" /> - <xs:element name="field-map"> - <xs:complexType> - <xs:attribute type="xs:string" name="field-name" use="required" /> - <xs:attribute type="xs:string" name="from-field" /> - <xs:attribute type="xs:string" name="value" /> - </xs:complexType> - </xs:element> - <xs:element name="parameter"> - <xs:complexType> - <xs:attribute type="xs:string" name="param-name" use="required" /> - <xs:attribute type="xs:string" name="from-field" /> - <xs:attribute type="xs:string" name="value" /> - </xs:complexType> - </xs:element> - <xs:element name="auto-parameters-service"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" /> - </xs:sequence> - <xs:attribute name="service-name" type="xs:string"> - <xs:annotation> - <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="send-if-empty" default="true"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="auto-parameters-entity"> - <xs:complexType> - <xs:sequence> - <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" /> - </xs:sequence> - <xs:attribute name="entity-name" type="xs:string"> - <xs:annotation> - <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute name="include" default="pk"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="pk" /> - <xs:enumeration value="nonpk" /> - <xs:enumeration value="all" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="send-if-empty" default="true"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> - </xs:element> - <xs:element name="exclude"> - <xs:complexType> - <xs:attribute name="field-name" type="xs:string" use="required" /> - </xs:complexType> - </xs:element> - <xs:complexType name="link"> - <xs:sequence> - <xs:element minOccurs="0" ref="auto-parameters-service"/> - <xs:element minOccurs="0" ref="auto-parameters-entity"/> - <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" /> - <xs:element minOccurs="0" name="image" type="image" /> - </xs:sequence> - <xs:attribute type="xs:string" name="text" /> - <xs:attribute type="xs:string" name="id"> - <xs:annotation> - <xs:documentation> - If you use id for link present in list form or multi form, you can use ${itemIndex} to generate an unique id by line. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute type="xs:string" name="style" /> - <xs:attribute type="xs:string" name="name" /> - <xs:attribute type="xs:string" name="title" /> - <xs:attribute type="xs:nonNegativeInteger" name="size" /><!-- Text size limit --> - <xs:attribute type="xs:string" name="target" /> - <xs:attribute type="xs:string" name="target-window" /> - <xs:attribute type="xs:string" name="prefix" /> - <xs:attribute type="xs:string" name="width" /> - <xs:attribute type="xs:string" name="height" /> - <xs:attribute name="link-type" default="auto"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="auto"> - <xs:annotation> - <xs:documentation> - If selected the hidden-form type will be used if the url-mode is intra-app - and the request specified has an event, otherwise the anchor type will be used, - except if the layered-modal mode is specified. - </xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration value="anchor" /> - <xs:enumeration value="hidden-form" /> - <xs:enumeration value="layered-modal" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="url-mode" default="intra-app"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="intra-app" /> - <xs:enumeration value="inter-app" /> - <xs:enumeration value="content" /> - <xs:enumeration value="plain" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="full-path" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="secure" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="encode" default="false"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="request-confirmation" default="false"> - <xs:annotation> - <xs:documentation>If true then the user is presented with a dialog box, if confirmation-message is empty, use default</xs:documentation> - </xs:annotation> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="true" /> - <xs:enumeration value="false" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - <xs:attribute name="confirmation-message" type="xs:string"> - <xs:annotation> - <xs:documentation>The message displayed in confirmation box</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:complexType> - <xs:complexType name="image" mixed="true"> - <xs:attribute type="xs:string" name="src" /> - <xs:attribute type="xs:string" name="id" /> - <xs:attribute type="xs:string" name="style" /> - <xs:attribute type="xs:string" name="width" /> - <xs:attribute type="xs:string" name="height" /> - <xs:attribute type="xs:string" name="border" /> - <xs:attribute type="xs:string" name="alt" /> - <xs:attribute type="xs:string" name="title" /> - <xs:attribute name="url-mode" default="content"> - <xs:simpleType> - <xs:restriction base="xs:token"> - <xs:enumeration value="ofbiz" /> - <xs:enumeration value="content" /> - <xs:enumeration value="raw" /> - </xs:restriction> - </xs:simpleType> - </xs:attribute> - </xs:complexType> -</xs:schema> +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"> + + <xs:complexType name="ConditionRootType"> + <xs:choice> + <xs:element ref="and" /> + <xs:element ref="or" /> + <xs:element ref="xor" /> + <xs:element ref="not" /> + <xs:element ref="if-service-permission" /> + <xs:element ref="if-has-permission" /> + <xs:element ref="if-entity-permission" /> + <xs:element ref="if-validate-method" /> + <xs:element ref="if-compare" /> + <xs:element ref="if-compare-field" /> + <xs:element ref="if-regexp" /> + <xs:element ref="if-empty" /> + </xs:choice> + </xs:complexType> + <xs:element name="AllConditionals" abstract="true" /> + <xs:element name="and" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="AllConditionals" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="xor" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="AllConditionals" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="or" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:sequence> + <xs:element maxOccurs="unbounded" ref="AllConditionals" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="not" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:sequence> + <xs:element ref="AllConditionals" /> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:element name="if-service-permission" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:attribute type="xs:string" name="service-name" use="required" /> + <xs:attribute type="xs:string" name="resource-description" use="optional" /> + <xs:attribute type="xs:string" name="context-map" use="optional" /> + <xs:attribute name="main-action" use="optional"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="CREATE" /> + <xs:enumeration value="UPDATE" /> + <xs:enumeration value="DELETE" /> + <xs:enumeration value="VIEW" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="if-has-permission" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:attribute type="xs:string" name="permission" use="required" /> + <xs:attribute type="xs:string" name="action" /> + </xs:complexType> + </xs:element> + <xs:element name="if-entity-permission" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:choice minOccurs="0"> + <xs:element minOccurs="0" maxOccurs="1" ref="permission-condition-getter" /> + <xs:element minOccurs="0" maxOccurs="1" ref="related-role-getter" /> + <xs:element minOccurs="0" maxOccurs="1" ref="auxiliary-value-getter" /> + </xs:choice> + <xs:attribute type="xs:string" name="entity-name" use="required" /> + <xs:attribute type="xs:string" name="entity-id" use="required"> + <xs:annotation> + <xs:documentation>Can have multiple pipe separated values, but don't use spaces.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="target-operation" use="required"> + <xs:annotation> + <xs:documentation>Can have multiple pipe separated values, but don't use spaces.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="display-fail-cond" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="permission-condition-getter"> + <xs:complexType> + <xs:attribute type="xs:string" name="entity-name" /> + <xs:attribute type="xs:string" name="operation-field-name" /> + <xs:attribute type="xs:string" name="role-field-name" /> + <xs:attribute type="xs:string" name="auxiliary-field-name" /> + <xs:attribute type="xs:string" name="status-field-name" /> + <xs:attribute type="xs:string" name="privilege-field-name" /> + </xs:complexType> + </xs:element> + <xs:element name="related-role-getter"> + <xs:complexType> + <xs:attribute type="xs:string" name="entity-name" /> + <xs:attribute type="xs:string" name="role-entity-name" /> + <xs:attribute type="xs:string" name="role-type-field-name" /> + <xs:attribute type="xs:string" name="party-field-name" /> + <xs:attribute type="xs:string" name="owner-entity-field-name" /> + <xs:attribute type="xs:string" name="entity-id-name" /> + </xs:complexType> + </xs:element> + <xs:element name="auxiliary-value-getter"> + <xs:complexType> + <xs:attribute type="xs:string" name="entity-name" /> + <xs:attribute type="xs:string" name="auxiliary-field-name" /> + <xs:attribute type="xs:string" name="entity-id-name" /> + </xs:complexType> + </xs:element> + <xs:element name="if-validate-method" substitutionGroup="AllConditionals"> + <xs:annotation> + <xs:documentation>Calls a static Java method that takes a String and returns a boolean.</xs:documentation> + </xs:annotation> + <xs:complexType> + <xs:attribute type="xs:string" name="field" use="required" /> + <xs:attribute type="xs:string" name="method" use="required" /> + <xs:attribute type="xs:string" name="class" default="org.apache.ofbiz.base.util.UtilValidate" /> + </xs:complexType> + </xs:element> + <xs:element name="if-compare" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:attribute name="field" type="xs:string" use="required" /> + <xs:attribute name="operator" use="required"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="less" /> + <xs:enumeration value="greater" /> + <xs:enumeration value="less-equals" /> + <xs:enumeration value="greater-equals" /> + <xs:enumeration value="equals" /> + <xs:enumeration value="not-equals" /> + <xs:enumeration value="contains" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="value" type="xs:string" use="required" /> + <xs:attribute name="type" default="String"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="PlainString" /> + <xs:enumeration value="String" /> + <xs:enumeration value="BigDecimal" /> + <xs:enumeration value="Double" /> + <xs:enumeration value="Float" /> + <xs:enumeration value="Long" /> + <xs:enumeration value="Integer" /> + <xs:enumeration value="Date" /> + <xs:enumeration value="Time" /> + <xs:enumeration value="Timestamp" /> + <xs:enumeration value="Boolean" /> + <xs:enumeration value="Object" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute type="xs:string" name="format" /> + </xs:complexType> + </xs:element> + <xs:element name="if-compare-field" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:attribute name="field" type="xs:string" use="required" /> + <xs:attribute name="operator" use="required"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="less" /> + <xs:enumeration value="greater" /> + <xs:enumeration value="less-equals" /> + <xs:enumeration value="greater-equals" /> + <xs:enumeration value="equals" /> + <xs:enumeration value="not-equals" /> + <xs:enumeration value="contains" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="to-field" type="xs:string" /> + <xs:attribute name="type" default="String"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="PlainString" /> + <xs:enumeration value="String" /> + <xs:enumeration value="BigDecimal" /> + <xs:enumeration value="Double" /> + <xs:enumeration value="Float" /> + <xs:enumeration value="Long" /> + <xs:enumeration value="Integer" /> + <xs:enumeration value="Date" /> + <xs:enumeration value="Time" /> + <xs:enumeration value="Timestamp" /> + <xs:enumeration value="Boolean" /> + <xs:enumeration value="Object" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute type="xs:string" name="format" /> + </xs:complexType> + </xs:element> + <xs:element name="if-regexp" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:attribute type="xs:string" name="field" use="required" /> + <xs:attribute type="xs:string" name="expr" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="if-empty" substitutionGroup="AllConditionals"> + <xs:complexType> + <xs:attribute type="xs:string" name="field" use="required" /> + </xs:complexType> + </xs:element> + + <xs:element name="AllActions" abstract="true" /> + <xs:element name="set" substitutionGroup="AllActions"> + <xs:complexType> + <xs:attribute type="xs:string" name="field" use="required" /> + <xs:attribute type="xs:string" name="from-field" /> + <xs:attribute type="xs:string" name="value" /> + <xs:attribute type="xs:string" name="default-value" /> + <xs:attribute name="global" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="type"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="PlainString" /> + <xs:enumeration value="String" /> + <xs:enumeration value="BigDecimal" /> + <xs:enumeration value="Double" /> + <xs:enumeration value="Float" /> + <xs:enumeration value="List" /> + <xs:enumeration value="Long" /> + <xs:enumeration value="Integer" /> + <xs:enumeration value="Date" /> + <xs:enumeration value="Time" /> + <xs:enumeration value="Timestamp" /> + <xs:enumeration value="Boolean" /> + <xs:enumeration value="Object" /> + <xs:enumeration value="NewList" /> + <xs:enumeration value="NewMap" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="to-scope" default="screen"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="screen" /> + <xs:enumeration value="user" /> + <xs:enumeration value="application" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="from-scope" default="screen"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="screen" /> + <xs:enumeration value="user" /> + <xs:enumeration value="application" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="property-map" substitutionGroup="AllActions"> + <xs:complexType> + <xs:attribute type="xs:string" name="resource" use="required" /> + <xs:attribute type="xs:string" name="map-name" use="required" /> + <xs:attribute name="global" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="property-to-field" substitutionGroup="AllActions"> + <xs:complexType> + <xs:attribute type="xs:string" name="resource" use="required" /> + <xs:attribute type="xs:string" name="property" use="required" /> + <xs:attribute type="xs:string" name="field" use="required" /> + <xs:attribute type="xs:string" name="default" /> + <xs:attribute name="no-locale" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute type="xs:string" name="arg-list-name" /> + </xs:complexType> + </xs:element> + <xs:element name="script" substitutionGroup="AllActions"> + <xs:complexType> + <xs:attribute type="xs:string" name="location" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="entity-one" substitutionGroup="AllActions"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="field-map" /> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="select-field" /> + </xs:sequence> + <xs:attribute name="entity-name" type="xs:string" use="required" /> + <xs:attribute name="value-field" type="xs:string" use="required" /> + <xs:attribute name="use-cache" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="auto-field-map" default="true"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="get-related-one" substitutionGroup="AllActions"> + <xs:complexType> + <xs:attribute name="value-field" type="xs:string" use="required" /> + <xs:attribute name="relation-name" type="xs:string" use="required" /> + <xs:attribute name="use-cache" type="xs:string" default="false" /> + <xs:attribute name="to-value-field" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="get-related" substitutionGroup="AllActions"> + <xs:complexType> + <xs:attribute type="xs:string" name="value-field" use="required" /> + <xs:attribute type="xs:string" name="relation-name" use="required" /> + <xs:attribute type="xs:string" name="map" /> + <xs:attribute type="xs:string" name="order-by-list" /> + <xs:attribute type="xs:string" name="use-cache" default="false" /> + <xs:attribute type="xs:string" name="list" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="condition-list"> + <xs:complexType> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="condition-expr" /> + <xs:element ref="condition-list" /> + <xs:element ref="condition-object" /> + </xs:choice> + <xs:attribute name="combine" default="and"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="and" /> + <xs:enumeration value="or" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="having-condition-list"> + <xs:complexType> + <xs:choice maxOccurs="unbounded"> + <xs:element ref="condition-expr" /> + <xs:element ref="condition-list" /> + <xs:element ref="condition-object" /> + </xs:choice> + <xs:attribute name="combine" default="and"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="and" /> + <xs:enumeration value="or" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="condition-expr"> + <xs:complexType> + <xs:attribute type="xs:string" name="field-name" use="required" /> + <xs:attribute name="operator" default="equals"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="less" /> + <xs:enumeration value="greater" /> + <xs:enumeration value="less-equals" /> + <xs:enumeration value="greater-equals" /> + <xs:enumeration value="equals" /> + <xs:enumeration value="not-equals" /> + <xs:enumeration value="in" /> + <xs:enumeration value="not-in" /> + <xs:enumeration value="between" /> + <xs:enumeration value="like" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute type="xs:string" name="from-field" /> + <xs:attribute type="xs:string" name="value" /> + <xs:attribute name="ignore-if-null" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="ignore-if-empty" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="ignore-case" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="ignore" default="false"> + <xs:annotation> + <xs:documentation> + Ignore the condition if flag is true. + Defaults to false. + </xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="condition-object"> + <xs:complexType> + <xs:attribute type="xs:string" name="field" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="select-field"> + <xs:complexType> + <xs:attribute type="xs:string" name="field-name" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="order-by"> + <xs:complexType> + <xs:attribute type="xs:string" name="field-name" use="required" /> + </xs:complexType> + </xs:element> + <xs:element name="limit-range"> + <xs:complexType> + <xs:attribute name="start" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation>Should resolve into a non-negative integer.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="size" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation>Should resolve into a non-negative integer.</xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="limit-view"> + <xs:complexType> + <xs:attribute name="view-index" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation>Should resolve into a non-negative integer.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="view-size" type="xs:string" use="required"> + <xs:annotation> + <xs:documentation>Should resolve into a positive integer.</xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="use-iterator" /> + <xs:element name="field-map"> + <xs:complexType> + <xs:attribute type="xs:string" name="field-name" use="required" /> + <xs:attribute type="xs:string" name="from-field" /> + <xs:attribute type="xs:string" name="value" /> + </xs:complexType> + </xs:element> + <xs:element name="parameter"> + <xs:complexType> + <xs:attribute type="xs:string" name="param-name" use="required" /> + <xs:attribute type="xs:string" name="from-field" /> + <xs:attribute type="xs:string" name="value" /> + </xs:complexType> + </xs:element> + <xs:element name="auto-parameters-service"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" /> + </xs:sequence> + <xs:attribute name="service-name" type="xs:string"> + <xs:annotation> + <xs:documentation>The service name used to resolve parameters. If empty, use form defaultServiceName. Flexible string allowed.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="send-if-empty" default="true"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="auto-parameters-entity"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="exclude" /> + </xs:sequence> + <xs:attribute name="entity-name" type="xs:string"> + <xs:annotation> + <xs:documentation>The entity name used to resolve parameters. If empty use form defaultEntityName attribute. Flexible string allowed.</xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute name="include" default="pk"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="pk" /> + <xs:enumeration value="nonpk" /> + <xs:enumeration value="all" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="send-if-empty" default="true"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> + </xs:element> + <xs:element name="exclude"> + <xs:complexType> + <xs:attribute name="field-name" type="xs:string" use="required" /> + </xs:complexType> + </xs:element> + <xs:complexType name="link"> + <xs:sequence> + <xs:element minOccurs="0" ref="auto-parameters-service"/> + <xs:element minOccurs="0" ref="auto-parameters-entity"/> + <xs:element minOccurs="0" maxOccurs="unbounded" ref="parameter" /> + <xs:element minOccurs="0" name="image" type="image" /> + </xs:sequence> + <xs:attribute type="xs:string" name="text" /> + <xs:attribute type="xs:string" name="id"> + <xs:annotation> + <xs:documentation> + If you use id for link present in list form or multi form, you can use ${itemIndex} to generate an unique id by line. + </xs:documentation> + </xs:annotation> + </xs:attribute> + <xs:attribute type="xs:string" name="style" /> + <xs:attribute type="xs:string" name="name" /> + <xs:attribute type="xs:string" name="title" /> + <xs:attribute type="xs:nonNegativeInteger" name="size" /><!-- Text size limit --> + <xs:attribute type="xs:string" name="target" /> + <xs:attribute type="xs:string" name="target-window" /> + <xs:attribute type="xs:string" name="prefix" /> + <xs:attribute type="xs:string" name="width" /> + <xs:attribute type="xs:string" name="height" /> + <xs:attribute name="link-type" default="auto"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="auto"> + <xs:annotation> + <xs:documentation> + If selected the hidden-form type will be used if the url-mode is intra-app + and the request specified has an event, otherwise the anchor type will be used, + except if the layered-modal mode is specified. + </xs:documentation> + </xs:annotation> + </xs:enumeration> + <xs:enumeration value="anchor" /> + <xs:enumeration value="hidden-form" /> + <xs:enumeration value="layered-modal" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="url-mode" default="intra-app"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="intra-app" /> + <xs:enumeration value="inter-app" /> + <xs:enumeration value="content" /> + <xs:enumeration value="plain" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="full-path" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="secure" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="encode" default="false"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="request-confirmation" default="false"> + <xs:annotation> + <xs:documentation>If true then the user is presented with a dialog box, if confirmation-message is empty, use default</xs:documentation> + </xs:annotation> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="true" /> + <xs:enumeration value="false" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + <xs:attribute name="confirmation-message" type="xs:string"> + <xs:annotation> + <xs:documentation>The message displayed in confirmation box</xs:documentation> + </xs:annotation> + </xs:attribute> + </xs:complexType> + <xs:complexType name="image" mixed="true"> + <xs:attribute type="xs:string" name="src" /> + <xs:attribute type="xs:string" name="id" /> + <xs:attribute type="xs:string" name="style" /> + <xs:attribute type="xs:string" name="width" /> + <xs:attribute type="xs:string" name="height" /> + <xs:attribute type="xs:string" name="border" /> + <xs:attribute type="xs:string" name="alt" /> + <xs:attribute type="xs:string" name="title" /> + <xs:attribute name="url-mode" default="content"> + <xs:simpleType> + <xs:restriction base="xs:token"> + <xs:enumeration value="ofbiz" /> + <xs:enumeration value="content" /> + <xs:enumeration value="raw" /> + </xs:restriction> + </xs:simpleType> + </xs:attribute> + </xs:complexType> +</xs:schema> Propchange: ofbiz/trunk/framework/widget/dtd/widget-common.xsd ------------------------------------------------------------------------------ svn:eol-style = native Modified: ofbiz/trunk/framework/widget/templates/HtmlMenuMacroLibrary.ftl URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/widget/templates/HtmlMenuMacroLibrary.ftl?rev=1781731&r1=1781730&r2=1781731&view=diff ============================================================================== --- ofbiz/trunk/framework/widget/templates/HtmlMenuMacroLibrary.ftl (original) +++ ofbiz/trunk/framework/widget/templates/HtmlMenuMacroLibrary.ftl Sun Feb 5 11:09:59 2017 @@ -1,107 +1,107 @@ -<#-- -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> - -<#macro renderMenuBegin boundaryComment="" id="" style="" title=""> - <#if boundaryComment?has_content> -<!-- ${boundaryComment} --> - </#if> - <#-- FIXME: A menu could have an ID and a style, but some visual themes break if both are used. --> - <div<#if id?has_content> id="${id}"<#elseif style?has_content> class="${style}"</#if>> - <#if title?has_content> - <h2>${title}</h2> - </#if> - <ul> - <li> - <ul> -</#macro> - -<#macro renderMenuEnd boundaryComment=""> - </ul> - </li> - </ul> - <br class="clear"/> - </div> -<#if boundaryComment?has_content> -<!-- ${boundaryComment} --> -</#if> -</#macro> - -<#macro renderImage src id style width height border> -<img src="${src}"<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if width?has_content> width="${width}"</#if><#if height?has_content> height="${height}"</#if><#if border?has_content> border="${border}"</#if> /> -</#macro> - -<#macro renderLink linkUrl parameterList targetWindow uniqueItemName actionUrl linkType="" id="" style="" name="" height="" width="" text="" imgStr=""> - <#if linkType?has_content && "hidden-form" == linkType> -<form method="post" action="${actionUrl}"<#if targetWindow?has_content> target="${targetWindow}"</#if> onsubmit="javascript:submitFormDisableSubmits(this)" name="${uniqueItemName}"><#rt/> - <#list parameterList as parameter> -<input name="${parameter.name}" value="${parameter.value}" type="hidden"/><#rt/> - </#list> -</form><#rt/> - </#if> - <#if uniqueItemName?has_content && "layered-modal" == linkType> -<div id="${uniqueItemName}"></div> -<a href="javascript:void(0);" id="${uniqueItemName}_link" - <#if style?has_content>class="${style}"</#if>> - <#if text?has_content>${text}</#if></a> -<script type="text/javascript"> - function ${uniqueItemName}_data() { - var data = { - <#list parameterList as parameter> - "${parameter.name}": "${parameter.value}", - </#list> - "presentation": "layer" - }; - return data; - } - jQuery("#${uniqueItemName}_link").click(function () { - jQuery("#${uniqueItemName}").dialog("open"); - }); - jQuery("#${uniqueItemName}").dialog({ - autoOpen: false, - <#if text?has_content>title: "${text}",</#if> - height: <#if height == "">600<#else>${height}</#if>, - width: <#if width == "">800<#else>${width}</#if>, - modal: true, - closeOnEscape: true, - open: function() { - jQuery.ajax({ - url: "${linkUrl}", - type: "POST", - data: ${uniqueItemName}_data(), - success: function(data) {jQuery("#${uniqueItemName}").html(data);} - }); - } - }); - </script> - <#else> -<#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content> -<a<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if name?has_content> name="${name}"</#if><#if targetWindow?has_content> target="${targetWindow}"</#if> href="<#if "hidden-form"==linkType>javascript:document.${uniqueItemName}.submit()<#else>${linkUrl}</#if>"><#rt/> -</#if> -<#if imgStr?has_content>${imgStr}</#if> <#if text?has_content>${text}</#if><#rt/> -<#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content></a><#rt/></#if> - </#if> -</#macro> - -<#macro renderMenuItemBegin style toolTip linkStr containsNestedMenus> - <li<#if style?has_content> class="${style}"</#if><#if toolTip?has_content> title="${toolTip}"</#if>><#if linkStr?has_content>${linkStr}</#if><#if containsNestedMenus><ul></#if><#rt/> -</#macro> - -<#macro renderMenuItemEnd containsNestedMenus> -<#if containsNestedMenus></ul></#if></li> -</#macro> +<#-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<#macro renderMenuBegin boundaryComment="" id="" style="" title=""> + <#if boundaryComment?has_content> +<!-- ${boundaryComment} --> + </#if> + <#-- FIXME: A menu could have an ID and a style, but some visual themes break if both are used. --> + <div<#if id?has_content> id="${id}"<#elseif style?has_content> class="${style}"</#if>> + <#if title?has_content> + <h2>${title}</h2> + </#if> + <ul> + <li> + <ul> +</#macro> + +<#macro renderMenuEnd boundaryComment=""> + </ul> + </li> + </ul> + <br class="clear"/> + </div> +<#if boundaryComment?has_content> +<!-- ${boundaryComment} --> +</#if> +</#macro> + +<#macro renderImage src id style width height border> +<img src="${src}"<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if width?has_content> width="${width}"</#if><#if height?has_content> height="${height}"</#if><#if border?has_content> border="${border}"</#if> /> +</#macro> + +<#macro renderLink linkUrl parameterList targetWindow uniqueItemName actionUrl linkType="" id="" style="" name="" height="" width="" text="" imgStr=""> + <#if linkType?has_content && "hidden-form" == linkType> +<form method="post" action="${actionUrl}"<#if targetWindow?has_content> target="${targetWindow}"</#if> onsubmit="javascript:submitFormDisableSubmits(this)" name="${uniqueItemName}"><#rt/> + <#list parameterList as parameter> +<input name="${parameter.name}" value="${parameter.value}" type="hidden"/><#rt/> + </#list> +</form><#rt/> + </#if> + <#if uniqueItemName?has_content && "layered-modal" == linkType> +<div id="${uniqueItemName}"></div> +<a href="javascript:void(0);" id="${uniqueItemName}_link" + <#if style?has_content>class="${style}"</#if>> + <#if text?has_content>${text}</#if></a> +<script type="text/javascript"> + function ${uniqueItemName}_data() { + var data = { + <#list parameterList as parameter> + "${parameter.name}": "${parameter.value}", + </#list> + "presentation": "layer" + }; + return data; + } + jQuery("#${uniqueItemName}_link").click(function () { + jQuery("#${uniqueItemName}").dialog("open"); + }); + jQuery("#${uniqueItemName}").dialog({ + autoOpen: false, + <#if text?has_content>title: "${text}",</#if> + height: <#if height == "">600<#else>${height}</#if>, + width: <#if width == "">800<#else>${width}</#if>, + modal: true, + closeOnEscape: true, + open: function() { + jQuery.ajax({ + url: "${linkUrl}", + type: "POST", + data: ${uniqueItemName}_data(), + success: function(data) {jQuery("#${uniqueItemName}").html(data);} + }); + } + }); + </script> + <#else> +<#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content> +<a<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if name?has_content> name="${name}"</#if><#if targetWindow?has_content> target="${targetWindow}"</#if> href="<#if "hidden-form"==linkType>javascript:document.${uniqueItemName}.submit()<#else>${linkUrl}</#if>"><#rt/> +</#if> +<#if imgStr?has_content>${imgStr}</#if> <#if text?has_content>${text}</#if><#rt/> +<#if (linkType?has_content && "hidden-form" == linkType) || linkUrl?has_content></a><#rt/></#if> + </#if> +</#macro> + +<#macro renderMenuItemBegin style toolTip linkStr containsNestedMenus> + <li<#if style?has_content> class="${style}"</#if><#if toolTip?has_content> title="${toolTip}"</#if>><#if linkStr?has_content>${linkStr}</#if><#if containsNestedMenus><ul></#if><#rt/> +</#macro> + +<#macro renderMenuItemEnd containsNestedMenus> +<#if containsNestedMenus></ul></#if></li> +</#macro> Propchange: ofbiz/trunk/framework/widget/templates/HtmlMenuMacroLibrary.ftl ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/plugins/bi/webapp/bi/index.jsp ------------------------------------------------------------------------------ svn:eol-style = native |
Free forum by Nabble | Edit this page |