svn commit: r469915 - in /incubator/ofbiz/trunk/framework/shark: webapp/shark/ webapp/shark/WEB-INF/ webapp/shark/WEB-INF/actions/includes/ webapp/shark/WEB-INF/pagedefs/ webapp/shark/includes/ webapp/shark/templates/ widget/

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r469915 - in /incubator/ofbiz/trunk/framework/shark: webapp/shark/ webapp/shark/WEB-INF/ webapp/shark/WEB-INF/actions/includes/ webapp/shark/WEB-INF/pagedefs/ webapp/shark/includes/ webapp/shark/templates/ widget/

jacopoc
Author: jacopoc
Date: Wed Nov  1 06:18:19 2006
New Revision: 469915

URL: http://svn.apache.org/viewvc?view=rev&rev=469915
Log:
Conversion of all the Shark's JPublish pages to screen widgets.
Thanks to Scott Gray for the patch.
OFBIZ-420

Added:
    incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appheader.ftl   (with props)
    incubator/ofbiz/trunk/framework/shark/widget/
    incubator/ofbiz/trunk/framework/shark/widget/CommonScreens.xml   (with props)
    incubator/ofbiz/trunk/framework/shark/widget/ProcessScreens.xml   (with props)
    incubator/ofbiz/trunk/framework/shark/widget/RepositoryScreens.xml   (with props)
    incubator/ofbiz/trunk/framework/shark/widget/TaskListScreens.xml   (with props)
Removed:
    incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/actions/includes/
    incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/jpublish.xml
    incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/pagedefs/
    incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appbar.ftl
    incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/footer.ftl
    incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/header.ftl
    incubator/ofbiz/trunk/framework/shark/webapp/shark/login.ftl
    incubator/ofbiz/trunk/framework/shark/webapp/shark/templates/
Modified:
    incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml
    incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/web.xml

Modified: incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml?view=diff&rev=469915&r1=469914&r2=469915
==============================================================================
--- incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml (original)
+++ incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/controller.xml Wed Nov  1 06:18:19 2006
@@ -28,7 +28,6 @@
     <handler name="simple" type="request" class="org.ofbiz.webapp.event.SimpleEventHandler"/>
 
     <!-- view handlers -->
-    <handler name="jpublish" type="view" class="org.ofbiz.webapp.view.JPublishViewHandler"/>        
     <handler name="screen" type="view" class="org.ofbiz.widget.screen.ScreenWidgetViewHandler"/>
 
     <handler name="ftl" type="view" class="org.ofbiz.webapp.ftl.FreeMarkerViewHandler"/>
@@ -121,14 +120,14 @@
 
     <!-- View Mappings -->
     <view-map name="error" page="/error/error.jsp"/>
-    <view-map name="main" type="jpublish" page="/main.ftl"/>
-    <view-map name="login" type="jpublish" page="/login.ftl"/>
+    <view-map name="main" type="screen" page="component://shark/widget/CommonScreens.xml#main"/>
+    <view-map name="login" type="screen" page="component://shark/widget/CommonScreens.xml#login"/>
 
-    <view-map name="repository" type="jpublish" page="/repository/showRepository.ftl"/>
-    <view-map name="processList" type="jpublish" page="/process/processList.ftl"/>
-    <view-map name="processDetailList" type="jpublish" page="/process/processDetailList.ftl"/>
-    <view-map name="processHistory" type="jpublish" page="/process/processHistory.ftl"/>
-    <view-map name="processSteps" type="jpublish" page="/process/processSteps.ftl"/>
-    <view-map name="worklist" type="jpublish" page="/tasklist/worklist.ftl"/>
+    <view-map name="repository" type="screen" page="component://shark/widget/RepositoryScreens.xml#showRepository"/>
+    <view-map name="processList" type="screen" page="component://shark/widget/ProcessScreens.xml#processList"/>
+    <view-map name="processDetailList" type="screen" page="component://shark/widget/ProcessScreens.xml#processDetailList"/>
+    <view-map name="processHistory" type="screen" page="component://shark/widget/ProcessScreens.xml#processHistory"/>
+    <view-map name="processSteps" type="screen" page="component://shark/widget/ProcessScreens.xml#processSteps"/>
+    <view-map name="worklist" type="screen" page="component://shark/widget/TaskListScreens.xml#worklist"/>
     <!-- end of view mappings -->
 </site-conf>

Modified: incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/web.xml?view=diff&rev=469915&r1=469914&r2=469915
==============================================================================
--- incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/web.xml (original)
+++ incubator/ofbiz/trunk/framework/shark/webapp/shark/WEB-INF/web.xml Wed Nov  1 06:18:19 2006
@@ -34,7 +34,12 @@
         <param-name>serviceReaderUrls</param-name>
         <param-value>/WEB-INF/services.xml</param-value>
         <description>Configuration File(s) For The Service Dispatcher</description>
-    </context-param>  
+    </context-param>
+    <context-param>
+        <param-name>mainDecoratorLocation</param-name>
+        <param-value>component://shark/widget/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>

Added: incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appheader.ftl
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appheader.ftl?view=auto&rev=469915
==============================================================================
--- incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appheader.ftl (added)
+++ incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appheader.ftl Wed Nov  1 06:18:19 2006
@@ -0,0 +1,32 @@
+<#--
+Copyright 2001-2006 The Apache Software Foundation
+
+Licensed 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.
+-->
+<#assign security = requestAttributes.security>
+<#assign unselectedLeftClassName = "headerButtonLeft">
+<#assign unselectedRightClassName = "headerButtonRight">
+<#assign selectedLeftClassMap = {page.headerItem?default("void") : "headerButtonLeftSelected"}>
+<#assign selectedRightClassMap = {page.headerItem?default("void") : "headerButtonRightSelected"}>
+<#if requestAttributes.uiLabelMap?exists><#assign uiLabelMap = requestAttributes.uiLabelMap></#if>
+
+<div class="apptitle">&nbsp;${uiLabelMap.FrameworkShark}&nbsp;</div>
+<div class="row">
+  <div class="col"><a href="<@ofbizUrl>main</@ofbizUrl>" class="${selectedLeftClassMap.main?default(unselectedLeftClassName)}">${uiLabelMap.CommonMain}</a></div>
+  <#if requestAttributes.userLogin?has_content>
+    <div class="col-right"><a href="<@ofbizUrl>logout</@ofbizUrl>" class="${selectedRightClassMap.logout?default(unselectedRightClassName)}">${uiLabelMap.CommonLogout}</a></div>
+  <#else>
+    <div class="col-right"><a href='<@ofbizUrl>${requestAttributes.checkLoginUrl?if_exists}</@ofbizUrl>' class='${selectedRightClassMap.login?default(unselectedRightClassName)}'>${uiLabelMap.CommonLogin}</a></div>
+  </#if>
+  <div class="col-fill">&nbsp;</div>
+</div>

Propchange: incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appheader.ftl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appheader.ftl
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/shark/webapp/shark/includes/appheader.ftl
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/ofbiz/trunk/framework/shark/widget/CommonScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/shark/widget/CommonScreens.xml?view=auto&rev=469915
==============================================================================
--- incubator/ofbiz/trunk/framework/shark/widget/CommonScreens.xml (added)
+++ incubator/ofbiz/trunk/framework/shark/widget/CommonScreens.xml Wed Nov  1 06:18:19 2006
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+$Id: CommonScreens.xml 7773 2006-06-12 08:41:23Z jonesde $
+
+Copyright 2004-2006 The Apache Software Foundation
+
+Licensed 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="CommonSharkDecorator">
+        <section>
+            <actions>
+                <!-- base/top/specific map first, then more common map added for shared labels -->
+                <property-map resource="SharkUiLabels" map-name="uiLabelMap" global="true"/>
+                <property-map resource="CommonUiLabels" map-name="uiLabelMap" global="true"/>
+                <set field="layoutSettings.companyName" from-field="uiLabelMap.SharkCompanyName" global="true"/>
+                <set field="layoutSettings.companySubtitle" from-field="uiLabelMap.SharkCompanySubtitle" global="true"/>
+                <set field="layoutSettings.headerImageUrl" value="/images/ofbiz_logo.jpg" global="true"/>
+                <!-- <set field="layoutSettings.headerMiddleBackgroundUrl" value="" global="true"/> -->
+                <!-- <set field="layoutSettings.headerRightBackgroundUrl" value="" global="true"/> -->
+                <set field="activeApp" value="shark" global="true"/>
+                <set field="appheaderTemplate" value="component://shark/webapp/shark/includes/appheader.ftl" global="true"/>
+            </actions>
+            <widgets>
+                <include-screen name="GlobalDecorator" location="component://common/widget/CommonScreens.xml"/>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="main">
+        <section>
+            <actions>
+                <set field="headerItem" value="main"/>
+                <set field="titleProperty" value="Main"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://shark/webapp/shark/main.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="login">
+        <section>
+            <actions>
+                <set field="headerItem" value="login"></set>
+                <set field="titleProperty" value="Login"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific>
+                            <html><html-template location="component://common/webcommon/login.ftl"/></html>
+                        </platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>

Propchange: incubator/ofbiz/trunk/framework/shark/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/shark/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/shark/widget/CommonScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/ofbiz/trunk/framework/shark/widget/ProcessScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/shark/widget/ProcessScreens.xml?view=auto&rev=469915
==============================================================================
--- incubator/ofbiz/trunk/framework/shark/widget/ProcessScreens.xml (added)
+++ incubator/ofbiz/trunk/framework/shark/widget/ProcessScreens.xml Wed Nov  1 06:18:19 2006
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2004-2006 The Apache Software Foundation
+
+Licensed 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="processList">
+        <section>
+            <actions>
+                <set field="headerItem" value="main"/>
+                <set field="titleProperty" value="Process List"/>
+                
+                <script location="component://shark/webapp/shark/WEB-INF/actions/process/processList.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://shark/webapp/shark/process/processList.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="processDetailList">
+        <section>
+            <actions>
+                <set field="headerItem" value="main"/>
+                <set field="titleProperty" value="Process Detail List"/>
+                
+                <script location="component://shark/webapp/shark/WEB-INF/actions/process/processDetailList.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://shark/webapp/shark/process/processDetailList.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="processHistory">
+        <section>
+            <actions>
+                <set field="headerItem" value="main"/>
+                <set field="titleProperty" value="Process History"/>
+                
+                <script location="component://shark/webapp/shark/WEB-INF/actions/process/processHistory.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://shark/webapp/shark/process/processHistory.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+    <screen name="processSteps">
+        <section>
+            <actions>
+                <set field="headerItem" value="main"/>
+                <set field="titleProperty" value="Process Steps"/>
+                
+                <script location="component://shark/webapp/shark/WEB-INF/actions/process/processSteps.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://shark/webapp/shark/process/processSteps.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>

Propchange: incubator/ofbiz/trunk/framework/shark/widget/ProcessScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/shark/widget/ProcessScreens.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/shark/widget/ProcessScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/ofbiz/trunk/framework/shark/widget/RepositoryScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/shark/widget/RepositoryScreens.xml?view=auto&rev=469915
==============================================================================
--- incubator/ofbiz/trunk/framework/shark/widget/RepositoryScreens.xml (added)
+++ incubator/ofbiz/trunk/framework/shark/widget/RepositoryScreens.xml Wed Nov  1 06:18:19 2006
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2004-2006 The Apache Software Foundation
+
+Licensed 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="showRepository">
+        <section>
+            <actions>
+                <set field="headerItem" value="main"/>
+                <set field="titleProperty" value="XPDL Repository"/>
+
+                <script location="component://shark/webapp/shark/WEB-INF/actions/repository/showRepository.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://shark/webapp/shark/repository/showRepository.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>

Propchange: incubator/ofbiz/trunk/framework/shark/widget/RepositoryScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/shark/widget/RepositoryScreens.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/shark/widget/RepositoryScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/ofbiz/trunk/framework/shark/widget/TaskListScreens.xml
URL: http://svn.apache.org/viewvc/incubator/ofbiz/trunk/framework/shark/widget/TaskListScreens.xml?view=auto&rev=469915
==============================================================================
--- incubator/ofbiz/trunk/framework/shark/widget/TaskListScreens.xml (added)
+++ incubator/ofbiz/trunk/framework/shark/widget/TaskListScreens.xml Wed Nov  1 06:18:19 2006
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2004-2006 The Apache Software Foundation
+
+Licensed 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="worklist">
+        <section>
+            <actions>
+                <set field="headerItem" value="main"/>
+                <set field="titleProperty" value="Work List"/>
+
+                <script location="component://shark/webapp/shark/WEB-INF/actions/tasklist/worklist.bsh"/>
+            </actions>
+            <widgets>
+                <decorator-screen name="CommonSharkDecorator" location="${parameters.mainDecoratorLocation}">
+                    <decorator-section name="body">
+                        <platform-specific><html><html-template location="component://shark/webapp/shark/tasklist/worklist.ftl"/></html></platform-specific>
+                    </decorator-section>
+                </decorator-screen>
+            </widgets>
+        </section>
+    </screen>
+</screens>
\ No newline at end of file

Propchange: incubator/ofbiz/trunk/framework/shark/widget/TaskListScreens.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/ofbiz/trunk/framework/shark/widget/TaskListScreens.xml
------------------------------------------------------------------------------
    svn:keywords = "Date Rev Author URL Id"

Propchange: incubator/ofbiz/trunk/framework/shark/widget/TaskListScreens.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml