You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Simon Sadedin <ss...@elogex.com> on 2001/02/27 18:38:32 UTC

form initialization using session

Hi all,

I am working on an application where form fields need to default to
values that depend on the user's profile, which is stored in the
session.  Unfortunately, it seems like struts forms are created
automatically without any hooks that allow access to the session to
initialize these fields.

The only thing that I can think of is to have our application
proactively place the forms into the session with values initialized,
possibly to have the form page link through an action which creates and
initializes the form.  However this abandons the utility of having
struts automatically create the forms for us - one of the many nice
things about struts!

This seems to me like it would be a common problem.  Does anyone have a
good solution for it?

Cheers,

Simon.