Hi,

I am lost in the basics.

Problem: When PAGE 1 DATA is submitted then (back end will retrieve the info from database) and PAGE 2 should be displayed with DATA. But the population is not happening, I am lost in basics. Please clarify.

Here is the information on my form-beans and action-mappings.

Form-beans:
==========
<form-bean name="searchForm" type="org.apache.struts.validator.DynaValidatorForm">
        <form-property name="searchType" type="java.lang.String" />
        <form-property name="insId" type="java.math.BigDecimal" />
        <form-property name="age" type="java.lang.Integer" />
</form-bean>
<form-bean name="resultsForm" type="org.apache.struts.validator.DynaValidatorForm">
        <form-property name="lastName" type="java.lang.String" />
        <form-property name="firstName" type="java.lang.String" />
        <form-property name="address" type="java.lang.String" />
        <form-property name="zip" type="java.lang.String" />
 .............
</form-bean>
<form-bean name="editAndConfirmForm" type="org.apache.struts.validator.DynaValidatorForm">
.............
</form-bean>

action mappings:
============
<action path="/search" type="InsAction" name="searchForm" scope="request" validate="false"> <forward name="success" path="tile definition for page 1 display or jsp for display" />
</action>
<action path="/results" type="InsAction" name="resultsForm" input="definition for page 1 display" scope="request" validate="false"> <forward name="success" path="tile definition for page 2 display or jsp for display" />
</action>
<action path="/confirm" type="InsAction" name="editAndConfirmForm" input="definition for page 2 display" scope="request" validate="false"> <forward name="success" path="tile definition for page 3 display or jsp for display" />
</action>

Control Flow:
=========
1. When Search link is clicked, search page (/search mapping is called) is displayed with the search EMPTY fields. 2. When search form is submitted (searchType, insId and age fields), then results page should be displayed with populated information. This is not happening. When search form is submitted the data is being populated and when I checked in the action classes in debug mode, I have seen the data IS POPULATED in the searchForm. On PAGE 2 jsp's I have <html: text > fields with no name of the form, so it takes the default from the html:form which is I have defined it as <html:form action="/results">. I think, the fields on page 2 are taking resultsForm which is not populated. I am lost here, how multiple pages are generally managed.

When I did the view source on PAGE  2, it showed
<form name="resultsForm" method="post" action="/contextRoot/confirm.do">
<input type="text" name="lastName" value="">
<input type="text" name="firstName" value="">
<input type="text" name="address" value="">
<input type="text" name="zip" value="">
</form>

I am confused. Please help in this basics.

Thanks in advance.

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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

Reply via email to