struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Birch <alex_d_bi...@yahoo.co.uk>
Subject generating dynamic forms from XML at run-time (not initialisation time)
Date Thu, 15 Aug 2002 15:07:45 GMT
Hi,

I'm having difficulty working out how to do the
following using struts:

3 separate pages:

1. question.jsp... asks how many text boxes on the  
next page and what the form name of each text box
should be

2. dynamicForm.jsp... displays a form with the number
of text boxes specified in question.jsp - each named
accordingly

3. results.jsp... concatenates all the text box
entries into a single string and displays it as simple
text.

Is that possible? I can't find a way to do it (without
some heavy rewriting). I've seen examples using
indexed properties but I'd like to emulate the way
DynaActionForms does it from the struts-config.xml.
The problem is that the FormBeanConfigs are frozen
(with freeze()) at init stage of the ActionServlet.

I want to generate a particular form at run-time from
an xml file (similar to the form-beans section of
struts-config.xml 1.1b2) which is also generated at
run time.

I'd like to load the XML file inside an Action, edit
the FormBeanConfig for the correct mapping ActionForm
instance and forward to the dynamic form displaying
page with an appropriate bean.

Can anybody tell me if this is possible (and how) with
struts?

thanks

Alex



__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message