• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Input ActionForm has a field containing an array of javabean, will it work?

 
Solo Chiang
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I retrive the field value of JavaBean resides in the collection of a input action form. The following is my code, it does not work! What do I miss there?

Java Bean: Item.java
public class Item {
private String a;
private String b;
public Strings getA();
public String getA();
...
}

ActionForm: ListItem.java contains multiple item
public class ListItem extends ActionForm {
Item[] items ;
public Item[] getItems() {... }
public void setItems(Item[] items) { }
}

JSP file:
<html:form action="index.do" method="post">
<td><html:text name="items[0]" property="a"/></td>
<td><html:text name="items[1]" property="a"/></td>

[ September 14, 2005: Message edited by: Solo Chiang ]
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
StrutsCatalogLazyList
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic