Author: jonesde
Date: Sat May 19 23:39:54 2007
New Revision: 539833
URL: http://svn.apache.org/viewvc?view=rev&rev=539833
Log:
Some improvements to the example component, and added an exampleext component
which extends the example webapp to demonstrate extension and overide
mechanisms; note that this works except for menu extension which doesn't appear
to be working on the framework level
Added:
ofbiz/trunk/framework/exampleext/
ofbiz/trunk/framework/exampleext/ofbiz-component.xml (with props)
ofbiz/trunk/framework/exampleext/webapp/
ofbiz/trunk/framework/exampleext/webapp/exampleext/
ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/
ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/controller.xml
(with props)
ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml (with
props)
ofbiz/trunk/framework/exampleext/webapp/exampleext/index.jsp (with props)
ofbiz/trunk/framework/exampleext/widget/
ofbiz/trunk/framework/exampleext/widget/example/
ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml (with
props)
ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml (with
props)
ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml (with
props)
ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml (with
props)
Modified:
ofbiz/trunk/framework/component-load.xml
ofbiz/trunk/framework/example/config/ExampleUiLabels.properties
ofbiz/trunk/framework/example/webapp/example/WEB-INF/web.xml
ofbiz/trunk/framework/example/widget/example/CommonScreens.xml
ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml
ofbiz/trunk/framework/example/widget/example/ExampleForms.xml
ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml
ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml
Modified: ofbiz/trunk/framework/component-load.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/component-load.xml?view=diff&rev=539833&r1=539832&r2=539833
==============================================================================
--- ofbiz/trunk/framework/component-load.xml (original)
+++ ofbiz/trunk/framework/component-load.xml Sat May 19 23:39:54 2007
@@ -40,4 +40,5 @@
<load-component component-location="${ofbiz.home}/framework/webtools"/>
<load-component component-location="${ofbiz.home}/framework/images"/>
<load-component component-location="${ofbiz.home}/framework/example"/>
+ <load-component component-location="${ofbiz.home}/framework/exampleext"/>
</component-loader>
Modified: ofbiz/trunk/framework/example/config/ExampleUiLabels.properties
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/config/ExampleUiLabels.properties?view=diff&rev=539833&r1=539832&r2=539833
==============================================================================
--- ofbiz/trunk/framework/example/config/ExampleUiLabels.properties (original)
+++ ofbiz/trunk/framework/example/config/ExampleUiLabels.properties Sat May 19
23:39:54 2007
@@ -36,6 +36,7 @@
ExampleMessage=For something interesting make sure you are logged in, try
username:admin, password:ofbiz.
ExampleNewExample=New Example
ExampleNewExampleFeature=New Example Feature
+ExampleOriginalExample=Original Example
ExampleErrorNoExampleStatusValidChange=Error\: status change from
[${lookedUpValue.statusId}] to [${parameters.statusId}] is not allowed.
ExamplePermissionError=Security Error\: to run ${resourceDescription} you must
have the EXAMPLE_${mainAction} or EXAMPLE_ADMIN permission
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?view=diff&rev=539833&r1=539832&r2=539833
==============================================================================
--- ofbiz/trunk/framework/example/webapp/example/WEB-INF/web.xml (original)
+++ ofbiz/trunk/framework/example/webapp/example/WEB-INF/web.xml Sat May 19
23:39:54 2007
@@ -31,7 +31,12 @@
<param-name>entityDelegatorName</param-name><param-value>default</param-value>
<description>The Name of the Entity Delegator to use, defined in
entityengine.xml</description>
</context-param>
-
+ <context-param>
+ <param-name>mainDecoratorLocation</param-name>
+
<param-value>component://example/widget/example/CommonScreens.xml</param-value>
+ <description>The location of the main-decorator screen to use for this
webapp; referred to as a context variable in screen def XML files.</description>
+ </context-param>
+
<filter>
<filter-name>ContextFilter</filter-name>
<display-name>ContextFilter</display-name>
Modified: ofbiz/trunk/framework/example/widget/example/CommonScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/CommonScreens.xml?view=diff&rev=539833&r1=539832&r2=539833
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/CommonScreens.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/CommonScreens.xml Sat May 19
23:39:54 2007
@@ -41,6 +41,90 @@
</section>
</screen>
+ <screen name="CommonExampleDecorator">
+ <section>
+ <actions>
+ <set field="headerItem" value="Example"/>
+
+ <set field="exampleId" from-field="parameters.exampleId"/>
+ <entity-one entity-name="Example" value-name="example"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator">
+ <decorator-section name="body">
+ <section>
+ <!-- do check for EXAMPLE, _VIEW permission -->
+ <condition>
+ <if-has-permission permission="EXAMPLE"
action="_VIEW"/>
+ </condition>
+ <widgets>
+ <section>
+ <condition>
+ <not><if-empty
field-name="example"/></not>
+ </condition>
+ <widgets>
+ <include-menu name="EditExample"
location="component://example/widget/example/ExampleMenus.xml"/>
+ <container style="button-bar"><link
target="EditExample" text="${uiLabelMap.ExampleNewExample}"
style="buttontext"/></container>
+ <container style="button-bar"><label
style="head1">${uiLabelMap.${titleProperty}}</label><label style="head2">
${uiLabelMap.CommonFor} "${example.exampleName}"
[${exampleId}]</label></container>
+ </widgets>
+ </section>
+
+ <decorator-section-include name="body"/>
+ </widgets>
+ <fail-widgets>
+ <label
style="head3">${uiLabelMap.ExampleViewPermissionError}</label>
+ </fail-widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+ <screen name="CommonExampleFeatureDecorator">
+ <section>
+ <actions>
+ <set field="headerItem" value="ExampleFeature"/>
+
+ <set field="exampleFeatureId"
from-field="parameters.exampleFeatureId"/>
+ <entity-one entity-name="ExampleFeature"
value-name="exampleFeature"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator"
location="${mainDecoratorLocation}">
+ <decorator-section name="body">
+ <section>
+ <!-- do check for EXAMPLE, _VIEW permission -->
+ <condition>
+ <if-has-permission permission="EXAMPLE"
action="_VIEW"/>
+ </condition>
+ <widgets>
+ <section>
+ <condition>
+ <not><if-empty
field-name="exampleFeature"/></not>
+ </condition>
+ <widgets>
+ <include-menu
name="EditExampleFeature"
location="component://example/widget/example/ExampleMenus.xml"/>
+ <container style="button-bar">
+ <link target="EditExampleFeature"
text="${uiLabelMap.ExampleNewExampleFeature}" style="buttontext"/>
+ </container>
+ <container style="button-bar">
+ <label
style="head1">${uiLabelMap.${titleProperty}}</label><label style="head2">
${uiLabelMap.CommonFor} "${exampleFeature.description}"
[${exampleFeatureId}]</label>
+ </container>
+ </widgets>
+ </section>
+
+ <decorator-section-include name="body"/>
+ </widgets>
+ <fail-widgets>
+ <label
style="head3">${uiLabelMap.ExampleViewPermissionError}</label>
+ </fail-widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+
+
<screen name="main">
<section>
<widgets>
@@ -65,7 +149,6 @@
</widgets>
</section>
</screen>
-
<screen name="login">
<section>
<widgets>
Modified: ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml?view=diff&rev=539833&r1=539832&r2=539833
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml
(original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleFeatureScreens.xml Sat
May 19 23:39:54 2007
@@ -27,7 +27,7 @@
<set field="titleProperty"
value="PageTitleFindExampleFeature"/>
</actions>
<widgets>
- <decorator-screen name="main-decorator"
location="component://example/widget/example/CommonScreens.xml">
+ <decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
@@ -50,50 +50,6 @@
</section>
</screen>
- <screen name="CommonExampleFeatureDecorator">
- <section>
- <actions>
- <set field="headerItem" value="ExampleFeature"/>
-
- <set field="exampleFeatureId"
from-field="parameters.exampleFeatureId"/>
- <entity-one entity-name="ExampleFeature"
value-name="exampleFeature"/>
- </actions>
- <widgets>
- <decorator-screen name="main-decorator"
location="component://example/widget/example/CommonScreens.xml">
- <decorator-section name="body">
- <section>
- <!-- do check for EXAMPLE, _VIEW permission -->
- <condition>
- <if-has-permission permission="EXAMPLE"
action="_VIEW"/>
- </condition>
- <widgets>
- <section>
- <condition>
- <not><if-empty
field-name="exampleFeature"/></not>
- </condition>
- <widgets>
- <include-menu
name="EditExampleFeature"
location="component://example/widget/example/ExampleMenus.xml"/>
- <container style="button-bar">
- <link target="EditExampleFeature"
text="${uiLabelMap.ExampleNewExampleFeature}" style="buttontext"/>
- </container>
- <container style="button-bar">
- <label
style="head1">${uiLabelMap.${titleProperty}}</label><label style="head2">
${uiLabelMap.CommonFor} "${exampleFeature.description}"
[${exampleFeatureId}]</label>
- </container>
- </widgets>
- </section>
-
- <decorator-section-include name="body"/>
- </widgets>
- <fail-widgets>
- <label
style="head3">${uiLabelMap.ExampleViewPermissionError}</label>
- </fail-widgets>
- </section>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
<screen name="EditExampleFeature">
<section>
<actions>
@@ -104,7 +60,7 @@
<entity-one entity-name="ExampleFeature"
value-name="exampleFeature"/>
</actions>
<widgets>
- <decorator-screen name="CommonExampleFeatureDecorator">
+ <decorator-screen name="CommonExampleFeatureDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="EditExampleFeature"
location="component://example/widget/example/ExampleFeatureForms.xml"/>
</decorator-section>
@@ -121,7 +77,7 @@
<set field="exampleFeatureId"
from-field="parameters.exampleFeatureId"/>
</actions>
<widgets>
- <decorator-screen name="CommonExampleFeatureDecorator">
+ <decorator-screen name="CommonExampleFeatureDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="ListExampleFeatureAppls"
location="component://example/widget/example/ExampleFeatureForms.xml"/>
<include-form name="AddExampleFeatureAppl"
location="component://example/widget/example/ExampleFeatureForms.xml"/>
Modified: ofbiz/trunk/framework/example/widget/example/ExampleForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleForms.xml?view=diff&rev=539833&r1=539832&r2=539833
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleForms.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleForms.xml Sat May 19
23:39:54 2007
@@ -81,7 +81,10 @@
</entity-options>
</drop-down>
</field>
- <field name="displayAnotherText"><display
description="${example.anotherText}"/></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>
Modified: ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml?view=diff&rev=539833&r1=539832&r2=539833
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleMenus.xml Sat May 19
23:39:54 2007
@@ -20,10 +20,8 @@
<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
- <menu name="EditExample" default-selected-style="selected"
- menu-container-style="button-bar button-style-1"
- selected-menuitem-context-field-name="tabButtonItem"
- type="simple">
+ <menu name="EditExample" default-selected-style="selected" type="simple"
+ menu-container-style="button-bar button-style-1"
selected-menuitem-context-field-name="tabButtonItem">
<menu-item name="EditExample" title="${uiLabelMap.ExampleExample}">
<link target="EditExample?exampleId=${exampleId}"/>
</menu-item>
@@ -34,10 +32,8 @@
<link target="EditExampleFeatureAppls?exampleId=${exampleId}"/>
</menu-item>
</menu>
- <menu name="EditExampleFeature" default-selected-style="selected"
- menu-container-style="button-bar button-style-1"
- selected-menuitem-context-field-name="tabButtonItem"
- type="simple">
+ <menu name="EditExampleFeature" default-selected-style="selected"
type="simple"
+ menu-container-style="button-bar button-style-1"
selected-menuitem-context-field-name="tabButtonItem">
<menu-item name="EditExampleFeature"
title="${uiLabelMap.ExampleFeature}">
<link
target="EditExampleFeature?exampleFeatureId=${exampleFeatureId}"/>
</menu-item>
Modified: ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml?view=diff&rev=539833&r1=539832&r2=539833
==============================================================================
--- ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml (original)
+++ ofbiz/trunk/framework/example/widget/example/ExampleScreens.xml Sat May 19
23:39:54 2007
@@ -27,7 +27,7 @@
<set field="titleProperty" value="PageTitleFindExample"/>
</actions>
<widgets>
- <decorator-screen name="main-decorator"
location="component://example/widget/example/CommonScreens.xml">
+ <decorator-screen name="main-decorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<section>
<condition>
@@ -48,46 +48,6 @@
</section>
</screen>
- <screen name="CommonExampleDecorator">
- <section>
- <actions>
- <set field="headerItem" value="Example"/>
-
- <set field="exampleId" from-field="parameters.exampleId"/>
- <entity-one entity-name="Example" value-name="example"/>
- </actions>
- <widgets>
- <decorator-screen name="main-decorator"
location="component://example/widget/example/CommonScreens.xml">
- <decorator-section name="body">
- <section>
- <!-- do check for EXAMPLE, _VIEW permission -->
- <condition>
- <if-has-permission permission="EXAMPLE"
action="_VIEW"/>
- </condition>
- <widgets>
- <section>
- <condition>
- <not><if-empty
field-name="example"/></not>
- </condition>
- <widgets>
- <include-menu name="EditExample"
location="component://example/widget/example/ExampleMenus.xml"/>
- <container style="button-bar"><link
target="EditExample" text="${uiLabelMap.ExampleNewExample}"
style="buttontext"/></container>
- <container style="button-bar"><label
style="head1">${uiLabelMap.${titleProperty}}</label><label style="head2">
${uiLabelMap.CommonFor} "${example.exampleName}"
[${exampleId}]</label></container>
- </widgets>
- </section>
-
- <decorator-section-include name="body"/>
- </widgets>
- <fail-widgets>
- <label
style="head3">${uiLabelMap.ExampleViewPermissionError}</label>
- </fail-widgets>
- </section>
- </decorator-section>
- </decorator-screen>
- </widgets>
- </section>
- </screen>
-
<screen name="EditExample">
<section>
<actions>
@@ -98,7 +58,7 @@
<entity-one entity-name="Example" value-name="example"/>
</actions>
<widgets>
- <decorator-screen name="CommonExampleDecorator">
+ <decorator-screen name="CommonExampleDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="EditExample"
location="component://example/widget/example/ExampleForms.xml"/>
</decorator-section>
@@ -115,7 +75,7 @@
<set field="exampleId" from-field="parameters.exampleId"/>
</actions>
<widgets>
- <decorator-screen name="CommonExampleDecorator">
+ <decorator-screen name="CommonExampleDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="ListExampleItems"
location="component://example/widget/example/ExampleForms.xml"/>
<include-form name="AddExampleItem"
location="component://example/widget/example/ExampleForms.xml"/>
@@ -133,7 +93,7 @@
<set field="exampleId" from-field="parameters.exampleId"/>
</actions>
<widgets>
- <decorator-screen name="CommonExampleDecorator">
+ <decorator-screen name="CommonExampleDecorator"
location="${parameters.mainDecoratorLocation}">
<decorator-section name="body">
<include-form name="ListExampleFeatureAppls"
location="component://example/widget/example/ExampleForms.xml"/>
<include-form name="AddExampleFeatureAppl"
location="component://example/widget/example/ExampleForms.xml"/>
Added: ofbiz/trunk/framework/exampleext/ofbiz-component.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/ofbiz-component.xml?view=auto&rev=539833
==============================================================================
--- ofbiz/trunk/framework/exampleext/ofbiz-component.xml (added)
+++ ofbiz/trunk/framework/exampleext/ofbiz-component.xml Sat May 19 23:39:54
2007
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<ofbiz-component name="exampleext"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
+ <resource-loader name="main" type="component"/>
+
+ <webapp name="exampleext" title="Example Ext" server="default-server"
location="webapp/exampleext"
+ base-permission="OFBTOOLS" mount-point="/exampleext"/>
+</ofbiz-component>
Propchange: ofbiz/trunk/framework/exampleext/ofbiz-component.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/exampleext/ofbiz-component.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/exampleext/ofbiz-component.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/controller.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/controller.xml?view=auto&rev=539833
==============================================================================
--- ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/controller.xml
(added)
+++ ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/controller.xml
Sat May 19 23:39:54 2007
@@ -0,0 +1,28 @@
+<?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.
+-->
+
+<site-conf xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/site-conf.xsd">
+ <include
location="component://example/webapp/example/WEB-INF/controller.xml"/>
+
+ <description>Extended Catalog Manager Controller Configuration
File</description>
+
+ <view-map name="EditExample" type="screen"
page="component://exampleext/widget/example/ExampleScreens.xml#EditExampleExt"/>
+</site-conf>
Propchange:
ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/controller.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange:
ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/controller.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange:
ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/controller.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: 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?view=auto&rev=539833
==============================================================================
--- ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml (added)
+++ ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml Sat May
19 23:39:54 2007
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
+<!--
+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.
+-->
+
+<web-app>
+ <display-name>Open For Business - Extended Example Component</display-name>
+ <description>Extended Example Component of the Open For Business
Project</description>
+
+ <context-param>
+
<param-name>localDispatcherName</param-name><param-value>exampleext</param-value>
+ <description>A unique name used to identify/recognize the local
dispatcher for the Service Engine</description>
+ </context-param>
+ <context-param>
+
<param-name>entityDelegatorName</param-name><param-value>default</param-value>
+ <description>The Name of the Entity Delegator to use, defined in
entityengine.xml</description>
+ </context-param>
+ <context-param>
+ <param-name>mainDecoratorLocation</param-name>
+
<param-value>component://exampleext/widget/example/CommonScreens.xml</param-value>
+ <description>The location of the main-decorator screen to use for this
webapp; referred to as a context variable in screen def XML files.</description>
+ </context-param>
+
+ <filter>
+ <filter-name>ContextFilter</filter-name>
+ <display-name>ContextFilter</display-name>
+ <filter-class>org.ofbiz.webapp.control.ContextFilter</filter-class>
+
<init-param><param-name>disableContextSecurity</param-name><param-value>N</param-value></init-param>
+ <init-param>
+ <param-name>allowedPaths</param-name>
+
<param-value>/control:/select:/index.html:/index.jsp:/default.html:/default.jsp:/images:/includes/maincss.css</param-value>
+ </init-param>
+
<init-param><param-name>errorCode</param-name><param-value>403</param-value></init-param>
+
<init-param><param-name>redirectPath</param-name><param-value>/control/main</param-value></init-param>
+ </filter>
+
<filter-mapping><filter-name>ContextFilter</filter-name><url-pattern>/*</url-pattern></filter-mapping>
+
+
<listener><listener-class>org.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
+
<listener><listener-class>org.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
+ <!-- NOTE: not all app servers support mounting implementations of the
HttpSessionActivationListener interface -->
+ <!--
<listener><listener-class>org.ofbiz.webapp.control.ControlActivationEventListener</listener-class></listener>
-->
+
+ <servlet>
+ <servlet-name>ControlServlet</servlet-name>
+ <display-name>ControlServlet</display-name>
+ <description>Main Control Servlet</description>
+ <servlet-class>org.ofbiz.webapp.control.ControlServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
<servlet-mapping><servlet-name>ControlServlet</servlet-name><url-pattern>/control/*</url-pattern></servlet-mapping>
+
+ <session-config><session-timeout>60</session-timeout><!-- in minutes
--></session-config>
+
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ <welcome-file>index.html</welcome-file>
+ <welcome-file>index.htm</welcome-file>
+ </welcome-file-list>
+</web-app>
Propchange: ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/exampleext/webapp/exampleext/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ofbiz/trunk/framework/exampleext/webapp/exampleext/index.jsp
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/webapp/exampleext/index.jsp?view=auto&rev=539833
==============================================================================
--- ofbiz/trunk/framework/exampleext/webapp/exampleext/index.jsp (added)
+++ ofbiz/trunk/framework/exampleext/webapp/exampleext/index.jsp Sat May 19
23:39:54 2007
@@ -0,0 +1 @@
+<%response.sendRedirect("control/main");%>
\ No newline at end of file
Propchange: ofbiz/trunk/framework/exampleext/webapp/exampleext/index.jsp
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/exampleext/webapp/exampleext/index.jsp
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/exampleext/webapp/exampleext/index.jsp
------------------------------------------------------------------------------
svn:mime-type = text/plain
Added: ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml?view=auto&rev=539833
==============================================================================
--- ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml (added)
+++ ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml Sat May
19 23:39:54 2007
@@ -0,0 +1,81 @@
+<?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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-screen.xsd">
+ <!-- Decorator Screens Copied from CatalogCommonScreens.xml, since the
mainDecoratorLocation now points here -->
+ <screen name="main-decorator">
+ <section>
+ <actions>
+ <!-- can add additional info here, like another UiLabels file:
<property-map resource="ExampleExtUiLabels" map-name="uiLabelMap"
global="true"/> -->
+ </actions>
+ <widgets>
+ <include-screen name="main-decorator"
location="component://example/widget/example/CommonScreens.xml"/>
+ </widgets>
+ </section>
+ </screen>
+
+ <screen name="CommonExampleDecorator">
+ <section>
+ <actions>
+ <set field="headerItem" value="Example"/>
+
+ <set field="exampleId" from-field="parameters.exampleId"/>
+ <entity-one entity-name="Example" value-name="example"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="main-decorator">
+ <decorator-section name="body">
+ <section>
+ <!-- do check for EXAMPLE, _VIEW permission -->
+ <condition>
+ <if-has-permission permission="EXAMPLE"
action="_VIEW"/>
+ </condition>
+ <widgets>
+ <section>
+ <condition>
+ <not><if-empty
field-name="example"/></not>
+ </condition>
+ <widgets>
+ <include-menu name="EditExample"
location="component://exampleext/widget/example/ExampleMenus.xml"/>
+ <container style="button-bar"><link
target="EditExample" text="${uiLabelMap.ExampleNewExample}"
style="buttontext"/></container>
+ <container style="button-bar"><label
style="head1">${uiLabelMap.${titleProperty}}</label><label style="head2">
${uiLabelMap.CommonFor} "${example.exampleName}"
[${exampleId}]</label></container>
+ </widgets>
+ </section>
+
+ <decorator-section-include name="body"/>
+ </widgets>
+ <fail-widgets>
+ <label
style="head3">${uiLabelMap.ExampleViewPermissionError}</label>
+ </fail-widgets>
+ </section>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+ <screen name="CommonExampleFeatureDecorator">
+ <section>
+ <widgets>
+ <include-screen name="CommonExampleFeatureDecorator"
location="component://example/widget/example/CommonScreens.xml"/>
+ </widgets>
+ </section>
+ </screen>
+</screens>
Propchange: ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/exampleext/widget/example/CommonScreens.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml?view=auto&rev=539833
==============================================================================
--- ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml (added)
+++ ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml Sat May 19
23:39:54 2007
@@ -0,0 +1,35 @@
+<?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://www.ofbiz.org/dtds/widget-form.xsd">
+ <form name="EditExampleExt" type="single"
+ target="updateExample" title="" default-map-name="example"
default-entity-name="Example"
+ extends-resource="component://example/widget/example/ExampleForms.xml"
extends="EditExample">
+
+ <!-- NOTE: add new fields for the EditExample form here -->
+ <field name="exampleText"><display description="This example text
means we are in the extended form."/></field>
+
+ <!-- in order for these to be at the bottom need to hide and then
override these, or use the sort-order element which doesn't work well when we
want to allow changes in the extended form; so here it is -->
+ <field name="submitButton" use-when="example!=null"><hidden/></field>
+ <field name="submitButton" use-when="example==null"><hidden/></field>
+ <field name="submitButtonOvrd" title="${uiLabelMap.CommonCreate}"
use-when="example==null" widget-style="smallSubmit"><submit
button-type="button"/></field>
+ <field name="submitButtonOvrd" title="${uiLabelMap.CommonUpdate}"
use-when="example!=null" widget-style="smallSubmit"><submit
button-type="button"/></field>
+ </form>
+</forms>
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleForms.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml?view=auto&rev=539833
==============================================================================
--- ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml (added)
+++ ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml Sat May 19
23:39:54 2007
@@ -0,0 +1,29 @@
+<?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.
+-->
+
+<menus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/widget-menu.xsd">
+ <menu name="EditExample" default-selected-style="selected" type="simple"
+ menu-container-style="button-bar button-style-1"
selected-menuitem-context-field-name="tabButtonItem"
+ extends="EditExample"
extends-resource="component://example/widget/example/ExampleMenus.xml">
+ <menu-item name="EditExampleOriginal"
title="${uiLabelMap.ExampleOriginalExample}">
+ <link target="/example/control/EditExample?exampleId=${exampleId}"
url-mode="inter-app"/>
+ </menu-item>
+ </menu>
+</menus>
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleMenus.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Added: ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml?view=auto&rev=539833
==============================================================================
--- ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml (added)
+++ ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml Sat May
19 23:39:54 2007
@@ -0,0 +1,43 @@
+<?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.
+-->
+
+<screens xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:noNamespaceSchemaLocation="http://www.ofbiz.org/dtds/widget-screen.xsd">
+
+ <screen name="EditExampleExt">
+ <section>
+ <actions>
+ <set field="titleProperty" value="PageTitleEditExample"/>
+ <set field="tabButtonItem" value="EditExample"/>
+ <set field="labelTitleProperty" value="ExampleExample"/>
+
+ <set field="exampleId" from-field="parameters.exampleId"/>
+ <entity-one entity-name="Example" value-name="example"/>
+ </actions>
+ <widgets>
+ <decorator-screen name="CommonExampleDecorator"
location="${parameters.mainDecoratorLocation}">
+ <decorator-section name="body">
+ <include-form name="EditExampleExt"
location="component://exampleext/widget/example/ExampleForms.xml"/>
+ </decorator-section>
+ </decorator-screen>
+ </widgets>
+ </section>
+ </screen>
+</screens>
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml
------------------------------------------------------------------------------
svn:keywords = "Date Rev Author URL Id"
Propchange: ofbiz/trunk/framework/exampleext/widget/example/ExampleScreens.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml