struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Zhou" <>
Subject Re: RE[Enlightenment]: DynaAF in session scope & checkboxes
Date Sat, 26 Jul 2003 05:52:36 GMT
----- Original Message ----- 
From: "Mike Whittaker" <>
To: "Struts Users Mailing List" <>; "Jing
Zhou" <>
Sent: Friday, July 25, 2003 3:42 PM
Subject: RE: RE[Enlightenment]: DynaAF in session scope & checkboxes

> You are right, I don't.  In fact the CondResetFormPropertyConfig class is
> just acting as a flag.
> Talk about overkill eh!?

No. I was just interested in the reason. Because your ideas about resetting
in the action class interest me. I was thinking doing reset after the
sometime ago. But it did not produce any meaningful results.

There are two fundamental problems if we decide to reset some
properties in the reset method:

1) The property names must match the ones in the web forms. If a page
    author moves the checkboxes, multiboxes, or select menus to another
    page, the reset method must be re-written for the two pages. This
    indicates that the reset method is overly tied to the views.

2) Assume the JavaScript is enabled at browsers (for rich client apps,
    this is required). The checkboxes, multiboxes, and select menus on
    a page could be enabled or disabled by the JavaScript. If we just check
    null parameter name to reset a property, it is not enough. Because
    disabled checkboxes will give you a null parameter name, but you
    should not reset it if it is checked and disabled.

Many developers may not be concerned about the second problem,
but it is a *hole*. The only way that could solve the two problems
is to let browsers send me explicitly what properties to be reset. That's
what we do currently.

It could be an overkill for small apps. But it solves the problems in
a clean way.

> I put in the getReset() method just for the sake of it really, first time
> I'd used custom <set-property> Maybe the class will grow with extra
> functionality?
> Can you suggest a less overkill flag?
> --
> Mike W.

Netspread Carrier

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message