myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1523584 - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/util/ tobago-example/tobago-example-demo/src/main/webapp/WEB-INF/ tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/ tobago-example/t...
Date Mon, 16 Sep 2013 10:53:06 GMT
Author: lofwyr
Date: Mon Sep 16 10:53:05 2013
New Revision: 1523584

URL: http://svn.apache.org/r1523584
Log:
exception handling

Added:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/exception.xhtml
      - copied unchanged from r1523548, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/view-expired.xhtml
Removed:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/throwable.xhtml
Modified:
    myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/DebugUtils.java
    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/01-basic/basic.xhtml

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/DebugUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/DebugUtils.java?rev=1523584&r1=1523583&r2=1523584&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/DebugUtils.java
(original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/util/DebugUtils.java
Mon Sep 16 10:53:05 2013
@@ -71,17 +71,17 @@ public class DebugUtils {
 
   public static String toString(UIComponent component) {
     StringBuilder buf = new StringBuilder(component.getClass().getName());
-    buf.append('@');
-    buf.append(Integer.toHexString(component.hashCode()));
+//    buf.append('@');
+//    buf.append(Integer.toHexString(component.hashCode()));
     buf.append(" ");
     buf.append(component.getRendererType());
     buf.append(" ");
+//      buf.append(component.getId());
+//      buf.append(" ");
+      buf.append(component.getClientId(FacesContext.getCurrentInstance()));
     if (component instanceof javax.faces.component.UIViewRoot) {
+      buf.append(" viewId=");
       buf.append(((javax.faces.component.UIViewRoot) component).getViewId());
-    } else {
-      buf.append(component.getId());
-      buf.append(" ");
-      buf.append(component.getClientId(FacesContext.getCurrentInstance()));
     }
     return buf.toString();
   }

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=1523584&r1=1523583&r2=1523584&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
Mon Sep 16 10:53:05 2013
@@ -26,9 +26,7 @@
 
   <context-param>
     <param-name>javax.faces.PROJECT_STAGE</param-name>
-<!--
-    <param-value>Development</param-value>
--->
+    <!--<param-value>Development</param-value>-->
     <param-value>Production</param-value>
   </context-param>
 
@@ -171,12 +169,17 @@
 
   <error-page>
     <error-code>500</error-code>
-    <location>/faces/error/throwable.xhtml</location>
+    <location>/faces/error/exception.xhtml</location>
+  </error-page>
+
+  <error-page>
+    <exception-type>java.lang.Exception</exception-type>
+    <location>/faces/error/exception.xhtml</location>
   </error-page>
 
   <error-page>
-    <exception-type>java.lang.Throwable</exception-type>
-    <location>/faces/error/throwable.xhtml</location>
+    <exception-type>javax.faces.application.ViewExpiredException</exception-type>
+    <location>/faces/error/view-expired.xhtml</location>
   </error-page>
 
   <!-- The Usual Welcome File List -->

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml?rev=1523584&r1=1523583&r2=1523584&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/01-basic/basic.xhtml
Mon Sep 16 10:53:05 2013
@@ -48,9 +48,10 @@
         </f:facet>
         <tx:in value="#{overviewController.basicInput}" required="true" tabIndex="1"
                label="#{overviewBundle.basic_textboxLabel}" tip="#{overviewBundle.basic_textboxTip}"/>
-        <tx:in value="#{overviewController.suggestInput}" tabIndex="3"
-               label="#{overviewBundle.basic_suggestLabel}" tip="#{overviewBundle.basic_suggestTip}"
-               suggestMethod="#{overviewController.getInputSuggestItems}" suggestDelay="300"
suggestMinChars="1"/>
+        <tx:in value="#{overviewController.suggestInput}" tabIndex="3" fieldId="suggest"
+               label="#{overviewBundle.basic_suggestLabel}" tip="#{overviewBundle.basic_suggestTip}">
+          <tc:suggest suggestMethod="#{overviewController.getInputSuggestItems}" delay="300"
minimumCharacters="1"/>
+        </tx:in>
         <tx:date value="#{overviewController.basicDate}" tabIndex="4"
                  label="#{overviewBundle.basic_dateLabel}" required="true">
           <f:convertDateTime pattern="dd/MM/yyyy"/>

Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/view-expired.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/view-expired.xhtml?rev=1523584&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/view-expired.xhtml
(added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/error/view-expired.xhtml
Mon Sep 16 10:53:05 2013
@@ -0,0 +1,39 @@
+<?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.
+-->
+
+<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="The view has been expired!"/>
+
+  <tc:panel>
+
+    <f:facet name="layout">
+      <tc:flowLayout/>
+    </f:facet>
+
+    <h3>ViewExpiredException</h3>
+    We got a ViewExpiredException from JSF.
+    There is the simplest way to to handle this problem.
+    You will find more information to handle this, when you search internet for "ViewExpiredException".
+  </tc:panel>
+
+</ui:composition>



Mime
View raw message