Help needed in converting ArrayList to ArrayCollection
i converting arraylist (java) arraycollection of flex .
please me in , dont know whether correct approach or not
i have created user vo actionscript class on flex 2 properties uname , pass .
[bindable]
var result:arraycollection
private function displaydetails(event:resultevent):void
{
result = event.result arraycollection;
}
<mx:datagrid dataprovider="{result}">
<mx:columns>
<mx:datagridcolumn headertext="username" datafield="uname"/>
<mx:datagridcolumn headertext="password" datafield="pass"/>
</mx:columns>
</mx:datagrid>
this java dao file :
resultset rs = stmt.executequery("select name , pass users");
list = new arraylist();
while (rs.next()) {
user user = new user();
user.setuname(rs.getstring(1));
user.setpass(rs.getstring(2));
list.add(user);
}
return list;
with below code ,the displayed datagrid empty no data , please me doung wrong
do need more ?? data coming on lcds server console .
please .
hi kiran,
try once....
private function displaydetails(event:resultevent):void
{
result = new arraycollection(event.result array);
}
just try debug putting break point , make sure getting event.result array....if not change code accordingly..
thanks,
bhasker
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment