cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/acting AbstractDatabaseAction.java
Date Thu, 08 Mar 2001 18:51:19 GMT
bloritsch    01/03/08 10:51:15

  Modified:    src/org/apache/cocoon/acting Tag: xml-cocoon2
                        AbstractDatabaseAction.java
  Log:
  Made the AbstractDatabaseAction a little more flexible with everything.
  It will set request attributes, so that you can have a form action be self
  pointing to veryfy results.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.16  +13 -7     xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractDatabaseAction.java
  
  Index: AbstractDatabaseAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/acting/Attic/AbstractDatabaseAction.java,v
  retrieving revision 1.1.2.15
  retrieving revision 1.1.2.16
  diff -u -r1.1.2.15 -r1.1.2.16
  --- AbstractDatabaseAction.java	2001/03/07 22:18:32	1.1.2.15
  +++ AbstractDatabaseAction.java	2001/03/08 18:51:05	1.1.2.16
  @@ -148,27 +148,30 @@
    *     <td>image-width</td>
    *     <td>
    *       the width attribute of the cached file attribute.  NOTE:
  - *       param attribute must equal the same param for image.
  + *       param attribute must equal the param for image with a
  + *       "-width" suffix.
    *     </td>
    *   </tr>
    *   <tr>
    *     <td>image-height</td>
    *     <td>
    *     the width attribute of the cached file attribute  NOTE:
  - *       param attribute must equal the same param for image.
  + *       param attribute must equal the param for image with a
  + *       "-height" suffix.
    *     </td>
    *   </tr>
    *   <tr>
    *     <td>image-size</td>
    *     <td>
    *       the size attribute of the cached file attribute  NOTE:
  - *       param attribute must equal the same param for image.
  + *       param attribute must equal the param for image with a
  + *       "-size" suffix.
    *     </td>
    *   </tr>
    * </table>
    *
    * @author <a href="mailto:bloritsch@apache.org">Berin Loritsch</a>
  - * @version CVS $Revision: 1.1.2.15 $ $Date: 2001/03/07 22:18:32 $
  + * @version CVS $Revision: 1.1.2.16 $ $Date: 2001/03/08 18:51:05 $
    */
   public abstract class AbstractDatabaseAction extends AbstractComplimentaryConfigurableAction
implements Configurable {
       protected Map files = new HashMap();
  @@ -332,7 +335,8 @@
                   break;
               case Types.ARRAY:
                   // Grab the image-width attribute from the cached attributes
  -                imageFile = (File) request.get(attribute);
  +                String imageAttr = attribute.substring(0, (attribute.length() - "-width".length()));
  +                imageFile = (File) request.get(imageAttr);
                   synchronized (this.files) {
                       param = (Parameters) this.files.get(imageFile);
                       statement.setInt(position, param.getParameterAsInteger("image-width",
-1));
  @@ -340,7 +344,8 @@
                   break;
               case Types.BIT:
                   // Grab the image-height attribute from the cached attributes
  -                imageFile = (File) request.get(attribute);
  +                imageAttr = attribute.substring(0, (attribute.length() - "-height".length()));
  +                imageFile = (File) request.get(imageAttr);
                   synchronized (this.files) {
                       param = (Parameters) this.files.get(imageFile);
                       statement.setInt(position, param.getParameterAsInteger("image-height",
-1));
  @@ -348,7 +353,8 @@
                   break;
               case Types.CHAR:
                   // Grab the image-size attribute from the cached attributes
  -                imageFile = (File) request.get(attribute);
  +                imageAttr = attribute.substring(0, (attribute.length() - "-size".length()));
  +                imageFile = (File) request.get(imageAttr);
                   synchronized (this.files) {
                       param = (Parameters) this.files.get(imageFile);
                       statement.setInt(position, param.getParameterAsInteger("image-size",
-1));
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message