struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <p...@paulrashidi.com>
Subject Re: Including 4 <form>'s into 1 page with includes?
Date Sat, 27 Sep 2003 07:08:34 GMT
Make sure you do request.setAttribute
("FormName",dynaActionFormObjectInstance); for each of the forms you have
manually populated.  Because, what you don't see struts do in the
background is that everyform you receive in your actions the form is
automatically added to the request object.  Because you are populating
these forms yourself you must add them to the request object manually in
order for your tags to be able to see them.

> OK, I got the forms to display, but I have an issue with the data in
> each page being displayed. There is not data actually populating the
> pages, when I  KNOW there is data in the given Form Object
>
> I have several ActionForms that as a JSP alone, they work fine,
> But then I have this new page that has as DynaActionForm with the
> following attributes:
>
>        <form-bean  name="medicalHistoryViewForm"
>                    dynamic="true"
>                    type="org.apache.struts.action.DynaActionForm">
>            <form-property name="cin" type="java.lang.String" />
>
>            <form-property name="allergiesForm"
> type="com.baselogic.yoursos.user.AllergiesActionForm" />
>            <form-property name="diseaseForm"
> type="com.baselogic.yoursos.user.DiseaseActionForm" />
>            <form-property name="prosthesisForm"
> type="com.baselogic.yoursos.user.ProsthesisActionForm" />
>            <form-property name="surgeryForm"
> type="com.baselogic.yoursos.user.SurgeryActionForm" />
>            <form-property name="treatmentForm"
> type="com.baselogic.yoursos.user.TreatmentActionForm" />
>            <form-property name="vaccinationForm"
> type="com.baselogic.yoursos.user.VaccinationActionForm" />
>        </form-bean>
>
> Then, I have the following includes:
>
> <jsp:include page="/WEB-INF/default/body/allergies.view.jsp" />
> <jsp:include page="/WEB-INF/default/body/disease.view.jsp" />
> <jsp:include page="/WEB-INF/default/body/prosthesis.view.jsp" />
> <jsp:include page="/WEB-INF/default/body/surgery.view.jsp" />
> <jsp:include page="/WEB-INF/default/body/treatment.view.jsp" />
> <jsp:include page="/WEB-INF/default/body/vaccination.view.jsp" />
>
>
> Please help. I appreciate anyone taking a minute to look at this. I am
> really in crunch time as I have a demo for over 2,000 persons in the
> next 1.5 weeks. So I am very stressed!
> Again, heaps of appreciation in advance for you help!
>
> ---
> Thanks
> Mick Knutson
>
> coming soon:
> Your SOS: Your personal emergency contact system.
> http://YourSos.com
>
> +001(805) 563-0666 Office
> +001 (708) 570-2772 Fax
> ---
>
> ----- Original Message -----
> From: <paul@paulrashidi.com>
> To: <struts-user@jakarta.apache.org>
> Sent: Friday, September 26, 2003 5:50 PM
> Subject: Re: Including 4 <form>'s into 1 page with includes?
>
>
>> I have used the jsp:include directive to include jsp pages that have
>> other struts forms in them.  Works great as long as you make sure all
>> the forms get added to the request object.
>>
>> > I have 4 different read-only forms that are each in their own jsp
>> > page. I want to create a master jsp page that has all 4 forms on it.
>> > I can have the main action collect all 4 DTO's for each of the
>> > forms, and then add it to a DyaActionForm, but I don't know if this
>> > is even going to work.
>> >
>> > I just don't want to copy-n-paste JSP code into this master view, as
>> > I also will have the need to show the same FORM by itself.
>> >
>> > Has anyone done anything like this and able to help me figure out
>> > what to do?
>> >
>> >
>> > ---
>> > Thanks
>> > Mick Knutson
>> > http://www.baselogic.com
>> >
>> > +001(805) 563-0666 Office
>> > +001 (708) 570-2772 Fax
>> > ---
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
>> additional commands, e-mail: struts-user-help@jakarta.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org For
> additional commands, e-mail: struts-user-help@jakarta.apache.org




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


Mime
View raw message