Note : the synchro works fine for all the objects in the ActionForm (SocieteForm) expects for the ArrayList (only form > object)
the action class(submit)
public class SocieteValidAction extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws IOException, ServletException,
ClassNotFoundException, SQLException
{
ActionErrors errors = new ActionErrors();
SocieteForm societeForm = (SocieteForm)form;
// updating database
// .....
if (!errors.isEmpty()) saveErrors(request, errors);
return (mapping.findForward("success"));} }
Richard Yee wrote:
Fran�ois, Show us your Action class. From your struts_config, it seems like you are in al loop in that you forward to the same action that is your input. How does the user ever get past this action?
-Richard
--- Fran�ois_Richard <[EMAIL PROTECTED]> wrote:
no one have an idea !!---------------------------------------------------------------------
my ActionForm :
public class SocieteForm extends ActionForm {
private ArrayList societes;
public ActionErrors validate(ActionMapping
mapping, HttpServletRequest request) {
ActionErrors errors = new ActionErrors();
return errors;
}
public ArrayList getSocietes() { return societes; } public void setSocietes(ArrayList liste) { societes = liste; } }
my struts-config.xml (only for submit) :
<action
attribute="societeForm"
name="societeForm"
path="/societeValid"
scope="session"
type="com.sofice.cra.action.SocieteValidAction"
validate="true"
input="/lstSocietes.do">
<forward name="success"
path="/lstSocietes.do" />
</action>
any advice would be appreciated. ;-)
Fran�ois
Fran�ois Richard wrote:
Merry Christmas,form html) works great,
I have got an ActionForm with a collection.
The first synchronization (ActionForm object >
on page load.synchronization (form html >
but, on form submitting, the second
ActionForm object)doesn't work. the old values arestill present.
The ActionForm (SocieteForm) object is stocked inthe session.
my jsp :property="societes"
<html:form action="societeValid">
<logic:iterate id="societe" name="societeForm"
scope="session" indexId="index">indexed="true" />
<html:text name="societe" property="code"
<html:text name="societe" property="raisonSociale"indexed="true" />
</logic:iterate> </html:form>
Thanks,
Fran�ois
---------------------------------------------------------------------To unsubscribe, e-mail:[EMAIL PROTECTED]
For additional commands, e-mail:[EMAIL PROTECTED]
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
__________________________________ Do you Yahoo!? New Yahoo! Photos - easier uploading and sharing. http://photos.yahoo.com/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

