> -----Original Message-----
> From: for...@li...
> [mailto:for...@li...] On
> Behalf Of Nicholas Sanderson
> Sent: Saturday, July 06, 2002 9:53 AM
> To: for...@li...
> Subject: RE: [FormProc-developer] Data from session Object
>
>
> Hi Anthony
>
>
> I checked out the extended HttpForm. That's pretty much the
> kind of thing except where you cast the object to String from
> the session I think it might be safer to use
>
> Object o = session.getAttribute(key);
> String s = o.toString();
Actually, I only cast the attribute key to a String. The
HttpSession.setAttribute() method only allows a String for the key, so I
figured it wasn't a problem (please feel free to correct me if I am
wrong). The FormData class keeps the name/value pair as String/Object
so that a validator, converter or storer which is application specific
can do whatever it needs with the value object. The default validators
tend to convert the value to a String using the toString() method.
<snip>
> The HttpForm pooling mechanism should probably be put in an
> extended FormManager maybe PooledFormManager which could be a
> singleton containing the pool of FormObjects wrapped in a
> container Object to handle returning them to the Pool. It
> shouldn't be too difficult. Jakarta have an Object Pooling
> project. I'll have a look at the problem over the next week
> or so and get back to you when I have a working version.
Sounds good.
-Anthony
|