Hello, and sorry for the late answer...

Niall Pemberton a écrit :
What you have looks OK to me - except in the Action the reference to
DynaValidatorForm - looks like your referencing the wrong class to me -

You're right, I just mistyped it, but it is a BeanValidatorForm.

the
actual ActionForm flavour should be a BeanValidatorForm - but IMO its better
to just cast it to a DynaBean, then your not fixed on an implementation.

Something like...

public final class DynaLazyAction extends Action {

    public ActionForward execute(...) {

        DynaBean dynaForm = (DynaBean) form;
        // here is the line that makes it all crumble...
        Person[] persons = (Person[]) dynaForm.get("persons");

        request.setAttribute("persons",persons);
        return mapping.findForward("ok");
    }
}

Also when you say "here is the line that makes it all crumble" - what does
that mean? Presumably your getting an Exception thrown - if so, what is it?


The exception is a ClassCastException ... Which is really strange, since the bean is supposed to store exactly the object I'm trying to retrieve ...

Thanks for your answers ! :-)

--
Stéphane Zuckerman

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to