CopyCodeThe Code is as follows: Private var javalist: arraycollection;
Function resulthandler (Event: resultevent): void {
Javalist = arraycollection (event. Result );
// Javalist = event. Result As arraycollection;
Javabar. dataprovider = javalist;
}
The Java code returns the java. util. list object,
Because the new arraycollection requires an array object, event. result is a space return object (Return Value of Java method). Therefore, different types cannot be used to construct arraycollection using new. However, the disgusting flex only supports javalist = arraycollection (event. result );
Or use javalist = event. Result As arraycollection; to directly convert the data.
Because of network delay, you cannot use the dataprovider attribute to obtain the value. Therefore, you can manually specify the value.
You can use the javalist [I]. attribute to directly call the value.