struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brian DeLuca" <bdelu...@iwon.com>
Subject problem with logic:iterate and html:text
Date Wed, 11 Dec 2002 21:03:03 GMT



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:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message