Lists is where you want to be headed, see answer to previous question
as to how to do it on JSP. The key is that the Jakarta
BeanUtils/PropertyUtils classes treat arrays and collections the same
way so both can use brackets for element indexing. The key is to
predefine the instance, I think struts will throw an exception if your
list instance is null.

It doesn't even need to be a LinkedList, as long as it implements List
(and possibly Collection??).

As to the validator, I'm pretty sure it handles it, just don't know
off the top of my head how it does it.

-ed

On 8/1/06, Bart Busschots <[EMAIL PROTECTED]> wrote:
Following on from my earlier email it strikes me that the most sensible
way to deal with collecting a variable number of student names is to
have a LinkedList in your form bean. However, the question then is, can
Struts handle this? Can the validator handle this? I would need the
validator to apply one rule to all elements of a variable length list?

I have a feeling I've stumbled into a limitations with Struts here but I
could be wrong. So far no amount of googling has helped me out here. If
anyone has any pointers on where to look for solutions to this I'd be
much obliged. I can't be the first person to want to change the layout
of a latter page in a multipage form within struts based on the values
submitted in a previous page!

Thanks,

Bart.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to