You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by pi...@locus.apache.org on 2000/09/26 19:46:15 UTC

cvs commit: jakarta-tomcat-4.0/jasper/doc/dev ModifsForPropertyEditor.html TODO.html status.html

pierred     00/09/26 10:46:08

  Modified:    jasper/doc/dev TODO.html status.html
  Added:       jasper/doc/dev ModifsForPropertyEditor.html
  Log:
  Developer docs update.
  
  Revision  Changes    Path
  1.4       +4 -1      jakarta-tomcat-4.0/jasper/doc/dev/TODO.html
  
  Index: TODO.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/doc/dev/TODO.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TODO.html	2000/09/19 19:39:26	1.3
  +++ TODO.html	2000/09/26 17:46:01	1.4
  @@ -53,6 +53,9 @@
   From the spec: 
   <quote>
   String constants and request parameter values can be used to assign values to any a type that has a PropertyEditor class. When that is the case, the setAsText(String) method is used.
  +<p>
  +First implementation committed 2000/09/25. 
  +<a href="ModifsForPropertyEditor.html">Summary of Changes</a>.<p>
   
   <h3>New ValidatorClass and JspPage classes for validation against tag libraries</h3>
   This is the infrastructure added in the tag libraries to support the validation 
  @@ -94,7 +97,7 @@
   
   <h3>Added elements to the TLD for delivering icons and descriptions to
   use in authoring tools</h3>
  -Nothing to be done here.
  +Nothing to be done here. (yeah!)
   
   <hr>
   <a name=independentcomp><h2>Jasper as an independent component</h2></a>
  
  
  
  1.4       +10 -1     jakarta-tomcat-4.0/jasper/doc/dev/status.html
  
  Index: status.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/doc/dev/status.html,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- status.html	2000/09/19 19:39:26	1.3
  +++ status.html	2000/09/26 17:46:02	1.4
  @@ -8,7 +8,7 @@
   <h1>Status of Jasper</h1>
   The goal of this document is to keep everyone informed of the major developments
   happening with Jasper.<br>
  -<i>$Id: status.html,v 1.3 2000/09/19 19:39:26 pierred Exp $</i>
  +<i>$Id: status.html,v 1.4 2000/09/26 17:46:02 pierred Exp $</i>
   
   <h2>Current Status</h2>
   Trying to bootstrap the work required to bring Jasper in compliance
  @@ -19,6 +19,15 @@
   
   <h2>History</h2>
   <ul>
  +<li>2000/09/26
  +<br>First commit of changes to support the following JSP1.2 addition
  +to the API:
  +<br>
  +<i>PropertyEditor.setAsText() can now be used to convert from a literal string attribute value.</i>
  +<br>
  +<a href="ModifsForPropertyEditor.html">Summary of Changes</a>.<p>
  +
  +
   <li>2000/09/18
   <br>First commit of changes to support the following JSP1.2 additions
   to the API:
  
  
  
  1.1                  jakarta-tomcat-4.0/jasper/doc/dev/ModifsForPropertyEditor.html
  
  Index: ModifsForPropertyEditor.html
  ===================================================================
  <!doctype html public "-//w3c//dtd html 4.0 transitional//en">
  <html>
  <head>
     <title>Modifications to support PropertyEditor's in JSP</title>
  </head>
  <body>
  
  <h1>PropertyEditor support</h1>
  <hr>
  <h2>Classes Modified</h2>
  <h3>Compiler</h3>
  <ul>
  <li>now uses ParserController which abstracts the selection of the
      proper parser.
  </ul>
  <h3>TagBeginGenerator</h3>
  <ul>
  <li>pass the PropertyEditor class in the call to convertString()
  <li>convertString() method 
  <ul>
  <li>now takes into account the PropertyEditor class
  <li>bug fix: now handles short and Short
  </ul>
  </ul>
  
  <h3>TagCache</h3>
  <ul>
  <li>now caches the PropertyEditor classes associated with
      the properties of a tag
  </ul>
  
  <h3>JspRuntimeLibrary</h3>
  <ul>
  <li>new methods: getValueFromBeanInfoPropertyEditor() and 
                             getValueFromPropertyEditorManager
  <li>introspecthelper()
  <ul>
  <li>get the PropertyEditor class when doing bean introspection
  <li>pass the PropertyEditor class in the call to convert() and createTypedArray()
  </ul>
  <li>convert() and createTypedArray()
  <ul>
  <li>now take into consideration the PropertyEditor class
  </ul>
  </ul>
  
  <hr>
  <h2>Some Details and Issues</h2>
  <pre>
  Subject: [JSP] Conversion of property value
     Date: Mon, 25 Sep 2000 17:08:47 -0700
     From: Pierre Delisle <pi...@sun.com>
       To: jsr-053-experts@eng.sun.com
  
  I'm currently working at implementing the new JSP1.2 feature for the
  support of PropertyEditors in Tomcat-4.0.
  
  The 'conversion' algorithm
  (converts the property value so that it matches the setter
  method of the bean property) has been implemented as
  follows:
  
  -----
  This 'conversion' algorithm applies for
  &lt;jsp:setProperty&gt; as well as for attribute values 
  of custom tags.
  
  1. if 'value' is an 'rtexpr'
         no conversion applied
  
  2. else if a PropertyEditor class is defined for the property
         conversion is performed via the combination of
             'PropertyEditor.setAsText(value)' and 
             'PropertyEditor.getValue()'.
         IllegalArgumentException may be thrown.
  
  3. else if 'setterMethodParamType' is 'String'
         No conversion performed
  
  4. else if 'setterMethodParamType' is a primitive type,
         Conversions specified in table 4-2 of the spec are 
         applied.
  
       [*** please note that 'short/'Short' is missing
        *** from table 4-2.
        *** Also, java.lang.Character.valueOf(String)
        *** does not exist]
         
  5. else 
         At runtime, try to get a PropertyEditor from the 
         PropertyEditorManager.
         5.1 if one exists, perform same conversion as in 2.
         5.2 else throw an Exception
  
  -----
  One pending issue is what should happen if the
  setterMethodParamType is 'Object'.
  
  Should we change rule 3 so that it reads:
  
  3. else if 'setterMethodParamType' is 'String' or 
             'setterMethodParamType' is Object:
         No conversion
  
  Since 'String' is an 'Object', it can be argued (as has been the case 
  on tomcat-dev) that it should be passed 'as is' to the setter method.
  
  Should it?
  
         -- Pierre
  </pre>