Dear Friends,

I am facing problem in the updating of ActionForm properties from the struts
based jsp page particularly <logic:iterate> tag.



While initial display the values of my Taisho object is getting displayed
properly using <logic:iterate> but when I change those displayed values in
html page I am not getting the updated values neither in ActionForm nor in
Taisho object. I hope some of you will help me. I know I am missing
something somewhere. I tried with number of different options but unable to
get the proper result.

Detail of the code is as follows, I really appreciate the help provided.

Reagrds,

Deepak



Iterate Code in JSP Page



<logic:iterate id="tcc" name="KikiTorokuForm" property="taishos" offset="0"
type="jp.co.ogis.aess.mokuhyo.Taisho">



<html:text name="tcc" property="taishoBunruiCodo" maxlength="6"/>

            <html:text name="tcc"  property="taishoKinoCodo_1"
maxlength="6"/>

            <html:text name="tcc" property="taishoKinoCodo_2"
maxlength="6"/>

                 <html:text name="tcc" property="taishoKinoCodo_3"
maxlength="6"/>

 </logic:iterate>





ActionForm Code is (My ActionForm name is KikiTorokuForm)



private final ArrayList taishos = new ArrayList();



public ArrayList getTaishos() {

            if( taishos.isEmpty() ) {

                for(int i=0; i <rows; i++ ){

                    taishos.add( new Taisho() );

                }

            }

            return taishos;

}



public void setTaishos(int index, Taisho tai){

taishos.add(index, tai);

}



public void setTaishos(ArrayList tais){

taishos.addAll(tais);

}







And Class Taisho is as follows,



package jp.co.ogis.aess.mokuhyo;



import java.io.*;



/**

 *

 * @author  mundada

 */

public class Taisho implements Serializable {



    private String taishoBunruiCodo = "";

    private String taishoKinoCodo_1 = "";

    private String taishoKinoCodo_2 = "";

    private String taishoKinoCodo_3 = "";





    public String getTaishoBunruiCodo(){

        return taishoBunruiCodo;

    }



    public void setTaishoBunruiCodo(String code){

        this.taishoBunruiCodo = code;

    }



    public String getTaishoKinoCodo_1() {

        return this.taishoKinoCodo_1;

    }



    public void setTaishoKinoCodo_1(String code){

        this.taishoKinoCodo_1 = code;

    }



    public String getTaishoKinoCodo_2() {

        return this.taishoKinoCodo_2;

    }



    public void setTaishoKinoCodo_2(String code){

        this.taishoKinoCodo_2 = code;

    }



    public String getTaishoKinoCodo_3() {

        return this.taishoKinoCodo_3;

    }



    public void setTaishoKinoCodo_3(String code){

        this.taishoKinoCodo_3 = code;

    }

}





And Action setting in the struts-config.xml file is as follows,





<form-bean name="KikiTorokuForm"

 type="jp.co.ogis.aess.mokuhyo.KikiTorokuForm"/>



…..



             <action

                path="/Kikitoroku"

                name="KikiTorokuForm"

                type="jp.co.ogis.aess.mokuhyo.KikiTorokuAction"

                scope="session"

                input="/mokuhyo/KikiToroku.jsp"

                validate="true">

                <forward name="failed" path="/mokuhyo/Login.jsp"/>

                <forward name="success" path="/Last.jsp"/>

            </action>









----------------------------------------------------------------------------
----------------------------------

Reply via email to