flex RemoteObject 连接java类 获取list集合 请教如何转换flex中 array
flex RemoteObject 连接java类 获取list集合 请问怎么转换flex中 array
flex RemoteObject 连接java类 获取list集合 请问怎么转换flex中 array
<mx:RemoteObject id="dateService" destination="DateService" />
<destination id="DateService">
<properties>
<source> com.sun.flex.dao.DemoService </source >
</properties>
</destination>
package com.sun.flex.dao;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.*;
import java.util.List;
public class DemoService {
public List getService() {
Connection con = null;
Statement st = null;
ResultSet rs = null;
String sql="select * from operator_treat_ecgdb";
List list = new ArrayList();
try {
con = ConnectionMager.getConnection();
st = con.createStatement();
rs = st.executeQuery(sql);
while (rs.next()) {
list.add(new Integer(rs.getString(3)));
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
ConnectionMager.closeConnection(con, st, rs);
}
return list;
}
}
请问怎么样 把 java类获取的list集合 转换成 flex中 array 数组
各位 大哥帮帮忙 小弟初学者 在线等高手 指导 谢谢
------解决方案--------------------
java 端返回ArrayList 类型 flex端使用ArrayConnection来接收
------解决方案--------------------
event.result as ArrayConnection;
flex RemoteObject 连接java类 获取list集合 请问怎么转换flex中 array
<mx:RemoteObject id="dateService" destination="DateService" />
<destination id="DateService">
<properties>
<source> com.sun.flex.dao.DemoService </source >
</properties>
</destination>
package com.sun.flex.dao;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.*;
import java.util.List;
public class DemoService {
public List getService() {
Connection con = null;
Statement st = null;
ResultSet rs = null;
String sql="select * from operator_treat_ecgdb";
List list = new ArrayList();
try {
con = ConnectionMager.getConnection();
st = con.createStatement();
rs = st.executeQuery(sql);
while (rs.next()) {
list.add(new Integer(rs.getString(3)));
}
} catch (SQLException e) {
e.printStackTrace();
} finally {
ConnectionMager.closeConnection(con, st, rs);
}
return list;
}
}
请问怎么样 把 java类获取的list集合 转换成 flex中 array 数组
各位 大哥帮帮忙 小弟初学者 在线等高手 指导 谢谢
------解决方案--------------------
java 端返回ArrayList 类型 flex端使用ArrayConnection来接收
------解决方案--------------------
event.result as ArrayConnection;