> But then the question is how do I copy my Monitor object into the Form?  I
> succeeded in doing this with BeanUtils but when I enable the validation my
> app gets stuck in an endless loop and the tiles in my page get
> repeated over and over.

Figured it out. Struts was validating the request to the action and was
forwarding to a page that contained the tile referencing the action.
Endless loop.  I got it to work but putting validate="false" in the action
and the making my GetMonitorAction look like this:

if (form instanceof DynaActionForm) {
        DynaActionForm dynaForm = (DynaActionForm) form;
        if (dynaForm.get("id") == null || ((String) dynaForm.get("id")).length() ==
0) {
                Monitor m = ...;
                BeanUtils.copyProperties(dynaForm, m);
        }
}

This makes sure that the ActionForm is only populated if it's empty, which
would only happen the first time the page is displayed.

Michael



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

Reply via email to