You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ecs-dev@jakarta.apache.org by rd...@apache.org on 2001/04/07 15:16:22 UTC

cvs commit: jakarta-ecs/src/java/org/apache/ecs/html Select.java

rdonkin     01/04/07 06:16:22

  Modified:    src/java/org/apache/ecs/html Select.java
  Log:
  added appendOption methods
  
  Revision  Changes    Path
  1.5       +123 -8    jakarta-ecs/src/java/org/apache/ecs/html/Select.java
  
  Index: Select.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ecs/src/java/org/apache/ecs/html/Select.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Select.java	2000/11/18 04:43:48	1.4
  +++ Select.java	2001/04/07 13:16:22	1.5
  @@ -55,9 +55,13 @@
   import org.apache.ecs.*;
   
   /**
  +    <p>
       This class creates a &lt;SELECT&gt; tag.
  -
  -    @version $Id: Select.java,v 1.4 2000/11/18 04:43:48 jonbolt Exp $
  +    </p><p>
  +    <strong>Please note</strong> that the {@link Option} element now defaults
  +    to add a closing tag (as is now required by the specification).
  +    </p>
  +    @version $Id: Select.java,v 1.5 2001/04/07 13:16:22 rdonkin Exp $
       @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
       @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
   */
  @@ -71,14 +75,17 @@
           setElementType("select");
       }
       /**
  -        Basic constructor. Use the set* methods.
  +        Basic constructor. 
  +        Use the set* methods to set attributes.
       */
       public Select()
       {
       }
   
       /**
  -        Basic Constructor.  
  +        Constructor sets the name attribute.
  +        Use the set* methods to set the other attributes.
  +        
           @param name  set the NAME="" attribute
       */
       public Select(String name)
  @@ -87,7 +94,9 @@
       }
   
       /**
  -        Basic Constructor.  
  +        Constructor sets the name and size attribute.
  +        Use the set* methods to set the other attributes.
  +         
           @param name  set the NAME="" attribute
           @param name  set the SIZE="" attribute
       */
  @@ -98,7 +107,9 @@
       }
   
       /**
  -        Basic Constructor.  
  +        Constructor sets the name and size attribute.
  +        Use the set* methods to set the other attributes.
  +         
           @param name  set the NAME="" attribute
           @param name  set the SIZE="" attribute
       */
  @@ -109,7 +120,9 @@
       }
   
       /**
  -        Basic Constructor.
  +        Constructor sets the name attribute and adds all the elements in the array.
  +        Use the set* methods to set the other attributes.
  +        
           @param name set the NAME="" attribute
           @param element provide a group of strings to be converted to options elements.
       */
  @@ -120,7 +133,9 @@
       }
   
       /**
  -        Basic Constructor.
  +        Constructor sets the name attribute and adds all the option elements in the array.
  +        Use the set* methods to set the other attributes.
  +        
           @param name set the NAME="" attribute
           @param element provide a group of strings to be converted to options elements.
       */
  @@ -194,6 +209,106 @@
           Option[] option = new Option().addElement(element);
           addElement(option);
           return(this);
  +    }
  +
  +    /**
  +        <p>
  +        Creates and appends an option element.
  +        </p><p>
  +        Same as addElement(new org.apache.ecs.html.Option(value)).
  +        </p>
  +        @param     value creates an option with value attribute set.
  +    */    
  +    public Select appendOption(String value)
  +    {
  +        return addElement(new org.apache.ecs.html.Option(value));
  +    }
  +
  +    /**
  +        <p>
  +        Creates and appends an option element.
  +        </p><p>
  +        Same as addElement(new org.apache.ecs.html.Option(label,value)).
  +        </p>
  +        @param     label creates an option with label attribute set.
  +        @param     value creates an option with value attribute set.
  +    */    
  +    public Select appendOption(String label,String value)
  +    {
  +        return addElement(new org.apache.ecs.html.Option(label,value));
  +    }
  +
  +    /**
  +        <p>
  +        Creates and appends an option element.
  +        </p><p>
  +        Same as addElement(new org.apache.ecs.html.Option(label,value)).
  +        </p>
  +        @param     label creates an option with label attribute set.
  +        @param     value creates an option with value attribute set.
  +    */    
  +    public Select appendOption(String label,int value)
  +    {
  +        return addElement(new org.apache.ecs.html.Option(label,value));
  +    }
  +    
  +    /**
  +        <p>
  +        Creates and appends an option element.
  +        </p><p>
  +        Same as addElement(new org.apache.ecs.html.Option(label,value)).
  +        </p>
  +        @param     label creates an option with label attribute set.
  +        @param     value creates an option with value attribute set.
  +    */    
  +    public Select appendOption(String label,double value)
  +    {
  +        return addElement(new org.apache.ecs.html.Option(label,value));
  +    }
  +    
  +    /**
  +        <p>
  +        Creates and appends an option element.
  +        </p><p>
  +        Same as addElement(new org.apache.ecs.html.Option(label,value,text)).
  +        </p>
  +        @param     label creates an option with label attribute set.
  +        @param     value creates an option with value attribute set.
  +        @param     text added to the option as a text element.
  +    */    
  +    public Select appendOption(String label,String value,String text)
  +    {
  +        return addElement(new org.apache.ecs.html.Option(label,value,text));
  +    }
  +
  +    /**
  +        <p>
  +        Creates and appends an option element.
  +        </p><p>
  +        Same as addElement(new org.apache.ecs.html.Option(label,value,text)).
  +        </p>
  +        @param     label creates an option with label attribute set.
  +        @param     value creates an option with value attribute set.
  +        @param     text added to the option as a text element.
  +    */    
  +    public Select appendOption(String label,int value,String text)
  +    {
  +        return addElement(new org.apache.ecs.html.Option(label,value,text));
  +    }
  +    
  +    /**
  +        <p>
  +        Creates and appends an option element.
  +        </p><p>
  +        Same as addElement(new org.apache.ecs.html.Option(label,value,text)).
  +        </p>
  +        @param     label creates an option with label attribute set.
  +        @param     value creates an option with value attribute set.
  +        @param     text added to the option as a text element.
  +    */    
  +    public Select appendOption(String label,double value,String text)
  +    {
  +        return addElement(new org.apache.ecs.html.Option(label,value,text));
       }
   
       /**
  
  
  

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