• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
pie sneak
Posts: 4727
Mac VI Editor Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
StrutsCatalogLazyList
 
reply
    Bookmark Topic Watch Topic
  • New Topic