You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian DeLuca <bd...@iwon.com> on 2002/12/11 22:03:03 UTC
problem with logic:iterate and html:text
I am trying to iterate over a String [] and create html:text tags.
I am getting jsp exceptions thrown and other variations are not populating the form bean. I have tried different variations on the
text tag where property = "", and name ="testParty.advisingInstr" value =
Here is my Form.
public class TestForm extends org.apache.struts.action.ActionForm {
private Party testParty;
public TestForm() {
testParty = new Party();
testParty.setName1("Johnny");
}
public Party getTestParty() {
return testParty;
}
public void setTestParty( Party newParty ){
testParty = newParty;
}
}
Here is the PartyBean.
public class Party {
private String name1;
private String name2;
private String [] advisingInstr;
public Party(){
name1="";
advisingInstr = new String[3];
}
public String getName1() {
return name1;
}
public void setName1(String newName1) {
name1 = newName1;
}
public void setAdvisingInstr(String [] advInstr) {
advisingInstr = advInstr;
}
public String [] getAdvisingInstr(){
return advisingInstr;
}
}
Here is my jsp code.
html:form action="test.do"
html:text property="testParty.name1"/
logic:iterate id="test" name="testForm"
property="testParty.advisingInstr"
html:text indexed="true" name="testParty"
property="advisingInstr" /
/logic:iterate>
html:submit value="Press"/
/html:form|
_______________________________________________
Can a Web portal forever change your life?
Win up to $25 Million on iWon - click here!
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>