Re: [REPOST] Setting multi-value widget values for dynamically createdforms

2008-06-04 Thread Derek Hohls
Robin Thanks! This worked - with the modification that you only need: var values = new java.util.ArrayList(); Derek >>> On 2008/06/03 at 03:57, in message <[EMAIL PROTECTED]>, Robin Wyles <[EMAIL >>> PROTECTED]> wrote: I'm not sure if it's the best way, but off the top of my head... var valu

Re: [REPOST] Setting multi-value widget values for dynamically createdforms

2008-06-03 Thread Robin Wyles
Or you could even do: var values = []; values[0] = "option 1" values[1] = someMethodToGetAString(); fwidget.setValue(values); I think your problems were down to the fact that you were initialising the size of the array... Cheers, Robin On 3 Jun 2008, at 14:48, Derek Hohls wrote: Robin

Re: [REPOST] Setting multi-value widget values for dynamically createdforms

2008-06-03 Thread Robin Wyles
I'm not sure if it's the best way, but off the top of my head... var values = new Packages.com.java.util.ArrayList(); values.add("option 1"); values.add("option 2"); values.add(someMethodToGetAString()); values.add(someOtherMethodToGetAString()); fwidget.setValue(values.toArray()); Basical

Re: [REPOST] Setting multi-value widget values for dynamically createdforms

2008-06-03 Thread Derek Hohls
Robin How would you create the array programmtically ie. values array needs to be populated via data values sourced elsewhere ( and typically available in a string variable) rather than from a static list. Thanks Derek >>> On 2008/06/03 at 03:32, in message <[EMAIL PROTECTED]>, Robin Wyles <[EMA

Re: [REPOST] Setting multi-value widget values for dynamically createdforms

2008-06-03 Thread Robin Wyles
Hi Derek, As far as I can remember you just need to set the multi-value widget value to a simple array, and I don't think you should initialise the array with 10 values if you are only setting 1. Something like this maybe: var values = ["option1", "option2"]; // these are the values to pre