Sebastian,
These sorts of questions really belong on the user list. The dev list is for discussion about the development of Struts itself. Try mailing over there - the user list has tons of folks on it, and I just about bet you can get some help there.
Good Luck,
Eddie Bush
----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 10, 2004 9:09 AM
Subject: Problems with indexed properties
Hi,
I need help for indexed properties.
On one page I have different "input-fields" and I want to commit the changes
when pushing the
"submit-button" to realize this I am using the indexed propertie.
Is this the right way? Or is the someone better?
----------------------------------
This is my Code:
But it doesn't work and I don't know why.
I think it has something to do with this part: "<%= "entityResult[" + index+
"].resultList[" + idx + "].menge" %>"
The method "getEntityResult" is invoked but not the other part.
I am using two 3 forms, which are nested, they look like this:
public class ResultForm extends ActionForm {
private ArrayList resultList;
//RESULT-LIST public void setResultList(ArrayList resultList) { this.resultList = resultList; } public ArrayList getResultList() { return resultList; }
//GET-Entity INDEX public EntityForm getEntityResult(int index) { System.err.println("===> getEntityResult: " + index); return (EntityForm) resultList.get(index); } }
public class EntityForm extends ActionForm {
private ArrayList resultList; private ReiseForm reiseResult;
//RESULT-LIST public void setResultList(ArrayList resultList) { this.resultList = resultList; } public ArrayList getResultList() { return resultList; }
//GET-REISE AN INDEX public ReiseForm getReiseResult(int index) { System.err.println("===> getReiseResult : " + index); return (ReiseForm) resultList.get(index); }
}
public class ReiseForm extends ActionForm {
private String menge;
//MENGE public void setMenge(String menge) { this.menge= menge; } public String getMenge() { return menge; } }
I want to get values of the Forms by using the "iterator" tag: <logic:iterate id="line" property="resultList" name="kombinationForm" indexId="index"> ... <logic:iterate id="zwLine" name="flughafenLine" property="line" indexId="idx"> ... <html:text name="kombinationForm" property="<%= "entityResult[" + index+ "].resultList[" + idx + "].menge" %>" > <bean:write name="zwLine" property="menge"/> </html:text> .. </logic:iterate> .. </logic:iterate>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--- avast! Antivirus: Outbound message clean. Virus Database (VPS): 0446-1, 11/10/2004 Tested on: 11/10/2004 9:01:23 PM avast! - copyright (c) 2000-2004 ALWIL Software. http://www.avast.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]