On 2005-09-21, Michael Graham <[EMAIL PROTECTED]> wrote:
>
> I'm working on a module called CGI::Application::Plugin::FormState.
>
> The idea is that you use a temporary key in the user's session to store
> form data instead of using hidden fields or using the user's session
> directly.
It sounds interesting.
My first thought was CGI::Sessions save_param() and load_param().
However, I think you addressed that well enough here:
> Why not just use the user's session?
> With "CGI::Application::Plugin::FormState" the data is associated with a
> particular instance of a form, not with the user. If the user gives up
> halfway through your multi-page form, you don't want their session to be
> cluttered up with the incomplete form state data.
>
> If a user opens up your application in two browser windows (both sharing
> the same user session), each window should have it's own independent
> form state.
>
> For instance, in an email application the user might have one window
> open for the inbox and another open for the outbox. If you store the
> value of "current_mailbox" in the user's session, then one of these
> windows will go to the wrong mailbox.
>
> Finally, the user's session probably sticks around longer than the form
> state should.
Personally, I rarely use multi-page forms have felt in the past that
hidden fields + sessions were enough tools to solve the issues that came
adequetely.
Or put another way: It looks a like a useful tool for a specific
problem, but it's more engineering than I tend to use.
Perhaps one day I'll run into a related problem and want to reach for
something like this, though.
Mark
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]