|
Re: w3c html dom versioning oddities: msg#00028java.enhydra.xmlc
Jake, Jacob Kjome wrote: > > Hi Arno, > > So that's why setDefaultSelected() didn't work. I actually tried that > but, like you, found it to behave oddly. Yes definitely post the > patch. Actually, the best thing to do would be to post it to Apache's > Bugzilla under a new bug entry so it doesn't get lost in the shuffle. > http://issues.apache.org/bugzilla/index.html > > Then just post the link to the bug entry here for our reference. > here is the bug-report http://issues.apache.org/bugzilla/show_bug.cgi?id=20097 And this is the patch http://issues.apache.org/bugzilla/showattachment.cgi?attach_id=6437 What it does is just have setDefaultSelected behave the same as setSelected, because in a server DOM, there are the same.
setDefaultSelected-method is called on an HTMLOptionElement, multiple option in a selectelement can have that attribute set to true. So I don't see a problem, it is analog to setSelected...
ok, bug report + patch: http://issues.apache.org/bugzilla/show_bug.cgi?id=20131
Note, It will never be serialized as 'selected="selected"', since the serializer knows that the 'selected'-attribute is boolean and therefore, if the attribute exists, it will only print the name of the attribute, in this case: 'selected'. The relevant code snippet from org.apache.xml.serialize.HTMLSerializer is: } else if ( HTMLdtd.isBoolean( rawName, name ) ) _printer.printText( name ); else { _printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' ); } The above patch just corrects the javadoc in regards of the internal representation of boolean attributes. -Arno
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Re: w3c html dom versioning oddities, Arno Schatz |
|---|---|
| Next by Date: | ' issue revisited, Jacob Kjome |
| Previous by Thread: | Re: w3c html dom versioning oddities, Jacob Kjome |
| Next by Thread: | Re: w3c html dom versioning oddities, Michael Rafael Glavassevich |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |