Thanks for the contribution. I've committed it to SVN TRUNK and it'll be included in the next beta
Juergen On 4/15/06, Ingram Chen <[EMAIL PROTECTED]> wrote: > Here you are. The attachment contains a patch to FormTester.java and related > TestCase. > > Beside select() method, my patch of FormTester also contains some minor > things: > > (1) change scope constructor of FormTester from default to protected for > better extensibility. > > (2) fix bugs about fillBlankString in constructor and add a method > submit(buttonPath) for the issue discuss on > http://sourceforge.net/mailarchive/forum.php?thread_id=10171730&forum_id=42411 > > Hope these can be incorporated into next release too. > > > On 4/14/06, Juergen Donnerstag <[EMAIL PROTECTED] > wrote: > > > sure, everything that makes life easier and doesn't break existing > code is welcome. Send it to me. > > Juergen > > On 4/14/06, Ingram Chen <[EMAIL PROTECTED]> wrote: > > Currently FormTester only does raw String on request parameters. > > As http://www.wicket-wiki.org.uk/wiki/index.php/Testing > > states, selecting > > value from Component such as RadioGroup, DropDownChoice... etc is pain: > > > > form.setValue("offSiteAccessEnabled", > "0:form:offSiteAccessEnabled:Yes"); > > In my team we define a new method like: > > > > select(String path, final int index) > > > > This simplified selection to just an index. The method supports built-in > > component: > > AbstractChoice, RadioGroup, and CheckGroup but the implementation rely on > > reflection heavily. > > > > Further, it may require addtional methods such as: > > > > selectMulti(String path, final int[] indexes) //for ListMultiChoice > > and CheckGroup > > > > Though I'm not sure that just invoking select() multiple times is better. > > > > I could donate the code if anyone interests this improvement. > > > > -- > > Ingram Chen > > Java [EMAIL PROTECTED] > > Institue of BioMedical Sciences Academia Sinica Taiwan > > blog: http://www.javaworld.com.tw/roller/page/ingramchen > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642 > _______________________________________________ > Wicket-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > -- > > Ingram Chen > Java [EMAIL PROTECTED] > Institue of BioMedical Sciences Academia Sinica Taiwan > blog: http://www.javaworld.com.tw/roller/page/ingramchen > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642 _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
