Thanks gnana. Its working but i recieved the list but in the list i am
getting it as Object.
Can i use the statement to convert object to employee object
Ex:- for each ( var obj:Object in Object)
{
var emp:Employee= obj as Employee;
}
or do i need to set each and individual object to a varaible
On Sat, Jan 24, 2009 at 2:18 PM, GnanaPrakasam T
<[email protected]>wrote:
> *Hi Kiran,
>
> public var empobj :Object;
> instead *public *var* empobj :Array; and see you are getting anything
> from Java !
>
>
> Gnanz.../
> http://gnanz-flexworld.blogspot.com/
>
>
> **kiran singh wrote:
>
> Hi,
>
> I have seen a strange behaviour in flex.
>
> *Problem:*
> **
> my server code(java class) returns an collection of objects as list.
>
> The list is send back to flex to Array collection datatype.while recieving
> the object it shows as Null in flex.
>
> The problem works fine when objects of type *int ,string* and fails when
> the object of type another java class.
>
> *Example* :
>
> *Java :*
> **
> *
>
> public
> **class* DepartmentVO
>
> {
> *private* *List* empobj = *new* *ArrayList*();
>
> .
> for(int i=0;i<2;i++)
> {
> EmployeeVO emp = new EmployeeVO ();
> emp.id=1;
> empobj .add(emp);
> }
>
> *Flex:*
>
> same DepartmentVO and EmployeeVO exist in flex side.
>
> [RemoteClass(alias=
> *"com.zetainteractive.webui.vo.DepartmentVO"*)] *public* *class*DepartmentVO
>
> {
> *
>
> public
> **var* empobj :Array;
>
> }
>
> [RemoteClass(alias=*"package.*EmployeeVO *"*)] for EmployeeVO
>
> *public* *class* EmployeeVO
>
> {
> *
>
> public
> **var* id:String;
>
> }
>
> --
> N.Kiran Singh
>
>
>
>
>
> >
>
--
N.Kiran Singh
mca
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---