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]