On Mon, 03 Nov 2008, Nino Saturnino Martinez Vazquez Wael wrote:
> Argh really bad example, heres a better one:
> 
> tester.getComponent("basepath").getIframe().addvisitor or something?
> 
> And then visitor would have to sort out if the component probed were a 
> form etc?

Something like 

Form form = (Form) tester.getLastRenderedPage().visitChildren(Form.class, new 
Component.IVisitor<Component>() {
    public Object component(Component component) {
        return component;
    });
FormTester = tester.newFormTester(form);

In jdave-wicket you have this bundled in and can do just

Form form = selectFirst(Form.class).from(context);

If there are more than one Form visible on the page, you have
to differentiate a bit more in the visitor and it gets more 
messy.

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