On Tue, 17 Mar 2009, nitinkc wrote:
> How can I set an input value in a component belonging to the Panel to verify
> that the expected behavior takes place when an ajax event is fired? This
> panel is not yet associated with a Form and hence there is no FormTester
> available.

Look at what FormTester.setValue() does and mimic it, for 
example something like this

  MockHttpServletRequest request = wicket.getServletRequest();
  request.setParameter(amountToTransferField.getInputName(), amountToTransfer);
  ((ServletWebRequest) wicket.getWicketRequest()).setAjax(true);
  wicket.executeAjaxEvent(amountToTransferField, "onchange");
 
  
http://svn.laughingpanda.org/svn/kansanpankki/trunk/src/test/java/org/laughingpanda/kansanpankki/accounts/AccountsViewSpec.java

Best wishes,
Timo

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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to