You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Rodney Paul <ro...@natdata.net> on 2003/07/11 03:37:39 UTC

Re-Population of form parameters after nn error has occured

Hi All,

Im currently experiencing a problem with the Struts framework, in that form values
are not being re-populated after a validation error has occured within a ActionForm class.
I also get this problem when saving validation errors within a LookupDispatchAction class.

Could someone please give me some indication to why this is happening, and if there is a solution to this problem. Below is my configuration settings I am using with the Struts framework.


---OrganisationNameSearch.jsp---
<html:form  action="/company/OrganisationNameSearch"
            name="company.OrganisationNameSearch"
            type="net.natdata.application.itf.insolvency.company.OrganisationNameSearchActionForm">


---Struts Configuration---
<struts-config>
    <form-beans>
        <form-bean name="company.OrganisationNameSearchActionForm"
                   type="net.natdata.application.itf.insolvency.company.OrganisationNameSearchActionForm" />
    </form-beans>
    <action-mappings>
        <action path="/company/OrganisationNameSearch"
                type="net.natdata.application.itf.insolvency.company.OrganisationNameSearchAction"
                name="company.OrganisationNameSearchActionForm"
                validate="true"
                scope="request"
                input="/company/OrganisationNameSearch.jsp"
                parameter="method">
                <forward name="next"    path="/company/OrganisationBrowse.jsp" redirect="false" />
                <forward name="failure" path="/company/OrganisationNameSearch.jsp" redirect="false" />
        </action>
    </action-mappings>
<struts-config>


NOTE: I have validation code within both the ActionForm and Action classes I am using.

Cheers
Rodney

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


Re: Re-Population of form parameters after nn error has occured

Posted by Sandeep Takhar <sa...@yahoo.com>.
I may be naive, but I don't know why you are using
type here:

<html:form  action="/company/OrganisationNameSearch"
            name="company.OrganisationNameSearch"
            
type="net.natdata.application.itf.insolvency.company.OrganisationNameSearchActionForm">


sandeep
--- Rodney Paul <ro...@natdata.net> wrote:
> Hi All,
> 
> Im currently experiencing a problem with the Struts
> framework, in that form values
> are not being re-populated after a validation error
> has occured within a ActionForm class.
> I also get this problem when saving validation
> errors within a LookupDispatchAction class.
> 
> Could someone please give me some indication to why
> this is happening, and if there is a solution to
> this problem. Below is my configuration settings I
> am using with the Struts framework.
> 
> 
> ---OrganisationNameSearch.jsp---
> <html:form  action="/company/OrganisationNameSearch"
>             name="company.OrganisationNameSearch"
>            
>
type="net.natdata.application.itf.insolvency.company.OrganisationNameSearchActionForm">
> 
> 
> ---Struts Configuration---
> <struts-config>
>     <form-beans>
>         <form-bean
> name="company.OrganisationNameSearchActionForm"
>                   
>
type="net.natdata.application.itf.insolvency.company.OrganisationNameSearchActionForm"
> />
>     </form-beans>
>     <action-mappings>
>         <action
> path="/company/OrganisationNameSearch"
>                
>
type="net.natdata.application.itf.insolvency.company.OrganisationNameSearchAction"
>                
> name="company.OrganisationNameSearchActionForm"
>                 validate="true"
>                 scope="request"
>                
> input="/company/OrganisationNameSearch.jsp"
>                 parameter="method">
>                 <forward name="next"   
> path="/company/OrganisationBrowse.jsp"
> redirect="false" />
>                 <forward name="failure"
> path="/company/OrganisationNameSearch.jsp"
> redirect="false" />
>         </action>
>     </action-mappings>
> <struts-config>
> 
> 
> NOTE: I have validation code within both the
> ActionForm and Action classes I am using.
> 
> Cheers
> Rodney
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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