[Nitro] Validation errors and redisplaying form field data....

Walter Walter at mwsewall.com
Wed Sep 14 11:31:59 EDT 2005

> > I have some helpers for this kind of stuff. I will discuss 
> with george
> > and see how we might incorporate into Nitro.
> I would love to see those helpers ;-)
> -g.

I have ReflectionUtils class (This is a port of a Java class) that can be used to read and write arbitrary fields of an object or its sub-objects.

So if you had a customer and he had invoices and they had line items you could say
ReflectionUtils.writeObject(self, "customer.invoices[3].line_item[2].amount", 3.45)

It resolves hashes and arrays with the bracket notation.  I think the only case that it does not handle well is if a Hash has a numeric key (it will try it as a string).

It is a couple of years old and written with a strong Java influence, but might be useful in the above.


No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.24/100 - Release Date: 9/13/2005

More information about the Nitro-general mailing list