myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarinsc...@apache.org
Subject svn commit: r209957 - in /myfaces: api/trunk/src/java/javax/faces/component/ current/ examples/trunk/ examples/trunk/simple/ examples/trunk/standard/ tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/
Date Sat, 09 Jul 2005 17:10:58 GMT
Author: mmarinschek
Date: Sat Jul  9 10:10:56 2005
New Revision: 209957

URL: http://svn.apache.org/viewcvs?rev=209957&view=rev
Log:
fixed several small issues

Added:
    myfaces/examples/trunk/simple/inputTextHelp.jsp
Modified:
    myfaces/api/trunk/src/java/javax/faces/component/UIComponentBase.java
    myfaces/current/   (props changed)
    myfaces/examples/trunk/   (props changed)
    myfaces/examples/trunk/simple/home.jsp
    myfaces/examples/trunk/simple/selectOneCountry.jsp
    myfaces/examples/trunk/simple/selectOneLanguage.jsp
    myfaces/examples/trunk/standard/inputTextHelp.jsp
    myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java

Modified: myfaces/api/trunk/src/java/javax/faces/component/UIComponentBase.java
URL: http://svn.apache.org/viewcvs/myfaces/api/trunk/src/java/javax/faces/component/UIComponentBase.java?rev=209957&r1=209956&r2=209957&view=diff
==============================================================================
--- myfaces/api/trunk/src/java/javax/faces/component/UIComponentBase.java (original)
+++ myfaces/api/trunk/src/java/javax/faces/component/UIComponentBase.java Sat Jul  9 10:10:56
2005
@@ -15,6 +15,9 @@
  */
 package javax.faces.component;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import javax.faces.FactoryFinder;
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
@@ -39,6 +42,8 @@
 public abstract class UIComponentBase
         extends UIComponent
 {
+    private static Log log = LogFactory.getLog(UIComponentBase.class);
+
     private _ComponentAttributesMap _attributesMap = null;
     private Map _valueBindingMap = null;
     private List _childrenList = null;
@@ -49,6 +54,7 @@
     private UIComponent _parent = null;
     private boolean _transient = false;
 
+
     public UIComponentBase()
     {
     }
@@ -507,9 +513,58 @@
         Renderer renderer = renderKit.getRenderer(getFamily(), rendererType);
         if (renderer == null)
         {
-            getFacesContext().getExternalContext().log("No Renderer found for component "
+ getClientId(context) + " (component-family=" + getFamily() + ", renderer-type=" + rendererType
+ ")");
+            getFacesContext().getExternalContext().log("No Renderer found for component "
+ getPathToComponent(this) + " (component-family=" + getFamily() + ", renderer-type=" + rendererType
+ ")");
+            log.warn("No Renderer found for component " + getPathToComponent(this) + " (component-family="
+ getFamily() + ", renderer-type=" + rendererType + ")");
         }
         return renderer;
+    }
+
+    public static String getPathToComponent(UIComponent component)
+    {
+        StringBuffer buf = new StringBuffer();
+
+        if(component == null)
+        {
+            buf.append("{Component-Path : ");
+            buf.append("[null]}");
+            return buf.toString();
+        }
+
+        getPathToComponent(component,buf);
+
+        buf.insert(0,"{Component-Path : ");
+        buf.append("}");
+
+        return buf.toString();
+    }
+
+    private static void getPathToComponent(UIComponent component, StringBuffer buf)
+    {
+        if(component == null)
+            return;
+
+        StringBuffer intBuf = new StringBuffer();
+
+        intBuf.append("[Class: ");
+        intBuf.append(component.getClass().getName());
+        if(component instanceof UIViewRoot)
+        {
+            intBuf.append(",ViewId: ");
+            intBuf.append(((UIViewRoot) component).getViewId());
+        }
+        else
+        {
+            intBuf.append(",Id: ");
+            intBuf.append(component.getId());
+        }
+        intBuf.append("]");
+
+        buf.insert(0,intBuf);
+
+        if(component!=null)
+        {
+            getPathToComponent(component.getParent(),buf);
+        }
     }
 
     public boolean isTransient()

Propchange: myfaces/current/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jul  9 10:10:56 2005
@@ -4,3 +4,6 @@
 *.library
 classes
 Tomcat
+*.iml
+*.ipr
+*.iws

Propchange: myfaces/examples/trunk/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Sat Jul  9 10:10:56 2005
@@ -1 +1,2 @@
 build.local.properties
+temp

Modified: myfaces/examples/trunk/simple/home.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/home.jsp?rev=209957&r1=209956&r2=209957&view=diff
==============================================================================
Binary files - no diff available.

Added: myfaces/examples/trunk/simple/inputTextHelp.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/inputTextHelp.jsp?rev=209957&view=auto
==============================================================================
--- myfaces/examples/trunk/simple/inputTextHelp.jsp (added)
+++ myfaces/examples/trunk/simple/inputTextHelp.jsp Sat Jul  9 10:10:56 2005
@@ -0,0 +1,52 @@
+<%@ page session="false" contentType="text/html;charset=utf-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://myfaces.apache.org/extensions" prefix="x"%>
+<html>
+<!--
+/*
+ * Copyright 2004 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.
+ */
+//-->
+
+<%@include file="inc/head.inc" %>
+
+<body>
+
+<f:view>
+
+	<f:loadBundle
+		basename="org.apache.myfaces.examples.resource.example_messages"
+		var="example_messages" />
+
+    <h:form>
+        <f:verbatim>
+            <h1>Input Text Help</h1>
+        </f:verbatim>
+        <x:div/>
+        <h:outputText value="Delete helper text:"/>
+        <x:inputTextHelp value="" id="i1" helpText="Hello World"/>
+        <x:div/>
+        <h:outputText value="Select helper text:"/>
+        <x:inputTextHelp value="" id="i2" selectText="true" helpText="TT.MM.JJJJ"/>
+    </h:form>
+
+</f:view>
+
+<%@include file="inc/page_footer.jsp" %>
+
+</body>
+
+</html>
\ No newline at end of file

Modified: myfaces/examples/trunk/simple/selectOneCountry.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/selectOneCountry.jsp?rev=209957&r1=209956&r2=209957&view=diff
==============================================================================
Binary files - no diff available.

Modified: myfaces/examples/trunk/simple/selectOneLanguage.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/selectOneLanguage.jsp?rev=209957&r1=209956&r2=209957&view=diff
==============================================================================
--- myfaces/examples/trunk/simple/selectOneLanguage.jsp (original)
+++ myfaces/examples/trunk/simple/selectOneLanguage.jsp Sat Jul  9 10:10:56 2005
@@ -30,43 +30,19 @@
 
     <f:loadBundle basename="org.apache.myfaces.examples.resource.example_messages" var="example_messages"/>
 
-    <x:panelLayout id="page" layout="#{globalOptions.pageLayout}"
-            styleClass="pageLayout"
-            headerClass="pageHeader"
-            navigationClass="pageNavigation"
-            bodyClass="pageBody"
-            footerClass="pageFooter" >
+    <h:form>
+        <x:selectOneLanguage value="#{language.code}" maxLength="25" onchange="this.form.submit();"/>
+        <f:verbatim><br/></f:verbatim>
+        <h:outputLabel for="languageCode" value="Code : "/>
+        <h:outputText id="languageCode" value="#{language.code}"/>
+        <f:verbatim><br/><br/></f:verbatim>
+        <h:commandButton value="Update"/>
+    </h:form>
 
-        <f:facet name="header">
-            <f:subview id="header">
-                <jsp:include page="inc/page_header.jsp" />
-            </f:subview>
-        </f:facet>
-
-        <f:facet name="navigation">
-            <f:subview id="menu" >
-                <jsp:include page="inc/navigation.jsp" />
-            </f:subview>
-        </f:facet>
-
-        <f:facet name="body">
-            <h:panelGroup>
-                <h:form>
-                    <x:selectOneLanguage value="#{language.code}" maxLength="25" onchange="this.form.submit();"/>
-                    <f:verbatim><br/></f:verbatim>
-                    <h:outputLabel for="languageCode" value="Code : "/>
-                    <h:outputText id="languageCode" value="#{language.code}"/>
-                    <f:verbatim><br/><br/></f:verbatim>
-                    <h:commandButton value="Update"/>
-                </h:form>
-            </h:panelGroup>
-        </f:facet>
-
-        <%@include file="inc/page_footer.jsp" %>
+</f:view>
 
-    </x:panelLayout>
+<%@include file="inc/page_footer.jsp" %>
 
-</f:view>
 
 </body>
 

Modified: myfaces/examples/trunk/standard/inputTextHelp.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/standard/inputTextHelp.jsp?rev=209957&r1=209956&r2=209957&view=diff
==============================================================================
--- myfaces/examples/trunk/standard/inputTextHelp.jsp (original)
+++ myfaces/examples/trunk/standard/inputTextHelp.jsp Sat Jul  9 10:10:56 2005
@@ -53,10 +53,10 @@
 						<h1>Input Text Help</h1>
 					</f:verbatim>
                     <x:div/>
-                    <h:outputText value="Reset Helptext:"/>
+                    <h:outputText value="Delete helper text:"/>
                     <x:inputTextHelp value="" id="i1" helpText="Hello World"/>
                     <x:div/>
-                    <h:outputText value="Select Text:"/>
+                    <h:outputText value="Select helper text:"/>
                     <x:inputTextHelp value="" id="i2" selectText="true" helpText="TT.MM.JJJJ"/>
 				</h:form>
             </h:panelGroup>

Modified: myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java?rev=209957&r1=209956&r2=209957&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
(original)
+++ myfaces/tomahawk/trunk/src/java/org/apache/myfaces/custom/calendar/HtmlCalendarRenderer.java
Sat Jul  9 10:10:56 2005
@@ -633,7 +633,7 @@
         if(converter==null)
             converter = new CalendarDateTimeConverter();
 
-        if (!(submittedValue == null || submittedValue instanceof String))
+        if (submittedValue != null && !(submittedValue instanceof String))
         {
             throw new IllegalArgumentException("Submitted value of type String expected");
         }



Mime
View raw message