struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marko Wilpshaar <>
Subject DynaValidatorActionForm - List - nested:iterate: TROUBLE
Date Thu, 26 Sep 2002 06:44:53 GMT

I'm exploring the new features of Struts 1.1 (using b2 release) and got
stuck on the use of the combination DynaValidatorActionForm - List - nested
tags (iterate, write). 

I am trying to build a search & list page. The search is a form with (for
simplicity) one 'html:text' input field and a search button. The results of
the search need to be displayed on the same page and be part of the same
form. This list of results will be displayed as: a checkbox in the first
column and a range of properties of the objects (e.g. Books) in the
resultset in subsequent columns. The user will be allowed to select multiple
items from the list for further processing. Think of a list of books, the
user selects the books he/she wants and they are added to the shoppingcart.

I would like to use a DynaValidatorActionForm with form-bean properties
'title' (java.lang.String) and 'books' (java.util.List). The search action
handler uses the input from the title field to fetch the books from the
database and sets this list of books in the 'books' field of the

Doing the first search and display the results is no problem but on a new
search request, the form can not be processed. I get a
java.lang.NullPointerException: No indexed value for 'books[n]'  (n being
the size of the resultset of the first search). What could be the problem?

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message