Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: joist/java/org/joist/util FormCache.java

Project highlights: Architectural Overview

joist
Discussion topic

Back to topic list

CVS update: joist/java/org/joist/util FormCache.java

Author dlr
Full name Daniel Rall
Date 2001-04-16 17:14:03 PDT
Message User: dlr
  Date: 01/04/16 17:14:03

  Modified: java/org/joist/util FormCache.java
  Log:
  Updated for Turbine delta as of April 5, 2001.
  
  Revision Changes Path
  1.4 +11 -5 joist/java/org/joist​/util/FormCache.java​
  
  Index: FormCache.java
  ====================​====================​====================​=======
  RCS file: /cvs/joist/java/org/​joist/util/FormCache​.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FormCache.java 2000/11/19 20:40:41 1.3
  +++ FormCache.java 2001/04/17 00:14:03 1.4
  @@ -9,10 +9,13 @@
   import org.webmacro.util.Bag;
   
   import org.apache.turbine.util.*;
  +import org.apache.turbine.u​til.parser.DefaultPa​rameterParser;
   
   /**
  - * Provide access to form variables
  + * Provide access to form variables.
  + *
     * @author <a href="mailto:jon@col​lab.net">Jon S. Stevens</a>
  + * @author <a href="mailto:dlr@col​lab.net">Daniel Rall</a>
     */
   final public class FormCache implements Bag
   {
  @@ -22,9 +25,13 @@
         * Read the form data from the supplied Request object
         */
       FormCache(final HttpServletRequest r) {
  - pp = new ParameterParser(r);
  + pp = new DefaultParameterParser();
  + pp.setRequest(r);
       }
   
  + /**
  + * Overrides all the values in the existing cach with another's.
  + */
       final public void override(FormCache other) {
           this.pp = other.pp;
       }
  @@ -35,14 +42,13 @@
       final public Object get(String field) {
          try {
              return (Object) pp.getObject(field);
  - //return _request.getParamete​rValues(field)[0];
          } catch (NullPointerException ne) {
             return null;
          }
       }
   
       /**
  - *
  + * Adds the specified mapping to this cache.
         */
       final public void put(String key, Object value)
       {
  @@ -50,7 +56,7 @@
       }
   
       /**
  - *
  + * Removes the specified field from the cache.
         */
       final public void remove(String key)
       {

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: joist/java/org/joist/util FormCache.java dlr Daniel Rall 2001-04-16 17:14:03 PDT
Messages per page: