You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2011/06/08 22:40:01 UTC

svn commit: r1133551 - in /myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp: WEB-INF/ best-practice/ content/ content/11/00/ content/12/ content/12/00/ content/12/01/ error/

Author: lofwyr
Date: Wed Jun  8 20:40:00 2011
New Revision: 1133551

URL: http://svn.apache.org/viewvc?rev=1133551&view=rev
Log:
refactor the demo

Added:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/error.xhtml   (contents, props changed)
      - copied, changed from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/x-error-in-syntax.jsp   (contents, props changed)
      - copied, changed from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error-in-syntax.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/01/
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/01/theme.xhtml   (contents, props changed)
      - copied, changed from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/theme.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/best-practice.xhtml   (contents, props changed)
      - copied, changed from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/intro.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml   (contents, props changed)
      - copied, changed from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml   (contents, props changed)
      - copied, changed from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.jsp
Removed:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error-in-syntax.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/intro.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/theme.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/00-intro.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/03-tree.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.jsp
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.jsp
Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/11/00/flow-layout.xhtml

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml?rev=1133551&r1=1133550&r2=1133551&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/faces-config.xml Wed Jun  8 20:40:00 2011
@@ -175,15 +175,15 @@
   <navigation-rule>
     <navigation-case>
       <from-outcome>best-practice/intro</from-outcome>
-      <to-view-id>/best-practice/intro.jsp</to-view-id>
+      <to-view-id>/content/12/best-practice.xhtml</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>best-practice/error</from-outcome>
-      <to-view-id>/best-practice/error.jsp</to-view-id>
+      <to-view-id>/content/12/00/error.xhtml</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>best-practice/theme</from-outcome>
-      <to-view-id>/best-practice/theme.jsp</to-view-id>
+      <to-view-id>/content/12/01/theme.xhtml</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>best-practice/transition</from-outcome>
@@ -208,14 +208,14 @@
   </navigation-rule>
 
   <navigation-rule>
-    <from-view-id>/best-practice/error.jsp</from-view-id>
+    <from-view-id>/content/12/00/error.xhtml</from-view-id>
     <navigation-case>
-      <from-outcome>404</from-outcome>
-      <to-view-id>/best-practice/not-existing-page.jsp</to-view-id>
+      <from-outcome>error-404</from-outcome>
+      <to-view-id>/content/12/00/x-not-existing-page.jsp</to-view-id>
     </navigation-case>
     <navigation-case>
       <from-outcome>syntax</from-outcome>
-      <to-view-id>/best-practice/error-in-syntax.jsp</to-view-id>
+      <to-view-id>/content/12/00/x-error-in-syntax.jsp</to-view-id>
     </navigation-case>
   </navigation-rule>
 

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml?rev=1133551&r1=1133550&r2=1133551&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/web.xml Wed Jun  8 20:40:00 2011
@@ -34,6 +34,12 @@
     <param-value>true</param-value>
   </context-param>
 
+   <!-- disable error handling from myfaces, needed for the demo -->
+  <context-param>
+    <param-name>org.apache.myfaces.ERROR_HANDLING</param-name>
+    <param-value>false</param-value>
+  </context-param>
+
   <context-param>
     <param-name>facelets.DEVELOPMENT</param-name>
     <param-value>true</param-value>
@@ -130,17 +136,17 @@
 
   <error-page>
     <error-code>404</error-code>
-    <location>/faces/error/404.jsp</location>
+    <location>/faces/error/404.xhtml</location>
   </error-page>
 
   <error-page>
     <error-code>500</error-code>
-    <location>/faces/error/throwable.jsp</location>
+    <location>/faces/error/throwable.xhtml</location>
   </error-page>
 
   <error-page>
     <exception-type>java.lang.Throwable</exception-type>
-    <location>/faces/error/throwable.jsp</location>
+    <location>/faces/error/throwable.xhtml</location>
   </error-page>
 
   <!-- The Usual Welcome File List -->

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/11/00/flow-layout.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/11/00/flow-layout.xhtml?rev=1133551&r1=1133550&r2=1133551&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/11/00/flow-layout.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/11/00/flow-layout.xhtml Wed Jun  8 20:40:00 2011
@@ -19,9 +19,7 @@
 
 <ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
-                xmlns:tx="http://myfaces.apache.org/tobago/extension"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
-                xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core">
   <ui:param name="title" value="#{overviewBundle.layout}"/>
   <tc:panel>

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/error.xhtml (from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/error.xhtml?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/error.xhtml&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error.jsp&r1=1126549&r2=1133551&rev=1133551&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/error.xhtml Wed Jun  8 20:40:00 2011
@@ -1,4 +1,6 @@
-<%--
+<?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.
@@ -13,27 +15,42 @@
  * 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.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
-
-<layout:overview>
-  <jsp:body>
-    <tc:box label="Sample Error Scenarios">
+-->
+
+<ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
+
+  <ui:param name="title" value="Sample Error Scenarios (Todo: is to be optimized) " />
+
+  <tc:panel>
+    <f:facet name="layout">
+      <tc:gridLayout rows="35px;35px;35px;35px" columns="100px;*"/>
+    </f:facet>
+
+    <tc:panel>
+      <tc:gridLayoutConstraint columnSpan="2"/>
       <f:facet name="layout">
-        <tc:gridLayout rows="35px;35px;35px;*" columns="*;100px" />
+        <tc:flowLayout />
       </f:facet>
 
-      <tc:out value="An exception is thrown in the application. The servlet container forwards to a page defined in the web.xml." />
-      <tc:button action="#{bestPracticeController.throwException}" label="Application" />
-      <tc:out value="The navigation handler refers to a non existing page. The error code 404 in the web.xml is affected." />
-      <tc:button action="404" label="Not Found" />
-      <tc:out value="The navigation handler refers to a page with a syntax error." />
-      <tc:button action="syntax" label="Syntax Error" />
-      <tc:cell />
-      <tc:cell />
-
-    </tc:box>
-  </jsp:body>
-</layout:overview>
+      <tc:out value="When using MyFaces or Facelets you have to turn off the exception mechanism of them to use this demo. See in the MyFaces Wiki: "/>
+      <tc:link link="http://wiki.apache.org/myfaces/Handling_Server_Errors" label="Handling Server Errors"/>
+
+    </tc:panel>
+
+    <tc:button action="#{bestPracticeController.throwException}" label="Application"/>
+    <tc:out
+        value="An exception is thrown in the application. The servlet container forwards to a page defined in the web.xml."/>
+
+    <tc:button action="error-404" label="Not Found"/>
+    <tc:out
+        value="The navigation handler refers to a non existing page. The error code 404 in the web.xml is affected."/>
+
+    <tc:button action="syntax" label="Syntax Error"/>
+    <tc:out value="The navigation handler refers to a page with a syntax error."/>
+
+  </tc:panel>
+
+</ui:composition>

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/error.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/error.xhtml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/x-error-in-syntax.jsp (from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error-in-syntax.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/x-error-in-syntax.jsp?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/x-error-in-syntax.jsp&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/error-in-syntax.jsp&r1=1126549&r2=1133551&rev=1133551&view=diff
==============================================================================
    (empty)

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/x-error-in-syntax.jsp
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/00/x-error-in-syntax.jsp
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/01/theme.xhtml (from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/theme.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/01/theme.xhtml?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/01/theme.xhtml&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/theme.jsp&r1=1126549&r2=1133551&rev=1133551&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/theme.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/01/theme.xhtml Wed Jun  8 20:40:00 2011
@@ -1,4 +1,6 @@
-<%--
+<?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.
@@ -13,24 +15,22 @@
  * 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.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
+-->
 
-<layout:overview>
-  <jsp:body>
-    <tc:panel>
-      <f:facet name="layout">
-        <tc:gridLayout rows="80px;160px;*" />
-      </f:facet>
+<ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
+  <tc:panel>
+    <f:facet name="layout">
+      <tc:gridLayout rows="80px;160px;*"/>
+    </f:facet>
 
-      <tc:out value="#{overviewBundle.themesText1}" escape="false" />
+    <tc:out value="#{overviewBundle.themesText1}" escape="false"/>
 
-      <tc:box label="#{overviewBundle.themesCodeExampleTitle}">
-        <tc:out value="#{overviewBundle.themesCodeExample}" />
-      </tc:box>
-      <tc:cell/>
-    </tc:panel>
-  </jsp:body>
-</layout:overview>
+    <tc:box label="#{overviewBundle.themesCodeExampleTitle}">
+      <tc:out value="#{overviewBundle.themesCodeExample}"/>
+    </tc:box>
+    <tc:cell/>
+  </tc:panel>
+</ui:composition>

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/01/theme.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/01/theme.xhtml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/best-practice.xhtml (from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/intro.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/best-practice.xhtml?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/best-practice.xhtml&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/intro.jsp&r1=1126549&r2=1133551&rev=1133551&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/best-practice/intro.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/best-practice.xhtml Wed Jun  8 20:40:00 2011
@@ -1,4 +1,6 @@
-<%--
+<?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.
@@ -13,20 +15,14 @@
  * 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.
---%>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
+-->
 
-<layout:overview>
-  <jsp:body>
-    <tc:box label="Best Practice">
-      <f:facet name="layout">
-        <tc:gridLayout />
-      </f:facet>
+<ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
+  <ui:param name="title" value="Best Practice"/>
 
-      <tc:out value="Some usecases of Tobago and JSF." />
+  <tc:out value="Some usecases of Tobago and JSF."/>
 
-    </tc:box>
-  </jsp:body>
-</layout:overview>
+</ui:composition>

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/best-practice.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/12/best-practice.xhtml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml (from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.jsp&r1=1126549&r2=1133551&rev=1133551&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml Wed Jun  8 20:40:00 2011
@@ -1,4 +1,6 @@
-<%--
+<?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.
@@ -13,21 +15,19 @@
  * 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.
---%>
-<%@ page isErrorPage="true" %>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
+-->
 
-<layout:overview>
-  <jsp:body>
-    <tc:box label="Error 404">
+<ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
+  <ui:param name="title" value="Error 404"/>
+    <tc:panel>
       <f:facet name="layout">
-        <tc:gridLayout rows="fixed;*" />
+        <tc:gridLayout rows="auto;*" />
       </f:facet>
 
       <tc:messages />
-      <tc:out value="Page not found!"/>
-    </tc:box>
-  </jsp:body>
-</layout:overview>
+      <tc:out value="The page was not found!"/>
+    </tc:panel>
+</ui:composition>

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/404.xhtml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml (from r1126549, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.jsp)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.jsp&r1=1126549&r2=1133551&rev=1133551&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.jsp (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml Wed Jun  8 20:40:00 2011
@@ -1,6 +1,6 @@
-<%@ page import="java.io.PrintWriter" %>
-<%@ page import="java.io.StringWriter" %>
-<%--
+<?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.
@@ -15,41 +15,44 @@
  * 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.
---%>
-<%@ page isErrorPage="true" %>
-<%@ taglib uri="http://myfaces.apache.org/tobago/component" prefix="tc" %>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
-<%@ taglib tagdir="/WEB-INF/tags/layout" prefix="layout" %>
-
-<%!
-  public static String exceptionToString(Throwable exception) {
-    if (exception == null) {
-      return "No Exception available!";
-    }
-    StringBuilder builder = new StringBuilder();
-    builder.append("<pre>");
-    StringWriter stringWriter = new StringWriter();
-    exception.printStackTrace(new PrintWriter(stringWriter));
-    builder.append(stringWriter.toString());
-    builder.append("</pre>");
-    return builder.toString();
-  }
-%>
-<%
-  request.setAttribute("exceptionText", exceptionToString(exception));
-%>
-
-<layout:overview>
-  <jsp:body>
-    <tc:box label="Sorry, an error has occured!">
-      <f:facet name="layout">
-        <tc:gridLayout rows="fixed;*" />
-      </f:facet>
-
-      <tc:messages />
-      <tc:cell scrollbars="auto">
-        <tc:out value="#{exceptionText}" escape="false"/>
-      </tc:cell>
-    </tc:box>
-  </jsp:body>
-</layout:overview>
+-->
+
+<ui:composition template="/WEB-INF/tags/layout/overview.xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
+  <ui:param name="title" value="Sorry, an error has occured!"/>
+
+  <tc:panel>
+    <f:facet name="layout">
+      <tc:gridLayout rows="fixed;*"/>
+    </f:facet>
+
+    <tc:messages/>
+    <tc:cell scrollbars="auto">
+      <tc:out value="#{exceptionContext.exception}" escape="false"/>
+
+<!-- TODO
+      <%!
+        public static String exceptionToString(Throwable exception) {
+          if (exception == null) {
+            return "No Exception available!";
+          }
+          StringBuilder builder = new StringBuilder();
+          builder.append("<pre>");
+          StringWriter stringWriter = new StringWriter();
+          exception.printStackTrace(new PrintWriter(stringWriter));
+          builder.append(stringWriter.toString());
+          builder.append("</pre>");
+          return builder.toString();
+        }
+      %>
+      <%
+        request.setAttribute("exceptionText", exceptionToString(exception));
+      %>
+-->
+
+    </tc:cell>
+  </tc:panel>
+
+</ui:composition>

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL