[ htmlunit-Bugs-1570484 ] Faked selections are ignored, if select is empty

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ htmlunit-Bugs-1570484 ] Faked selections are ignored, if select is empty

SourceForge.net
Bugs item #1570484, was opened at 2006-10-04 09:08
Message generated for change (Comment added) made by mguillem
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1570484&group_id=47038

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: 1.8
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Volker Stampa (mwnbr)
>Assigned to: Marc Guillemot (mguillem)
Summary: Faked selections are ignored, if select is empty

Initial Comment:
The method HtmlSelect.fakeSelectedAttribute allows selecting options that do not even exist in a select-element. However, if the select-element contains no "real" options at all, those faked selection are ignored by an HtmlForm.submit. I believe that the corresponding if-branch from HtmlForm.isValidForSubmission has to be extended to check for faked-selections as well:

        if ( tagName.equals("select") ) {
            //an empty select list has no value, and is therefore not submittable
            if (((HtmlSelect) element).getOptionSize() < 1) {

add something like "&& element.getFakeSelectedSize() < 1"

                return false;
            }
        }


----------------------------------------------------------------------

>Comment By: Marc Guillemot (mguillem)
Date: 2006-10-27 08:34

Message:
Logged In: YES
user_id=402164

Now fixed in SVN. Thanks.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=448266&aid=1570484&group_id=47038

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop