what I needed was:
form.lookupWidget("widgetid").value
So what gives with var model = form.getModel()? Does getModel not pick up all the widgets, and model.widgetid not simply pull the value out of the widget?
regards
Andrew
On 24/07/06, Andrew <[EMAIL PROTECTED]> wrote:
Hi,
var model = form.getModel();
var bizData = {"next" : model.next, "delItem" : model.delItem, "quantity" : model.quantity, "orderID" : model.orderID, "stockID" : model.stockID}
var confirmOrder = bizData.next;var delItems2 = bizData.delItem; //The list of selected checkboxes
var delItems = java.util.Arrays.asList(delItems2);
The above gives me the follwoing error:
Cannot convert [EMAIL PROTECTED] to java.lang.Object[]
So when I do:
var delItems = java.util.Arrays.asList(delItems2.getValue ());
I get the follwoing error message:
getValue is not a function.
What am I missing here?
regards
AndrewOn 24/07/06, Andrew <[EMAIL PROTECTED]> wrote:Hi Jason,
my bad! bizdata is represented as follows in flow:
var model = form.getModel();
var bizData = {"next" : model.next, "delItem" : model.delItem, "quantity" : model.quantity, "orderID" : model.orderID, "stockID" : model.stockID}
var confirmOrder = bizData.next;
delItems = bizData.delItem;
var items = new java.util.Vector();
if (parseInt(bizData.quantity) || delItems != null) {
try {
if (delItems != null) {
if ( delItems.iterator) {items.addAll(delItems);
deleteOrderItem2(items);
} else {items.add(delItems);
deleteOrderItem2(items);
}
}HTH
regards
AndrewOn 23/07/06, Jason Johnston < [EMAIL PROTECTED]> wrote:> >
> > Again the flow code is unchanged:
> >
> > delItems = bizData.delItem ;
> > var items = new java.util.Vector();
>
>
> As delItems is now actually a widget, why can I not do this to extract
> the value of the widget?:
>
> delItems = bizData.delItem.value;
>
Sorry, I'm working with an incomplete picture here... I don't know what
bizData is or what bizData.delItem returns. If it's the actual widget
then yes, you should be able to do .value to get its value. That value
will be a Java String[] array, so if you have to get that into a Vector
or Collection to satisfy whatever API you're passing it to then you'll
need a conversion something like what I wrote in my previous reply.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
