struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgra...@apache.org
Subject cvs commit: jakarta-struts/src/share/org/apache/struts/taglib/html TextareaTag.java
Date Sun, 23 Mar 2003 06:10:30 GMT
dgraham     2003/03/22 22:10:30

  Modified:    src/share/org/apache/struts/taglib/html TextareaTag.java
  Log:
  Updated copyright year, added braces to if statements.
  
  Revision  Changes    Path
  1.13      +16 -9     jakarta-struts/src/share/org/apache/struts/taglib/html/TextareaTag.java
  
  Index: TextareaTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/TextareaTag.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- TextareaTag.java	16 Dec 2002 03:41:43 -0000	1.12
  +++ TextareaTag.java	23 Mar 2003 06:10:30 -0000	1.13
  @@ -7,7 +7,7 @@
    *
    * The Apache Software License, Version 1.1
    *
  - * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
  + * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
    * reserved.
    *
    * Redistribution and use in source and binary forms, with or without
  @@ -112,8 +112,9 @@
           StringBuffer results = new StringBuffer("<textarea");
           results.append(" name=\"");
           // @since Struts 1.1
  -        if( indexed )
  -                prepareIndex( results, name );
  +        if (indexed) {
  +            prepareIndex( results, name );
  +        }
           results.append(property);
           results.append("\"");
           if (accesskey != null) {
  @@ -143,22 +144,28 @@
               results.append(ResponseUtils.filter(value));
           } else {
               Object bean = RequestUtils.lookup(pageContext, name, null);
  -            if (bean == null)
  +            if (bean == null) {
                   throw new JspException
                       (messages.getMessage("getter.bean", name));
  +            }
  +            
               try {
                   String value = BeanUtils.getProperty(bean, property);
  -                if (value == null)
  +                if (value == null) {
                       value = "";
  +                }
                   results.append(ResponseUtils.filter(value));
  +                
               } catch (IllegalAccessException e) {
                   throw new JspException
                       (messages.getMessage("getter.access", property, name));
  +                    
               } catch (InvocationTargetException e) {
                   Throwable t = e.getTargetException();
                   throw new JspException
                       (messages.getMessage("getter.result",
                                            property, t.toString()));
  +                                         
               } catch (NoSuchMethodException e) {
                   throw new JspException
                       (messages.getMessage("getter.method", property, name));
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org


Mime
View raw message