You can typecast both
list in java
arraycollection in flex
that will be enough
Kiran Kumar Vasireddy wrote:
> Dear All,
>
> I am using blazeds to connect to java objects and getting data from the
> database . I wrote a method in java that returns List object and I am
> converting it to ArrayCollection Object and populating a combo box from it
> .It is working fine with this approach . Considering the performance issues
> I want to go with Array instead of ArrayCollection in flex ,since the data
> I am populating in combox doesn't require any filters or sort or for that
> matter any type of modification .I tried this approch and failed . Could any
> body please look into this issue? ( Provided the code below)
>
> Thanks
> Kiran
>
> My Java code
>
> public List getCountryNames()
>
> {
>
> List countryNames = new Vector();
> ResultSet rs ;
>
> try{
>
> connectionmanager=ConnectionManager.getDatabaseInstance();
> Connection con=
> connectionmanager.getDatabaseConnection();
>
> PreparedStatement ps = con.prepareStatement("SELECT
> Country_name FROM Countries ORDER BY Country_name");
>
>
> rs = ps.executeQuery();
>
> while (rs.next())
> {
>
>
> countryNames .add(rs.getString(1));
>
>
> }
> rs.close();
> ps.close();
>
> }
> catch(Exception e){
> e.printStackTrace();
>
> }
>
> return countryNames ;
>
> }
>
>
> Flex code snippet
>
> private function getCountryNames(event:ResultEvent):void {
> surNamesArray=event.result as Array;
>
> }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en
-~----------~----~----~----~------~----~------~--~---