On Tue, 26 Jun 2007, Timo Rantalaiho wrote:
> In fact we just discovered a workaround to a DropDownChoice
> ajax issue with WicketTester in our app yesterday; I was
> going to file an issue or talk about it here, but didn't
> have time yet. It was something similar to the one just
> discussed here, so I'll try later today whether your fix
> also fixes that and report.

Yes, it's also fixed now!

Before we had to do

  wicket.setParameterForNextRequest(dropDownChoice.getPageRelativePath(), new 
Integer(index));

to get wicket.executeAjaxEvent(dropDownChoice, "onchange");
to use the model value of choice "index" within the choices.  

Now we can do the more normal (albeit in this case more
verbose)

  
wicket.newFormTester(getForm().getPageRelativePath()).select("dropDownChoice", 
index);

Before, wicket.executeAjaxEvent() and FormTester seemed to
use separate requests (and thus the values set by FormTester
never ended up in the ajax request), but it seems that your
fix makes FormTester to work better with ajax. 

Rock!
- Timo

-- 
Timo Rantalaiho           
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to