Author: jonesde
Date: Thu Jul 9 04:37:38 2009 New Revision: 792397 URL: http://svn.apache.org/viewvc?rev=792397&view=rev Log: Added some examples of slightly more complex view entities, plus simplified some example forms based especially on the ExampleStatusItem view-entity; also cleaned up some names/titles; note that these are proof of concept examples to demonstrate and test the new functionality and are not yet functional Added: ofbiz/trunk/framework/example/entitydef/entitymodel_view.xml (with props) Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml ofbiz/trunk/framework/example/ofbiz-component.xml ofbiz/trunk/framework/example/webapp/example/WEB-INF/web.xml ofbiz/trunk/framework/example/widget/example/ExampleForms.xml ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml Modified: ofbiz/trunk/framework/example/entitydef/entitymodel.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel.xml?rev=792397&r1=792396&r2=792397&view=diff ============================================================================== --- ofbiz/trunk/framework/example/entitydef/entitymodel.xml (original) +++ ofbiz/trunk/framework/example/entitydef/entitymodel.xml Thu Jul 9 04:37:38 2009 @@ -92,24 +92,6 @@ <key-map field-name="statusId"/> </relation> </entity> - <view-entity entity-name="ExampleStatusDetail" package-name="org.ofbiz.example.example"> - <member-entity entity-alias="EXPL" entity-name="Example"/> - <member-entity entity-alias="EXST" entity-name="ExampleStatus"/> - <alias-all entity-alias="EXPL"> - <exclude field="statusId"/> - </alias-all> - <alias-all entity-alias="EXST"/> - <alias entity-alias="EXPL" name="currentStatusId" field="statusId"/> - <alias name="statusDelay"> - <complex-alias operator="-"> - <complex-alias-field entity-alias="EXST" field="statusDate"/> - <complex-alias-field entity-alias="EXPL" field="exampleDate"/> - </complex-alias> - </alias> - <view-link entity-alias="EXPL" rel-entity-alias="EXST"> - <key-map field-name="exampleId"/> - </view-link> - </view-entity> <entity entity-name="ExampleType" package-name="org.ofbiz.example.example" default-resource-name="ExampleEntityLabels" Added: ofbiz/trunk/framework/example/entitydef/entitymodel_view.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/entitydef/entitymodel_view.xml?rev=792397&view=auto ============================================================================== --- ofbiz/trunk/framework/example/entitydef/entitymodel_view.xml (added) +++ ofbiz/trunk/framework/example/entitydef/entitymodel_view.xml Thu Jul 9 04:37:38 2009 @@ -0,0 +1,115 @@ +<?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. +--> + +<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd"> + <!-- ========================================================= --> + <!-- ======================== Defaults ======================= --> + <!-- ========================================================= --> + <title>Entity of an Open For Business Project Component</title> + <description>None</description> + <copyright>Copyright 2001-2009 The Apache Software Foundation</copyright> + <author>None</author> + <version>1.0</version> + + <view-entity entity-name="ExampleStatusDetail" package-name="org.ofbiz.example.example"> + <member-entity entity-alias="EXPL" entity-name="Example"/> + <member-entity entity-alias="EXST" entity-name="ExampleStatus"/> + <member-entity entity-alias="STIT" entity-name="StatusItem"/> + <alias-all entity-alias="EXPL"> + <exclude field="statusId"/> + </alias-all> + <alias-all entity-alias="EXST"/> + <alias-all entity-alias="STIT"/> + <alias entity-alias="EXPL" name="currentStatusId" field="statusId"/> + <alias name="statusDelay"> + <complex-alias operator="-"> + <complex-alias-field entity-alias="EXST" field="statusDate"/> + <complex-alias-field entity-alias="EXPL" field="exampleDate"/> + </complex-alias> + </alias> + <view-link entity-alias="EXPL" rel-entity-alias="EXST"> + <key-map field-name="exampleId"/> + </view-link> + <view-link entity-alias="EXST" rel-entity-alias="STIT"> + <key-map field-name="statusId"/> + </view-link> + </view-entity> + <view-entity entity-name="ExampleStatusItem" package-name=""> + <member-entity entity-alias="SI" entity-name="StatusItem"/> + <alias-all entity-alias="SI"/> + <entity-condition> + <condition-expr entity-alias="SI" field-name="statusTypeId" operator="equals" value="EXAMPLE_STATUS"/> + <order-by field-name="sequenceId"/> + </entity-condition> + </view-entity> + + <!-- Some examples of nested views and conditions for report --> + <view-entity entity-name="ExampleFeatureApplAndType" package-name="org.ofbiz.example.example"> + <member-entity entity-alias="EXFTAP" entity-name="ExampleFeatureAppl"/> + <member-entity entity-alias="EXFTAPTP" entity-name="ExampleFeatureApplType"/> + <alias-all entity-alias="EXFTAP"/> + <alias-all entity-alias="EXFTAPTP"/> + <view-link entity-alias="EXFTAP" rel-entity-alias="EXFTAPTP"> + <key-map field-name="exampleFeatureApplTypeId"/> + </view-link> + <entity-condition filter-by-date="true"/> + </view-entity> + <view-entity entity-name="ExampleFeatureAndApplAndType" package-name="org.ofbiz.example.example"> + <member-entity entity-alias="EXFT" entity-name="ExampleFeature"/> + <member-entity entity-alias="EFAAT" entity-name="ExampleFeatureApplAndType"/> + <alias-all entity-alias="EXFT"/> + <alias-all entity-alias="EFAAT"/> + <view-link entity-alias="EXFT" rel-entity-alias="EFAAT"> + <key-map field-name="exampleFeatureId"/> + </view-link> + </view-entity> + <view-entity entity-name="ExampleFeatureAndApplFullView" package-name="org.ofbiz.example.example"> + <member-entity entity-alias="EX" entity-name="Example"/> + <member-entity entity-alias="EFAAAT" entity-name="ExampleFeatureAndApplAndType"/> + <alias-all entity-alias="EX"/> + <alias-all entity-alias="EFAAAT"/> + <view-link entity-alias="EX" rel-entity-alias="EFAAAT"> + <key-map field-name="exampleId"/> + </view-link> + </view-entity> + <view-entity entity-name="ContrivedExamplesWithRequiredFeaturesReport" package-name="org.ofbiz.example.example"> + <member-entity entity-alias="EFAAFV" entity-name="ExampleFeatureAndApplFullView"/> + <alias-all entity-alias="EFAAFV"/> + <entity-condition> + <condition-list combine="and"> + <condition-expr field-name="exampleTypeId" value="CONTRIVED"/> + <condition-expr field-name="exampleFeatureApplTypeId" value="REQUIRED"/> + </condition-list> + <order-by field-name="exampleName"/> + </entity-condition> + </view-entity> + <view-entity entity-name="AllExamplesWithDesiredCustomerFeaturesReport" package-name="org.ofbiz.example.example"> + <member-entity entity-alias="EFAAFV" entity-name="ExampleFeatureAndApplFullView"/> + <alias-all entity-alias="EFAAFV"/> + <entity-condition> + <condition-list combine="and"> + <condition-expr field-name="featureSourceEnumId" value="EXFTSRC_CUSTOMER"/> + <condition-expr field-name="exampleFeatureApplTypeId" value="DESIRED"/> + </condition-list> + <order-by field-name="exampleName"/> + </entity-condition> + </view-entity> +</entitymodel> Propchange: ofbiz/trunk/framework/example/entitydef/entitymodel_view.xml ------------------------------------------------------------------------------ svn:eol-style = native Propchange: ofbiz/trunk/framework/example/entitydef/entitymodel_view.xml ------------------------------------------------------------------------------ svn:keywords = "Date Rev Author URL Id" Propchange: ofbiz/trunk/framework/example/entitydef/entitymodel_view.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: ofbiz/trunk/framework/example/ofbiz-component.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/ofbiz-component.xml?rev=792397&r1=792396&r2=792397&view=diff ============================================================================== --- ofbiz/trunk/framework/example/ofbiz-component.xml (original) +++ ofbiz/trunk/framework/example/ofbiz-component.xml Thu Jul 9 04:37:38 2009 @@ -33,6 +33,7 @@ <!-- entity resources: model(s), eca(s), group, and data definitions --> <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel.xml"/> + <entity-resource type="model" reader-name="main" loader="main" location="entitydef/entitymodel_view.xml"/> <!-- <entity-resource type="eca" reader-name="main" loader="main" location="entitydef/eecas.xml"/> --> <entity-resource type="data" reader-name="seed" loader="main" location="data/ExampleTypeData.xml"/> <entity-resource type="data" reader-name="seed" loader="main" location="data/ExampleSecurityData.xml"/> Modified: ofbiz/trunk/framework/example/webapp/example/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/webapp/example/WEB-INF/web.xml?rev=792397&r1=792396&r2=792397&view=diff ============================================================================== --- ofbiz/trunk/framework/example/webapp/example/WEB-INF/web.xml (original) +++ ofbiz/trunk/framework/example/webapp/example/WEB-INF/web.xml Thu Jul 9 04:37:38 2009 @@ -20,8 +20,8 @@ --> <web-app> - <display-name>Open For Business - Example Component</display-name> - <description>Example Component of the Open For Business Project</description> + <display-name>Open For Business - Example Application</display-name> + <description>Example Application of the Open For Business Project</description> <context-param> <param-name>webSiteId</param-name> Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?rev=792397&r1=792396&r2=792397&view=diff ============================================================================== --- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original) +++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Thu Jul 9 04:37:38 2009 @@ -34,10 +34,7 @@ </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> + <entity-options description="${description}" key-field-name="statusId" entity-name="ExampleStatusItem"/> </drop-down> </field> <field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field> @@ -115,17 +112,13 @@ </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> + <entity-options entity-name="StatusItem" description="${description}"/> </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> @@ -152,10 +145,7 @@ <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> + <entity-options entity-name="ExampleStatusItem" description="${description}"/> </drop-down> </field> <on-event-update-area event-type="submit" area-id="ListExamplesAjax" area-target="ListExampleFormOnly"/> Modified: ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml?rev=792397&r1=792396&r2=792397&view=diff ============================================================================== --- ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml (original) +++ ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml Thu Jul 9 04:37:38 2009 @@ -20,8 +20,8 @@ --> <web-app> - <display-name>Open For Business - Extended Example Component</display-name> - <description>Extended Example Component of the Open For Business Project</description> + <display-name>Open For Business - Extended Example Application</display-name> + <description>Extended Example Application of the Open For Business Project</description> <context-param> <param-name>webSiteId</param-name> |
Free forum by Nabble | Edit this page |