> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> When the user logons to the system, it takes him to a form. 
> Based on the logon values, if the user already has filled the form, 
> form should be populated with values the user can then modify existing

> values save, if not the user can fill in the fresh form and save it.
> For this i need to get this user logon info in my ActionForm so that 
> i can write the getters and setters in the ActionForm accordingly

Have you closely examined the struts-example webapp?  It does exactly
what you're talking about.  Search the archives for 'pre-populate form'
and variations, it's a common topic.

Once your user is logged in, I'm guessing you are putting something in
session scope.  In your Action, you can call
session.getAttribute("userName") and use that to retrieve the values
from wherever they are stored.  Then pre-populate the ActionForm and
forward to the 'edit' page.

I would not put user info in a hidden field on the form.  It would make
it easier for someone to impersonate another user.  (Depends on how
sensitive your data is whether that's an issue.)

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

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

Reply via email to