On Thu, 23 Jan 2003, Andreas Langmann wrote:
Date: Thu, 23 Jan 2003 12:46:33 +0100
From: Andreas Langmann [EMAIL PROTECTED]
Reply-To: Struts Users Mailing List [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Problem with unused Formbean-Properties
Hello,
i have a formBean which has a property id. this id is not shown to the user
and it has no associated input field. If the user posts the FormData the id
contains the prior value - as expected. But since we implemented the
reset() method in every formBean, struts calls this method and deletes my
id.
What i need is that struts uses the formBean for displaying the Page and
posting the data without calling reset... i thought this could be handled
with the param scope (session/request) but struts calls reset anyway...
I need to store this id field from the get-request and access it in the post
request but i dont want to store it as attribute...
any ideas?
Omitting the reset() is not a good idea -- the least of your problems is
that checkboxes won't work any more.
Even though you don't want the id field displayed, you can make it part of
the incoming form by using a hidden field (with html:hidden). That way,
it gets populated with the correct value just like everything else.
thanks
Andreas Langmann
Craig
--
To unsubscribe, e-mail: mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]