The preaction is usually pretty simple, if your bean's properties and actionform's properties are in the same format, which going by your example it does. You can use PropertyUtils to prepopulate the ActionForm

i.e.

// in your preaction method
PropertyUtils.copyProperties( form , beanFromSessionScope );

Regards,

Gareth

[EMAIL PROTECTED] wrote:

I understand what you mean, but my example has been very simple
and only a little part of my page. I have much more text fields
on my page, and everything I need is stored in a Bean in session
scope. So using a PreAction to copy my whole Bean to an ActionForm
with a lot of properties would be a lot of work and code.
DynaValidatorFroms and Beans are there to avoid this extra Action,
and all this extra properties, or is it wrong?
As you can see, I still have to learn a lot...

Regards,

Peter





By overriding the value in each text field you will never get the user

enter value after validation
fails.

You should (at least how i understand), populate the action form with

values in a "PreAction"

i.e.

PreAction -> display to user -> PostAction

The preaction takes in the action form and populates its default values.

Then you can using the
struts "html" tag as they are intended

Regards,

Gareth




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



--
Gareth Evans

MSoft eSolutions Limited
Technology Centre
Inward Way
Rossmore Business Park
Ellesmere Port
Cheshire
CH65 3EN

--
Tel:    +44 (0)870 0100 704
Fax:    +44 (0)870 9010 705
E-Mail: [EMAIL PROTECTED]
Web:    www.msoft.co.uk

----------------------------------------------
Terms:
Please note that any prices quoted within this e-mail are subject to VAT.
All program details and code described in this e-mail are subject to
copyright © of MSoft eSolutions Limited and remain the intellectual
property of MSoft eSolutions Limited.
Any proposal or pricing information contained within this e-mail are
subject to MSoft eSolutions' Terms and Conditions
----------------------------------------------
Disclaimer:
This message is intended only for use of the addressee. If this message
was sent to you in error, please notify the sender and delete this
message. MSoft eSolutions Limited cannot accept responsibility for viruses,
so please scan attachments. Views expressed in this message do not
necessarily reflect those of MSoft eSolutions Limited who will not
necessarily be bound by its contents.



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

Reply via email to