Hi,

my solution is to request a hidden field containing the names of the form-fields
on a wizard page from the page-designer. Then I have a base form that has
an automatic reset-method using this hidden field.

hope this helps
Alexander

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, November 26, 2001 10:11 AM
To: [EMAIL PROTECTED]
Subject: Q: How to get all the Form properties contained in a JSP ??


Hi all,

I would like to get dynamically all the ActionForm properties present in a
JSP file. Do you have a idea of this ???

Why do I need so ??
In fact, I am builduing a struts application with a wizard style part (5 jsp
pages for one business functionnality).
As It is explained in the Struts Tutorial, I built One ActionForm
containning all the field to be displayed
and as Ted Husted explained in his tutorial I built one Action class dealing
with all the possible actions
through my wizard, and use several mapping in my Struts-confing.xml file to
be redirected to the correct JSPs.

My problem is that I have several multiboxes and "multiple select" fields in
my wizard, so i use the reset(mapping,request) method in my Form to get my
form resetted before receiving the newly chosen fields ( this is the way to
be able to catch the global de-selection of a field by a user).
Thanks to the mapping and as Ted Husted explained, I am able to reset the
only fields present in the jsp,
because I know them, as I use the pages.

BUT if the page designers rearrange the fields among the various pages
I will have to modify my reset(mapping,request) method to take into account
the newly put fields in the JSP.
And This is not possible.....

As a solution to this, I would like to dynamically get the list of the
fields (or properties) present
in my JSP page concerning my ActionForm, in order to build a generic reset
method, whatever fields are present
in pages.


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

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

Reply via email to