Look at the struts documentation ..Especially the getting started guide...

But the simple rule is you should have matching attributes on your form...SO struts 
autopopulation will take care of transferring the parameters to the form..You can just 
you the getters on the form to access those values then...

-----Original Message-----
From: Kamal Gupta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 23, 2003 10:33 AM
To: Struts Users Mailing List
Subject: Getting values from jsp pages


Hi,

Can some one please send me some example code of getting values from a jsp
page as I have to insert the values into the database.

what are the different steps which are required to be done in struts to make
this work

Regards

Kamal

-----Original Message-----
From: Fran�ois Richard [mailto:[EMAIL PROTECTED]
Sent: 23 December 2003 09:03
To: Struts Users Mailing List
Subject: Re: Synchronise Collection with ActionForm


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,
>
> I have got an ActionForm with a collection.
> The first synchronization (ActionForm object > form html) works great,
> on page load.
> but, on form submitting, the second synchronization (form html >
> ActionForm object)doesn't work. the old values are still present.
>
> The ActionForm (SocieteForm) object is stocked in the session.
>
> my jsp :
>
> <html:form action="societeValid">
> <logic:iterate id="societe" name="societeForm" property="societes"
> scope="session" indexId="index">
> <html:text name="societe" property="code" indexed="true" />
> <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]


---------------------------------------------------------------------
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]

Reply via email to