struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guido <>
Subject Re: Multi-Select List Box
Date Sat, 01 Feb 2003 17:58:45 GMT
Can anyone post a sample?  I don't know how to set the indexed properties.

If I do:

public void setSelectBox(int index, String item) {
   selectBox[index] = item;

i can get a NullPointerException or an ArrayIndexOutOfBoundsExceptions
because I don't know selectBox array size...

What is the best practice to do it??

1. Using a Collection (is not allowed in JavaBeans specification)
2. Increasing dynamically the array size in the setSelectBox method (maybe
too tricky ?).

Thank you very much.

David Graham wrote:
> Define a String[] in your form bean with the same name as your select
> David

Guido Garcia Bernardo
                                        "stat rosa pristina
                                nomine, nomina nuda tenemus."

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

View raw message