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"%> + + + +<%@include file="inc/head.inc" %> + + + + + + + + + +

Input Text Help

+
+ + + + + + +
+ +
+ +<%@include file="inc/page_footer.jsp" %> + + + + \ 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 @@ - + + +
+ + +

+ +
- - - - - - - - - - - - - - - - -
- - -

- -
-
-
- - <%@include file="inc/page_footer.jsp" %> + -
+<%@include file="inc/page_footer.jsp" %> - 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 @@

Input Text Help

- + - + 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"); }