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 sn...@apache.org on 2001/06/13 01:22:31 UTC

cvs commit: jakarta-ecs/example TestBed.java

snagy       01/06/12 16:22:31

  Modified:    example  TestBed.java
  Log:
  Change the select example so that options aren't nested within eachother.
  Copy the select statement into the form test so I could test from.toString()
  to try and duplicate a problem.
  
  Revision  Changes    Path
  1.15      +8 -3      jakarta-ecs/example/TestBed.java
  
  Index: TestBed.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ecs/example/TestBed.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- TestBed.java	2001/03/28 20:46:52	1.14
  +++ TestBed.java	2001/06/12 23:22:31	1.15
  @@ -72,7 +72,7 @@
       Pass the method name if you want that to be tested
       or 'all' to call all test methods in turn.
   
  -    @version $Id: TestBed.java,v 1.14 2001/03/28 20:46:52 rdonkin Exp $
  +    @version $Id: TestBed.java,v 1.15 2001/06/12 23:22:31 snagy Exp $
       @author <a href="mailto:snagy@servletapi.com">Stephan Nagy</a>
       @author <a href="mailto:jon@clearink.com">Jon S. Stevens</a>
   */
  @@ -601,8 +601,8 @@
       {
           Select b = new Select("forminput", "5");
           b.setFilter ( new CharacterFilter().addAttribute ("&", "&amp;" ) );
  -        b.addElement( new Option("myvalue1").addElement("showmy&value1")
  -            .addElement ( new Option ("myvalue2").addElement("showmyvalue2")) );
  +        b.addElement( new Option("myvalue1").addElement("showmy&value1"))
  +            .addElement ( new Option ("myvalue2").addElement("showmyvalue2") );
           System.out.println(b.toString());
       }
   
  @@ -682,6 +682,11 @@
           Document doc = new Document();
           Form form = new Form("http://www.foo.com/foo.cgi", Form.post );
           form.addElement ( new Input(Input.text, "item_name", "myvalue" ) );
  +        Select b = new Select("forminput", "5");
  +        b.setFilter ( new CharacterFilter().addAttribute ("&", "&amp;" ) );
  +        b.addElement( new Option("myvalue1").addElement("showmy&value1"))
  +            .addElement ( new Option ("myvalue2").addElement("showmyvalue2") );
  +	form.addElement(b);
           doc.getBody().addElement(form);
           System.out.println(doc.toString());
       }
  
  
  

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