wood burning stoves 2.0*
The moose likes Struts and the fly likes Wiley Jakarta Pitfalls:  Extend Struts ActionForms for array validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Wiley Jakarta Pitfalls:  Extend Struts ActionForms for array validation" Watch "Wiley Jakarta Pitfalls:  Extend Struts ActionForms for array validation" New topic
Author

Wiley Jakarta Pitfalls: Extend Struts ActionForms for array validation

Rich W
Greenhorn

Joined: Jan 09, 2006
Posts: 2
I am new to Java but I've managed to successfully implement the Formatter & Validation code presented in Chapter 2 of the Jakarta Pitfalls book by Dudney.

The formatting and validation works great with a single form. The author states that the code can also handled nesting and arrays. Unfortunately you
can't just pass two arrays for formatting and validation.

I want to know what to do so I can pass an array into the populate() component of the formatter library. The code I'm using is discussed in the following:

http://72.14.203.104/search?q=cache _rTrxRH4koJ:java.sun.com/developer/Books/javaprogramming/Dudney/Pitfall_Ch02.pdf+struts+validation+of+BigDecimal&hl=en
Rich W
Greenhorn

Joined: Jan 09, 2006
Posts: 2
What I really need to know is how to define an ActionForm that is an array of another ActionForm.

AutoInfoForm extends MasterForm {
String key;
String year;
String make;
String mode;
}
etc....

AutoListForm extends MasterForm {
AutoInfoForm[] autolist;
}
 
 
subject: Wiley Jakarta Pitfalls: Extend Struts ActionForms for array validation
 
Similar Threads
Server side Integer fields validation in Struts 1.1
Formatting Dates and Currency, DynaActionForm
Jakarta Pitfalls by Bill Dudney and Jonathan Lehr
tutorial of 2-dimensional arrays
Caching Database Rows