Return-Path: Delivered-To: apmail-jakarta-struts-user-archive@apache.org Received: (qmail 16268 invoked from network); 13 Dec 2002 09:17:30 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 13 Dec 2002 09:17:30 -0000 Received: (qmail 26378 invoked by uid 97); 13 Dec 2002 09:18:22 -0000 Delivered-To: qmlist-jakarta-archive-struts-user@jakarta.apache.org Received: (qmail 26362 invoked by uid 97); 13 Dec 2002 09:18:21 -0000 Mailing-List: contact struts-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list struts-user@jakarta.apache.org Received: (qmail 26350 invoked by uid 98); 13 Dec 2002 09:18:21 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <003801c2a288$abd7e520$0901a8c0@work9> From: "Michael Olszynski" To: "Struts Users Mailing List" References: Subject: Re: Struggling with indexed/repeating input fields in forms Date: Fri, 13 Dec 2002 10:18:59 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N The same problem with the nested tags occurs. So I�m still trying to figure out why it doesn�t work. But thanks for u�r help! Take care Michael -- Fehlerfreie Software wirkt weniger komplex und diskreditiert damit den Entwickler! ----- Original Message ----- From: "Stephen Ting" To: "'Struts Users Mailing List'" Sent: Friday, December 13, 2002 2:06 AM Subject: RE: Struggling with indexed/repeating input fields in forms Michael, May be you can try using Nested iterate tag + Nested text tag to populate the indexed fields. I Have successfully done this. If you need further clarification, please email me. Regards, Stephen > -----Original Message----- > From: Michael Olszynski [mailto:m.olszynski@proway.de] > Sent: 13 December 2002 04:21 > To: Struts Users Mailing List > Subject: Re: Struggling with indexed/repeating input fields in forms > > > That didn�t help.....But thanks eitherway. > Does anyone have a clue what could be wrong? > Any ideas are welcome! > -- > Fehlerfreie Software wirkt weniger komplex und diskreditiert > damit den Entwickler! > ----- Original Message ----- > From: "V. Cekvenich" > To: > Sent: Thursday, December 12, 2002 6:56 PM > Subject: Re: Struggling with indexed/repeating input fields > > > > One (good) way is to have your beans implement collection. Search > > messages for "cekvenich", I posted like 3 of my last 10 messages > > related to this. > > > > .V > > > > Michael Olszynski wrote: > > > I saw a post in the thread > > > > http://www.mail-archive.com/struts-user@jakarta.apache.org/msg49234. > > > html > > > > > > I have the same problem and I can�t get it working. > Perhaps someone > > > can > help me? It�d be very nice. > > > > > > I have the problems that the data in my formbean isn�t updated. I > > > mean, > I get the data form my formbean in the jsp page. But when I > edit it and press submit, it is not updated. I get the same > data as I got before. > > > > > > Do you see perhaps an error? (I reviewed it now 7 hours with the > > > sample > source attached in the upper thread, and I can�t find any > error. Thank you) > > > > > > It�s kind of urgent, because my thesis should be finished > at the end > > > of > december. Thanks!!!! > > > > > > Take care Michael > > > > > > > ************************************************************** > ************** > ********************************** > > > This is my projekterfassung.jsp: > > > > > > type="de.proway.zerf.web.bean.TimeProofFormBean"> > > > > > > property="vector"> > > > > > > > > > > > > > > > > > > > > > > > > > ************************************************************** > ************** > ********************************** > > > > > > My struts-config.xml: > > > > > > > > > > > > > > "-//Apache Software Foundation//DTD Struts Configuration > 1.0//EN" > > > > > > "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > name="timeProofForm" > > > type="de.proway.zerf.web.bean.TimeProofFormBean"/> > > > > > > > > > > > > > > > > > > > > > > > > path="/projekterfassung.jsp"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > type="de.proway.zerf.web.controller.ShowTimeProofAction" > > > name="timeProofForm" > > > scope="request" > > > input="/projekterfassung.jsp"> > > > > > > > > > type="de.proway.zerf.web.controller.SaveTimeProofAction" > > > name="timeProofForm" > > > scope="request" > > > input="/projekterfassung.jsp"> > > > > > > > > > > > > type="org.apache.struts.actions.AddFormBeanAction"/> > > > > > type="org.apache.struts.actions.AddForwardAction"/> > > > > > type="org.apache.struts.actions.AddMappingAction"/> > > > > > type="org.apache.struts.actions.ReloadAction"/> > > > > > > type="org.apache.struts.actions.RemoveFormBeanAction"/> > > > > > > type="org.apache.struts.actions.RemoveForwardAction"/> > > > > > > type="org.apache.struts.actions.RemoveMappingAction"/> > > > > > > > > > > > > > > > > > > > ************************************************************** > ************** > ********************************** > > > SaveTimeProofAction.java > > > > > > package de.proway.zerf.web.controller; > > > > > > import javax.servlet.http.*; > > > import org.apache.struts.action.*; > > > import de.proway.zerf.web.bean.*; > > > import de.proway.zerf.app.controller.*; > > > import de.proway.zerf.web.util.*; > > > import de.proway.zerf.app.bean.*; > > > import java.util.*; > > > import java.text.*; > > > > > > public final class SaveTimeProofAction extends LoginCheckAction { > > > public ActionForward perform( ActionMapping mapping, > > > ActionForm form, HttpServletRequest request, > > > HttpServletResponse res ) { > > > > > > TimeProofFormBean tpf = (TimeProofFormBean) form; > > > > > > System.out.println(tpf.toString()); > > > System.out.println(tpf.getVector().toString()); > > > for( int i=0; i < tpf.getVector().size(); ++i ) { > > > System.out.println( ((TimeProofTableBean) > tpf.getVector().get(i)).getDate() ); > > > System.out.println( ((TimeProofTableBean) > tpf.getVector().get(i)).getFromHour() ); > > > System.out.println( ((TimeProofTableBean) > tpf.getVector().get(i)).getFromMinute() ); > > > } > > > > > > return mapping.findForward( "done" ); > > > } > > > } > > > > > > > ************************************************************** > ************** > ********************************** > > > Show TimeProofAction.java > > > > > > package de.proway.zerf.web.controller; > > > > > > import javax.servlet.http.*; > > > import org.apache.struts.action.*; > > > import de.proway.zerf.web.bean.*; > > > import de.proway.zerf.app.controller.*; > > > import de.proway.zerf.web.util.*; > > > import de.proway.zerf.app.bean.*; > > > import java.util.*; > > > import java.text.*; > > > > > > public final class ShowTimeProofAction extends LoginCheckAction { > > > public ActionForward perform( ActionMapping mapping, > > > ActionForm form, HttpServletRequest request, > > > HttpServletResponse res ) { > > > > > > Vector newCollection = new Vector(); > > > TimeProofFormBean tpfb = ( TimeProofFormBean )form; > > > TimeProofTableBean tptb1 = new TimeProofTableBean(); > > > TimeProofTableBean tptb2 = new TimeProofTableBean(); > > > tptb1.setFromMinute(3); > > > tptb2.setFromMinute(4); > > > newCollection.add(tptb1); > > > newCollection.add(tptb2); > > > tpfb.setVector(newCollection); > > > return mapping.findForward( "done" ); > > > } > > > } > > > > > > > ************************************************************** > ************** > ********************************** > > > TimeProofFormBean.java > > > > > > package de.proway.zerf.web.bean; > > > > > > import java.util.*; > > > > > > import org.apache.struts.action.*; > > > > > > public class TimeProofFormBean extends ActionForm { > > > > > > public TimeProofFormBean() { > > > } > > > > > > public Vector getVector() { > > > return this.vector; > > > } > > > > > > public void setVector( Vector v ) { > > > this.vector = v; > > > } > > > > > > public int getEmployeeID() { return employeeID; } > > > > > > public void setEmployeeID( int employeeID ) { > this.employeeID = > employeeID; } > > > > > > public int getProjectID() { return projectID; } > > > > > > public void setProjectID( int projectID ) { this.projectID = > projectID; } > > > > > > private int employeeID; > > > private int projectID; > > > private Vector vector = new Vector(); > > > } > > > > ************************************************************** > ************** > ********************************** > > > TimeProofTableBean.java > > > > > > package de.proway.zerf.web.bean; > > > > > > > > > import java.util.*; > > > import java.io.Serializable; > > > > > > public class TimeProofTableBean implements Serializable { > > > public TimeProofTableBean(){} > > > > > > public String getFromHour(){ > > > return FromHour; > > > } > > > > > > public void setFromHour(String FromHour){ > > > this.FromHour = FromHour; > > > } > > > > > > public String getToHour(){ > > > return ToHour; > > > } > > > > > > public void setToHour(String ToHour){ > > > this.ToHour = ToHour; > > > } > > > > > > public String getFromMinute(){ > > > return FromMinute; > > > } > > > > > > public void setFromMinute(String FromMinute){ > > > this.FromMinute = FromMinute; > > > } > > > > > > public String getToMinute(){ > > > return ToMinute; > > > } > > > > > > public void setToMinute(String ToMinute){ > > > this.ToMinute = ToMinute; > > > } > > > > > > public String getDate(){ > > > return Date; > > > } > > > > > > public void setDate(String Date){ > > > this.Date = Date; > > > } > > > > > > > > > private String FromHour; > > > private String ToHour; > > > private String FromMinute; > > > private String ToMinute; > > > private String Date; > > > } > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Fehlerfreie Software wirkt weniger komplex und > diskreditiert damit den > Entwickler! > > > > > > > > > > -- > > To unsubscribe, e-mail: > > > For additional commands, e-mail: > > > > > > > > > -- > To unsubscribe, e-mail: > unsubscribe@jakarta.apache.org> > For > additional commands, > e-mail: > > -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail:
maxlength="2" indexed="true"/> : property="fromMinute" size="2" maxlength="2" indexed="true"/> maxlength="2" indexed="true"/> : property="toMinute" size="2" maxlength="2" indexed="true"/>