| <?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. |
| --> |
| |
| <forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-form.xsd"> |
| |
| <form name="FindExamples" type="single" target="FindExample" default-entity-name="Example"> |
| <field name="noConditionFind"><hidden value="Y"/></field> |
| <field name="exampleId" title="${uiLabelMap.ExampleExampleId}"><text-find/></field> |
| <field name="exampleName" title="${uiLabelMap.CommonName}"><text-find/></field> |
| <field name="exampleTypeId" title="${uiLabelMap.CommonType}"> |
| <drop-down allow-empty="true" current-description=""> |
| <entity-options description="${description}" key-field-name="exampleTypeId" entity-name="ExampleType"> |
| <entity-order-by field-name="description"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="statusId" title="${uiLabelMap.CommonStatus}"> |
| <drop-down allow-empty="true" current-description=""> |
| <entity-options description="${description}" key-field-name="statusId" entity-name="StatusItem"> |
| <entity-constraint name="statusTypeId" operator="equals" value="EXAMPLE_STATUS"/> |
| <entity-order-by field-name="description"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field> |
| </form> |
| |
| <form name="ListExamples" type="list" list-name="listIt" paginate-target="FindExample" default-entity-name="Example" separate-columns="true" |
| odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar"> |
| <actions> |
| <service service-name="performFind" result-map-name="result" result-map-list-name="listIt"> |
| <field-map field-name="inputFields" env-name="exampleCtx"/> |
| <field-map field-name="entityName" value="Example"/> |
| <field-map field-name="orderBy" env-name="parameters.sortField"/> |
| </service> |
| </actions> |
| <field name="exampleId" title="${uiLabelMap.ExampleExampleId}" widget-style="buttontext"> |
| <hyperlink also-hidden="false" description="${exampleId}" target="EditExample?exampleId=${exampleId}"/> |
| </field> |
| <field name="exampleName" title="${uiLabelMap.CommonName}" sort-field="true"><display/></field> |
| <field name="exampleTypeId" title="${uiLabelMap.CommonType}"><display-entity entity-name="ExampleType"/></field> |
| <field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem"/></field> |
| <field name="description" title="${uiLabelMap.CommonDescription}" sort-field="true"><display/></field> |
| </form> |
| |
| <!-- Typically, this extended form wouldn't be necessary. The parent form (ListExamples) would |
| have these attributes. |
| For the Ajax example we want all example entities listed, so the we use the entity-condition |
| instead of the performFind service. --> |
| <form name="ListExamplesAjax" extends="ListExamples" type="list" paginate-target="authview/findExampleAjax"> |
| <actions> |
| <entity-condition entity-name="Example"><order-by field-name="exampleName"/></entity-condition> |
| </actions> |
| <field name="exampleName" title="${uiLabelMap.CommonName}" id-name="exampleName" widget-style="tabletext"> |
| <display> |
| <in-place-editor url="/example/control/updateExample" cancel-control="button" saving-text="Updating..." text-between-controls=" "> |
| <simple-editor/> |
| <field-map field-name="exampleId" env-name="exampleId"/> |
| <field-map field-name="statusId" env-name="statusId"/> |
| </in-place-editor> |
| </display> |
| </field> |
| <field name="description" title="${uiLabelMap.CommonDescription}" id-name="description" widget-style="tabletext"> |
| <display> |
| <in-place-editor url="/example/control/updateExample" cancel-control="button" saving-text="Updating..." text-between-controls=" "> |
| <simple-editor/> |
| <field-map field-name="exampleId" env-name="exampleId"/> |
| <field-map field-name="statusId" env-name="statusId"/> |
| </in-place-editor> |
| </display> |
| </field> |
| <on-event-update-area event-type="paginate" area-id="ListExamplesAjax" area-target="ListExampleFormOnly"/> |
| </form> |
| |
| <form name="EditExample" type="single" target="updateExample" title="" default-map-name="example"> |
| <actions> |
| <entity-one entity-name="StatusItem" value-name="currentStatus" auto-field-map="false"> |
| <field-map field-name="statusId" env-name="example.statusId"/> |
| </entity-one> |
| </actions> |
| <alt-target use-when="example==null" target="createExample"/> |
| <auto-fields-service service-name="updateExample"/> |
| <field use-when="example!=null" name="exampleId" title="${uiLabelMap.ExampleExampleId}" tooltip="${uiLabelMap.CommonNotModifRecreat}"><display/></field> |
| <field use-when="example==null&&exampleId==null" name="exampleId" title="${uiLabelMap.ExampleExampleId}"><ignored/></field> |
| <field use-when="example==null&&exampleId!=null" name="exampleId" title="${uiLabelMap.ExampleExampleId}"><display description="${uiLabelMap.CommonCannotBeFound}: [${exampleId}]" also-hidden="false"/></field> |
| <field name="exampleTypeId" title="${uiLabelMap.CommonType}" id-name="exampleTypeId"> |
| <drop-down allow-empty="false"> |
| <!-- this is a neat feature, but not good for the type because the user would have to know the possible types in order to enter at least the first letter, so leaving it out by default; just uncomment to enable: <auto-complete/> --> |
| <entity-options entity-name="ExampleType" description="${description}"> |
| <entity-order-by field-name="description"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="statusId" use-when="example==null" title="${uiLabelMap.CommonStatus}"> |
| <drop-down allow-empty="false"> |
| <entity-options entity-name="StatusItem" description="${description}"> |
| <entity-constraint name="statusTypeId" value="EXAMPLE_STATUS"/> |
| <entity-order-by field-name="sequenceId"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="statusId" use-when="example!=null" title="${uiLabelMap.CommonStatus}"> |
| <drop-down allow-empty="false" current-description="${currentStatus.description}"> |
| <entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})"> |
| <entity-constraint name="statusId" env-name="example.statusId"/> |
| <entity-order-by field-name="sequenceId"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="description" title="${uiLabelMap.CommonDescription}"/> |
| <field name="anotherText"> |
| <drop-down allow-empty="true"> |
| <option key="Explicit Option" description="${uiLabelMap.ExampleExplicitOption}"/> |
| <entity-options entity-name="ProductType" description="${description}" key-field-name="description"> |
| <entity-order-by field-name="description"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="displayAnotherText" use-when="example!=null&&example.get("anotherText")!=null"> |
| <display description="${example.anotherText}"/> |
| </field> |
| <field name="submitButton" use-when="example==null" title="${uiLabelMap.CommonCreate}"><submit button-type="button"/></field> |
| <field name="submitButton" use-when="example!=null" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> |
| </form> |
| |
| <!-- Typically, this extended form wouldn't be necessary. The parent form (EditExample) would |
| have these settings. --> |
| <form name="EditExampleBackgroundSubmit" type="single" extends="EditExample" target="updateExampleAjax"> |
| <alt-target use-when="example==null" target="createExampleAjax"/> |
| <field name="statusId" use-when="example==null" title="${uiLabelMap.CommonStatus}" id-name="statusId"> |
| <drop-down allow-empty="false"> |
| <entity-options entity-name="StatusItem" description="${description}"> |
| <entity-constraint name="statusTypeId" value="EXAMPLE_STATUS"/> |
| <entity-order-by field-name="sequenceId"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <on-event-update-area event-type="submit" area-id="ListExamplesAjax" area-target="ListExampleFormOnly"/> |
| <on-event-update-area event-type="submit" area-id="EditExampleAjax" area-target="CreateExampleFormOnly"/> |
| </form> |
| |
| <!-- ExampleItem --> |
| <form name="ListExampleItems" type="list" list-name="exampleItems" target="updateExampleItem"> |
| <actions> |
| <entity-condition entity-name="ExampleItem"> |
| <condition-expr field-name="exampleId" env-name="exampleId"/> |
| <order-by field-name="exampleItemSeqId"/> |
| </entity-condition> |
| </actions> |
| <auto-fields-service service-name="updateExampleItem"/> |
| <field name="exampleId"><hidden/></field> |
| <field name="exampleItemSeqId" title="${uiLabelMap.CommonItem}"><display/></field> |
| <field name="description"><text size="30"/></field> |
| <field name="amountUomId" title="${uiLabelMap.CommonUom}"> |
| <drop-down allow-empty="true"> |
| <entity-options entity-name="UomAndType" key-field-name="uomId" description="${typeDescription}: ${description} (${abbreviation})"> |
| <entity-order-by field-name="typeDescription"/> |
| <entity-order-by field-name="description"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="deleteLink" title="" widget-style="buttontext"> |
| <hyperlink target="deleteExampleItem?exampleId=${exampleId}&exampleItemSeqId=${exampleItemSeqId}" |
| description="${uiLabelMap.CommonDelete}" also-hidden="false"/> |
| </field> |
| <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> |
| </form> |
| |
| <form name="AddExampleItem" type="single" target="createExampleItem" title=""> |
| <auto-fields-service service-name="createExampleItem"/> |
| <field name="exampleId"><hidden/></field> |
| <field name="exampleItemSeqId"><ignored/><!-- this will be auto-sequenced --></field> |
| <field name="amountUomId" title="${uiLabelMap.CommonUom}"> |
| <drop-down allow-empty="true"> |
| <entity-options entity-name="UomAndType" key-field-name="uomId" description="${typeDescription}: ${description} (${abbreviation})"> |
| <entity-order-by field-name="typeDescription"/> |
| <entity-order-by field-name="description"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> |
| </form> |
| |
| <!-- ExampleFeatureAppl --> |
| <form name="ListExampleFeatureAppls" type="list" list-name="exampleFeatureAppls" target="example_updateExampleFeatureAppl"> |
| <actions> |
| <entity-condition entity-name="ExampleFeatureAppl"> |
| <condition-expr field-name="exampleId" env-name="exampleId"/> |
| <order-by field-name="sequenceNum"/> |
| </entity-condition> |
| </actions> |
| <auto-fields-service service-name="updateExampleFeatureAppl"/> |
| <field name="exampleId"><hidden/></field> |
| <field name="exampleFeatureId" title="${uiLabelMap.ExampleFeature}"> |
| <display-entity entity-name="ExampleFeature" description="${description}"> |
| <sub-hyperlink target="EditExampleFeature?exampleFeatureId=${exampleFeatureId}" description="${exampleFeatureId}" link-style="buttontext"/> |
| </display-entity> |
| </field> |
| <field name="fromDate"><display/></field> |
| <field name="exampleFeatureApplTypeId" title="${uiLabelMap.CommonType}"> |
| <drop-down allow-empty="false"> |
| <entity-options entity-name="ExampleFeatureApplType" description="${description}"> |
| <entity-order-by field-name="description"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="submitButton" title="${uiLabelMap.CommonUpdate}"><submit button-type="button"/></field> |
| <field name="deleteLink" title="" widget-style="buttontext"> |
| <hyperlink target="example_deleteExampleFeatureAppl?exampleId=${exampleId}&exampleFeatureId=${exampleFeatureId}&fromDate=${fromDate}" |
| description="${uiLabelMap.CommonDelete}" also-hidden="false"/> |
| </field> |
| </form> |
| |
| <form name="AddExampleFeatureAppl" type="single" target="example_createExampleFeatureAppl" title=""> |
| <auto-fields-service service-name="createExampleFeatureAppl"/> |
| <field name="exampleId"><hidden/></field> |
| <field name="exampleFeatureId" id-name="exampleFeatureId"> |
| <text/> |
| <on-field-event-update-area event-type="change" area-id="exampleFeatureId" area-target="findExampleFeatures"/> |
| </field> |
| <!-- <field name="exampleFeatureId" title="${uiLabelMap.ExampleFeature}" id-name="exampleFeatureId"><lookup target-form-name="LookupExampleFeature"/></field> --> |
| <field name="exampleFeatureApplTypeId" title="${uiLabelMap.CommonType}"> |
| <drop-down allow-empty="false"> |
| <entity-options entity-name="ExampleFeatureApplType" description="${description}"> |
| <entity-order-by field-name="description"/> |
| </entity-options> |
| </drop-down> |
| </field> |
| <field name="submitButton" title="${uiLabelMap.CommonAdd}"><submit button-type="button"/></field> |
| </form> |
| |
| </forms> |