cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lingerer huang" <lingererhu...@hotmail.com>
Subject A possible bug in Form block's Action widget
Date Fri, 06 Feb 2009 08:01:20 GMT
Hi,cocooner

I'm using Jeremy's dojo1_1 branch for new dojo implement. I found under IE6
the upload will fail and throw IllegalStateException Exception like :Submit
widget already set to  ....

I compare different browser and check how Jeremy and dojo.io.iframe send
iframe form to server and found IE6 sent COMPLETE PAGE to server. It's not
the fault on the client, the it should be on server.

in Action.java 
if (request.getParameter(fullId) != null ||
 
fullId.equals(request.getParameter(Form.SUBMIT_ID_PARAMETER))) {
           form.setSubmitWidget(this);

        }
the code is fine if the browser send SUBMIT_ID_PARAMETER or action. but
under the situation I described above, browser send both.
I change the code to solve the problem
        if ((request.getParameter(Form.SUBMIT_ID_PARAMETER)==null &&
request.getParameter(fullId) != null) ||
 
fullId.equals(request.getParameter(Form.SUBMIT_ID_PARAMETER))) {
           form.setSubmitWidget(this);

        } 

I'm not sure this is the real solution and the code is quite old ( @version
$Id: Action. java 449149 2006-09-23 03:58:05Z crossley ).So I just send it
to devlist.

Regards

Roy Huang	


Mime
View raw message