struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gaet" <gaetm...@free.fr>
Subject Re: Design problem
Date Wed, 09 Mar 2005 16:47:31 GMT
Nicolas,

Do you mean this :

<action path="/ShowEmployeeDetail"
    type="org.ajo.EmployeeAction"
    name="EmployeeForm"
    validate="false"
    scope="request">
    <forward name="continue" path="/EmployeeDetail.jsp"/>
</action>
<action path="/EditEmployeeDetail"
    type="org.ajo.EmployeeAction"
    name="EmployeeForm"
    validate="true"
    input="EmployeeDetail.jsp"
    scope="request">
    <forward name="continue" path="/EmployeeDetail.jsp"/>
</action>

So, when I click on an employee name in may list I will call
/ShowEmployeeDetail.do
and I define the edit form of  EmployeeDetail.jsp like this : <form
action="/EditEmployeeDetail" >

Like this I don't need to change my actual Action class...
Is it well-designed like this?

Thanks


----- Original Message -----
From: "Nicolas De Loof" <nicolas.deloof@capgemini.com>
To: "Struts Users Mailing List" <user@struts.apache.org>
Sent: Wednesday, March 09, 2005 5:09 PM
Subject: Re: Design problem


>
> You should define 2 mappings for detail :
>
> a "/showEmployeeDetail" without validation (or a unique rule employeeId
> required)
> a "/updateEmployeeDetail" with validation.
>
> Your action can be a dispatch action if you don't want to have 2 classes.
>
> Nico.
>
> Gaet a écrit :
>
> >Hi,
> >
> >I have page with a list of employees.
> >On that list, if you click on an employee name, I want to redirect to an
> >edit page...easy no?
> >
> >but how to define the complete process into struts-config? Below you will
> >find my actual struts-config but here is my problem :
> >I have defined the /EmployeeDetail action-mapping with validate equal to
> >false to be able to display the employee detail page without any
> >check....but if the user made any changes on the employee information in
the
> >detailled page, the same action is called and then i need to validate my
> >form! Maybe my configuration is not good....
> >
> >
> ><action path="/initEmployeeList"
> >    type="com.ajo.InitEmployeeAction"
> >    name="EmployeeForm"
> >    validate="false"
> >    parameter="reqCode"
> >    scope="session">
> >    <forward name="continue" path="/EmployeeListe.jsp"/>
> >    <forward name="create" path="EmployeeDetail.do"/>
> >    <forward name="update" path="EmployeeDetail.do"/>
> ></action>
> ><action path="/EmployeeDetail"
> >    type="org.ajo.EmployeeAction"
> >    name="EmployeeForm"
> >    validate="false"
> >    scope="request">
> >    <forward name="continue" path="/EmployeeDetail.jsp"/>
> ></action>
> >
> >
> >in EmployeeDetail.jsp, I have the following form definition :
> >    <html:form action="/EmployeeDetail">...
> >
> >Thanks for your help
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
> This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient,  you
are not authorized to read, print, retain, copy, disseminate,  distribute,
or use this message or any part thereof. If you receive this  message in
error, please notify the sender immediately and delete all  copies of this
message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Mime
View raw message