for ( Object idObject : scope.getIds ( ) )
{
Scriptable obj = ( Scriptable ) scope.get ( idObject.toString ( ) ,
scope ) ;
Object u = Context.jsToJava ( obj.get ( "20080804-8S6126A1" ,
scope ) , String.class ) ;
result.add ( u.toString ( ) ) ;
}
this works fine.
but what about the used index, if it is dynamic. how can i iterate over the
array without knowing the index.
"helge" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> On Jul 14, 2:24 am, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]> wrote:
>> javascript example:
>>
>> var apTax = new Object();
>> apTax['20080804-8S6126A1'] = 3.00;
>> apTax['20080805-8S6110A2'] = 3.00;
>> apTax['20080805-8S6112A2'] = 3.00;
>> apTax['20080805-8S6114A2'] = 3.00;
>>
>> how can i access the apTax array from java after using rhino to execute
>
> Scriptable apTaxArray = scriptScope.get("apTax", scriptScope);
> Object value =
> Context.jsToJava(apTaxArray.get("20080804-8S6126A1", scriptScope);
>
> Something like that, untested.
>
> Greets,
> Helge
> --
> http://helgehess.eu/
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino