myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarinsc...@apache.org
Subject cvs commit: incubator-myfaces/webapps/examples/web selectbox.jsp
Date Wed, 19 Jan 2005 13:18:04 GMT
mmarinschek    2005/01/19 05:18:04

  Modified:    src/myfaces/org/apache/myfaces/renderkit/html
                        HtmlResponseWriterImpl.java
               src/share/org/apache/myfaces/renderkit/html
                        HtmlRadioRendererBase.java
               src/share/org/apache/myfaces/util ClassUtils.java
               webapps/examples/src/org/apache/myfaces/examples/common
                        CarConfigurator.java
               webapps/examples/web selectbox.jsp
  Log:
  better logging of component information
  
  Revision  Changes    Path
  1.33      +13 -3     incubator-myfaces/src/myfaces/org/apache/myfaces/renderkit/html/HtmlResponseWriterImpl.java
  
  Index: HtmlResponseWriterImpl.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/myfaces/org/apache/myfaces/renderkit/html/HtmlResponseWriterImpl.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- HtmlResponseWriterImpl.java	4 Jan 2005 15:41:06 -0000	1.32
  +++ HtmlResponseWriterImpl.java	19 Jan 2005 13:18:04 -0000	1.33
  @@ -20,6 +20,7 @@
   import org.apache.myfaces.renderkit.html.util.DummyFormUtils;
   import org.apache.myfaces.renderkit.html.util.HTMLEncoder;
   import org.apache.myfaces.renderkit.html.util.JavascriptUtils;
  +import org.apache.myfaces.renderkit.RendererUtils;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   
  @@ -36,6 +37,9 @@
    * @author Anton Koinov
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.33  2005/01/19 13:18:04  mmarinschek
  + * better logging of component information
  + *
    * Revision 1.32  2005/01/04 15:41:06  svieujot
    * new x:buffer component.
    *
  @@ -98,9 +102,11 @@
       private String _contentType;
       private String _characterEncoding;
       private String _startElementName;
  +    private UIComponent _startElementUIComponent;
       private boolean _startTagOpen;
   
       private static final Set s_emptyHtmlElements = new HashSet();
  +
       static
       {
           s_emptyHtmlElements.add("area");
  @@ -201,6 +207,7 @@
           _writer.write('<');
           _writer.write(name);
           _startElementName = name;
  +        _startElementUIComponent = uiComponent;
           _startTagOpen = true;
       }
   
  @@ -236,7 +243,9 @@
                   !name.equals(_startElementName))
               {
                   if (log.isWarnEnabled())
  -                    log.warn("HTML nesting warning on closing " + name + ": element " +
_startElementName + " not explicitly closed");
  +                    log.warn("HTML nesting warning on closing " + name + ": element " +
_startElementName +
  +                            (_startElementUIComponent==null?"":(" rendered by component
: "+
  +                            RendererUtils.getPathToComponent(_startElementUIComponent)))+"
not explicitly closed");
               }
           }
   
  @@ -271,6 +280,7 @@
           }
   
           _startElementName = null;
  +        _startElementUIComponent = null;
       }
   
       public void writeAttribute(String name, Object value, String componentPropertyName)
throws IOException
  
  
  
  1.12      +7 -4      incubator-myfaces/src/share/org/apache/myfaces/renderkit/html/HtmlRadioRendererBase.java
  
  Index: HtmlRadioRendererBase.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/share/org/apache/myfaces/renderkit/html/HtmlRadioRendererBase.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- HtmlRadioRendererBase.java	18 Jan 2005 22:43:05 -0000	1.11
  +++ HtmlRadioRendererBase.java	19 Jan 2005 13:18:04 -0000	1.12
  @@ -40,6 +40,9 @@
    * @author Thomas Spiegl
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.12  2005/01/19 13:18:04  mmarinschek
  + * better logging of component information
  + *
    * Revision 1.11  2005/01/18 22:43:05  svieujot
    * Fix some bugs where converter wasn't used to determine selected values.
    * This caused for examples the list, checkbox and radio based components to bug when the
backing bean value type is a primitive.
  @@ -229,14 +232,13 @@
               writer.writeAttribute(HTML.DISABLED_ATTR, Boolean.TRUE, null);
           }
   
  +        writer.endElement(HTML.INPUT_ELEM);
  +
           if ((label != null) && (label.length() > 0))
           {
               writer.write(HTML.NBSP_ENTITY);
               writer.writeText(label, null);
           }
  -
  -        //input is one of the empty HTML elements, so we must not close the input tag
  -        //writer.endElement(HTML.INPUT_ELEM);
       }
   
   
  
  
  
  1.11      +10 -2     incubator-myfaces/src/share/org/apache/myfaces/util/ClassUtils.java
  
  Index: ClassUtils.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/src/share/org/apache/myfaces/util/ClassUtils.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ClassUtils.java	13 Oct 2004 11:51:01 -0000	1.10
  +++ ClassUtils.java	19 Jan 2005 13:18:04 -0000	1.11
  @@ -33,6 +33,9 @@
    * @author Anton Koinov
    * @version $Revision$ $Date$
    * $Log$
  + * Revision 1.11  2005/01/19 13:18:04  mmarinschek
  + * better logging of component information
  + *
    * Revision 1.10  2004/10/13 11:51:01  matze
    * renamed packages to org.apache
    *
  @@ -282,6 +285,11 @@
           try
           {
               return clazz.newInstance();
  +        }
  +        catch(NoClassDefFoundError e)
  +        {
  +            log.error("Class : "+clazz.getName()+" not found.",e);
  +            throw new FacesException(e);
           }
           catch (InstantiationException e)
           {
  
  
  
  1.2       +4 -4      incubator-myfaces/webapps/examples/src/org/apache/myfaces/examples/common/CarConfigurator.java
  
  Index: CarConfigurator.java
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/webapps/examples/src/org/apache/myfaces/examples/common/CarConfigurator.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- CarConfigurator.java	20 Oct 2004 07:46:39 -0000	1.1
  +++ CarConfigurator.java	19 Jan 2005 13:18:04 -0000	1.2
  @@ -44,8 +44,8 @@
       static
       {
           _cars = new ArrayList();
  -        _colors = new ArrayList();;
  -        _extrasList = new ArrayList();;
  +        _colors = new ArrayList();
  +        _extrasList = new ArrayList();
   
           _cars.add(new SelectItem("c1", "Audee X6", null));
           _cars.add(new SelectItem("c2", "PMW 321u", null));
  
  
  
  1.43      +2 -2      incubator-myfaces/webapps/examples/web/selectbox.jsp
  
  Index: selectbox.jsp
  ===================================================================
  RCS file: /home/cvs/incubator-myfaces/webapps/examples/web/selectbox.jsp,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- selectbox.jsp	1 Nov 2004 23:04:26 -0000	1.42
  +++ selectbox.jsp	19 Jan 2005 13:18:04 -0000	1.43
  @@ -69,12 +69,12 @@
   
                           <h:outputLabel for="selone_lb" value="#{example_messages['label_cars']}"
/>
                           <h:selectOneListbox id="selone_lb" size="3" value="#{carconf.car}"
  -                                            validator="#{carconf.validateCar}" styleClass="selectOneListbox">
  +                                            validator="#{carconf.validateCar}" styleClass="selectOneListbox"
required="true" >
                               <f:selectItems id="selone_lb_cars" value="#{carconf.cars}"
/>
                           </h:selectOneListbox>
   
                           <h:outputLabel for="selone_menu_colors" value="#{example_messages['label_colors']}"
/>
  -                        <h:selectOneMenu id="selone_menu_colors" value="#{carconf.color}"
styleClass="selectOneMenu">
  +                        <h:selectOneMenu id="selone_menu_colors" value="#{carconf.color}"
styleClass="selectOneMenu" required="true" >
                               <f:selectItem itemValue="" itemLabel="#{example_messages['empty_selitem']}"
/>
                               <f:selectItems value="#{carconf.colors}" />
                           </h:selectOneMenu>
  
  
  

Mime
View raw message