jakarta-ecs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Nagy <sn...@connectria.com>
Subject Re: [PATCH] Option element needs closing tag.
Date Mon, 02 Apr 2001 14:39:38 GMT
Robert Burrell Donkin wrote:

> Ryan Gies wrote:
>
> > ## The Problem:
> >
> > HTML generated is:
> >
> > ...<OPTION>Option 1<OPTION>Option 2<OPTION>Option 3</SELECT>
> >
> > ## The Need:
> >
> > HTML generated to be:
> >
> > ...<OPTION>Option 1</OPTION><OPTION>Option 2</OPTION>...
> >
> > ## Details:
> >
> >    I'm using Turbine's SelectorBox class, which in turn uses the ECS Option
> > class.  The HTML genereated does not contain closing </OPTION> tags.  This
in
> > turns causes my test scripts to fail (it should be noted that the actual HTML
> > page looks just fine.)  I have updated Option.java, passing 'true' to
> > 'setNeedClosingTag'.
>
> i applied the patch and ran a before-after diff using TestBed outputs
>
> the only problem (i can see) is that a common way to write select lists is to add
> options to options rather than
> to the actual select element.
> so, with existing code written like this, with this patch you get:
>
> <option>blah blah<option>blah blah</option></option>
>
> - the above isn't correct html but doesn't actually break IE5 or netscape 4.61- so
> i guess i'm +1(ish) to the patch since html4(.01) does seem to require the end-tag.
>
> if we go with this patch, there are a number of changes i'd like to see.
>
> we should add a warning to the comments.
>
> to get correct html (after this patch) you'd need to construct something like this
>
>    .addElement(new option("value").addElement("text")).addElement(new
> Option().addElement("text"))
>
> i'd like to see more constructors added to Option eg. Option (String label, String
> value,String element) so the above would become
>
>     addElement(new option("label","value","text").addElement(new
> option("label2","value2","text2"))
>
> and an addOption method added to Select eg.
>
>     addOption("label","value","text").addOption("label","value","text")
>
> to increase readibility.
>
> comments?

Sounds good to me.

-stephan


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


Mime
View raw message