Java :: Why Value Objects Coming Back As Generic Flex Objects

Aug 4, 2011

I will try to give as much detail as I can. I am creating an CRM application using Flex(Cairngorm 2)/Java/Hibernate. The basic problem I am having is this: I have a Customer class in Java that has an ArrayList of Address classes. I have a Customer class in Flex that has an ArrayCollection of Address classes. When I make the remote object call for a Customer I get back a Customer object in Flex, but the ArrayCollecion objects have a data type of Object instead of Address. If I try to call for a List of Address classes I get the same result. If I try to call for a List of Customer classes I get a list of Customer classes in Flex. Using tomcat 6 with the following jars:

[Code]...

View 1 Replies


Similar Posts:


Php - Flex Is Deserializing Generic Objects From Zend AMF Instead Of Strictly Typed Objects

Mar 4, 2012

I'm using Zend AMF to send my remote objects to Flex. I've defined a Constant class and created getASClassName() method. Then I've created Action script class in flex.

Objects are send successfully, but they are deserialized to generic Objects in Flex instead of specific ones. EDIT: On network monitor in Flex I can see that AMF value is set to com.my.project.valueobjects.Constant. Although array from event.result contains Objects.

[Code]...

View 1 Replies

Java :: Generic DataGrid For Editing Objects Stored On A Server

Jun 23, 2011

I've knocked together a Java/BlazeDS server which creates a generic GridBean object. This GridBean contains:[code]I then created a Flex app that uses a RemoteObjectServiceWrapper to call my java server, grab the GridBean, create some DataGrid columns from the columnDefs and then set the dataProvider as the list of objects. Ok so far, everything renders.Now, what I'd really like to do is: set up some kind of event handler on the flex side so that if my item/object is edited in the datagrid, I fire a message off to java saying 'edited this field on this item'. The end goal is to have a nice generic way to render any list of objects from Java in a flex datagrid.

View 1 Replies

ActionScript 2.0 :: Objects Re-spawning When Coming Back To Frame?

Nov 20, 2010

what happens is I have a key, a door and a health bar and an enemy. the enemy takes off some of my health...I pick up the key and it disapears and is added to my inventory. I then us it to open door then my character can move off the screen to the next frame where there is a castle., but my health bar is full again. when I go back into the previous frame the key is back, the door is closed and I cant pass through it again until I pick up the key.

the only way I have found around this is to make sure the objects are in every frame but that only solves a few problems. one of the problems is my health bar always re-plenishes no matter what when going from frame to frame. and I still cant pass thru the door even though its open.

View 1 Replies

Java :: Intercepting Date Objects Coming From BlazeDS And Adjusting For Timezone Differences?

Oct 27, 2010

I am working on an application that is near the end of its development cycle and has mostly passed user testing. We recently realized that having flex convert dates to the client's local timezone is not desired, as all of our dates are in EST and contain no time data. Since BlazeDS sends dates in UTC, this results in the dates being converted to the day before in timezones west of EST.

The best solution is to go in and refactor all dates to adjust for the timezone offset, but that is just not doable at this stage. Since all dates in our application don't care about time, I would really like to be able to intercept all Date objects that come across BlazeDS and adjust for the timezone offset.

View 1 Replies

Flex :: Deep, Generic Serialization Of Objects?

Jan 24, 2011

Is there any way, without having the creator of the object implement any special functions (no specific serialization functions) (however, they can use annotations), to have Flash serialize a generic, possibly deep (objects within objects within objects, etc, etc, etc) object?

View 2 Replies

.net :: Receiving Generic Typed Custom Objects Through AMF In Flex

Apr 27, 2010

Is it possible to receive custom generic typed objects through AMF? I'm trying to integrate a flex app with an existing C# service but flex is choking on custom generic typed objects. As far as I can tell Flex doesn't even support generics, but I'd like to be able to even just read in the object and cast its members as necessary. I basically just want flex to ignore the <T>. I'm hopeful that there's a way to do this, since flex doesn't complain about typed collections (a server call returning List works fine and flex converts it to an ArrayCollection just like an un-typed List).

The custom C# typed class
public class TypeTest<T> {
public T value {
get; set; }
public TypeTest () {
}}

The server method returning the typeTest
public TypeTest<String> doTypeTest() {
TypeTest<String> theTester = new TypeTest<String>("grrrr");
return theTester;
[Code] .....

Irritatingly if I change the result handler to take parameter of type Object it works fine. How to make this work with the value object?

View 2 Replies

ActionScript :: Java - Flex ArrayCollection Of Number Objects To Java Collection<Long> Using BlazeDS

Mar 24, 2010

I am using Flex 3 and make a call through a RemoteObject to a Java 1.6 method and exposed with BlazeDS and Spring 2.5.5 Integration over a SecureAMFChannel. The ActionScript is as follows (this code is an example of the real thing which is on a separate dev network);

[Code]...

View 2 Replies

AS3.0 :: Java - Flex - ArrayList Of Custom Java Objects Over BlazeDS

Dec 7, 2010

Right away i just try to explain my problem: Using BlazeDS i got the following Javaclasses:

[Code]...

Then i got a Flex service class calling BlazeDS and executing the getCategories java method. Since Flash dosn't seem to understand typed arrays, the result from that method which i get back in flex is a simple array of untyped objects (the mapping dosn't seem to work here, even tought the class category exists in flex and has the same properties).
thats the first thing. but however, i'm converting the untyped objects manually into objects of the category.as class. the second thing is that categories have child-categories within the java object, which are also ArrayLists of the type category.java. the problem about that: my result event object only contains the first level of categories, looking into them the children are allways null. i dunno why they are empty, since they ARE part of the java object category.

and the third thing (the strangest by fast), you maybe noticed i named the properties of the category.java class strange, like idCat and nameTest instead of simply id and name. why that? because the property names of my flex result objects dont seem to change when i change the java objects properties names (result object properties are named "id" and "name" but the java class object properties are named "idCAT" and "nameTEST"). that it REALLY strange, since if i set the properties, like you see at nameTEST = "TESTNAME" it IS recogniced by flex, only the proertyNAMES dont seem to be recognized at all.

[Code]...

View 4 Replies

How To Map Java Objects To Flex

Feb 21, 2012

For List we have ArrayCollection in flex.But what when we get an object such as HashMap from Java..And we want to map it to Flex?

View 1 Replies

ActionScript 2.0 :: Combining Two Generic Objects?

Jul 30, 2008

I just want to combine two objects and their properties together.

For instance if I have...

Code:
var appleObj:Object = new Object();
appleObj.type = "apple";
var orangeObj:Object = new Object();

[Code].....

View 5 Replies

Java :: Indepth Flex Loading Of Value Objects

Jan 14, 2010

I'm using a java-backend with a flex frontend. And when i want to use a labelfunction it doesn't load the indepth properties such as a value object, it's like it is lazy loaded in the flex side, I'm sure it is not comming from the backend because i've checked it overthere.I've got it also in datagrid's that it doesn't load all the values at once. [code]I ask at my back end get all John's, the backend gives me all John's which contains the Doe's. Now At the flex side I fire the result event from the callresponder when i receive that data. But still it can't acces the doe's into the Johns, the doe property of john is still null. When i ask it the second time it nows about the doe's, so it looks like lazy loading in a front-end way..

View 2 Replies

Java :: Send Objects From Flex To Servlet?

Dec 6, 2010

This is my method in actionscript

var urlVars : URLVariables = new URLVariables();
urlVars.myname = byteArr;
var urlReq : URLRequest = new URLRequest('MyServlet');

[Code].....

How do I recieve the byte array on servlet ?

Also the byteArr above comes from java side,

byte[] byteArr = aMethodWhichReturnsaPDFByteArray();
HttpServletResponse response = FlexContext.getHttpResponse();
ServletOutputStream os = null;

[Code].....

View 3 Replies

ActionScript 2.0 :: [fmx] Generic Function To Move Objects?

May 14, 2004

Alright so... I really don't know the best way to approach this. I had a LOT of code that I thought could be generalized into a function. I don't know how to explian it... here is the code:i attached it...I know it's a lot of code... I just... I don't know what to do with it anymore! When it was in a bunch of small functions, it worked (sort of) just seemed reallly messy and annoyed me.Oh btw its causing the hero to jsut go to 0,0 and then a hit symbol appears there, and then nothing happens, the hit doesnt even dissappear.

View 7 Replies

Java :: Send An Array Of Objects From Flex To Servlet?

Apr 29, 2011

I have a collection of Objects in an ArrayCollection in my flex page.

What is the best approach to send this data to a Java Servlet?

The object in the ArrayCollection is a VO that consists of an id and message for now. I want a solution that is scalable in case more properties are added later on.

View 1 Replies

ActionScript 3.0 :: Creating Generic Actions For Multiple Objects?

Feb 3, 2010

want to simplify coding and wondered if there was a way to write a script that could be used on multiple objects without having to write it to address each object individually. I am building a simple menu where I want the menu link to rise and scale up when the button for it is rolled over and then return to its original position when the mouse rolls off. I know I can write this per button and per item, but wanted to see if there was a way to write it once and then apply the action to everything. EX. My menu consists of 5 items (and respective buttons) home_mc (home_btn), menu_mc, dining_mc, contact_mc, specials_mc.If I write the code

home_btn.addEventListener(MouseEvent.MOUSE_OVER, homeOver);
home_btn.addEventListener(MouseEvent.MOUSE_OUT, homeOff);
function homeOver(MouseEvent) {

[code].....

View 5 Replies

ActionScript 3.0 :: Adding Data Into Array Of Generic Objects?

Oct 31, 2009

I am able to add key/pair data into the associative arrays, like;

Code:
var arrColors: Array = new Array();
arrColors.push({color: "aqua", code: "0x00FFFF"});
arrColors.push({color: "beige", code: "0xF5F5DC"});
arrColors.push({color: "brown", code: "0xA52A2A"});
// and so on

But, if I want to do the same with the array of generic objects, like;

Code:
var obj: Object = new Object();
obj["key"] = "value";

How can I add more data into it, because push() function does not seem working with this type of array.

View 2 Replies

ActionScript 3.0 :: Array Of Generic Objects - Adding Data Into?

Oct 31, 2009

I seek correction and guidancem from you experts, on the Associative arrays and the arrays of Generic Objects. I created the following working code and I believe it is an Associative array:

Code:
var arrColors: Array = new Array();
arrColors.push({color: "aqua", code: "0x00FFFF"});
arrColors.push({color: "beige", code: "0xF5F5DC"});
arrColors.push({color: "brown", code: "0xA52A2A"});
// and so on

Now, I want to create an array of Generic Objects for the same items, as below:

[Code]...

View 5 Replies

Flex :: Sending AMF Typed Objects Back To PHP?

Oct 29, 2011

I succeeded in sending typed objects from a PHP application to a flex front-end using Zend_AMF as per this question. The problem I am facing now is that I would like to send a typed object from flex to PHP and on the PHP side, be able to receive it as a typed object instead of stdClass.

Here is the class in flex:
package com.mysite{
[Bindable]
[RemoteClass(alias="CTest")]
public class CTest {
public var stuff1:String;
[Code] .....

After some testing, I removed the namespace from the PHP object and moved it into the global namespace. This seems to have resolved the issue. I have tried setting RemoteClass to modules estingCTest and also modules.testing.CTest. $_eplicitType was then set to the same value for both tests. The result is that when I use modules.testing.CTest, this is the classname that Zend_AMF sees. If I use namespace notation, Zend_AMF sees modulestestingCTest, as all the slashes get stripped out. But how can I get this working with php namespaces?

View 1 Replies

Java :: Remote Object(flex) And ArrayList Of Custom Objects?

Jan 24, 2012

I have a custom java class which has an ArrayList and corresponding to it have a custom vo class which has ArrayCollection (in Flex).I want to return data from Java to flex.Every variable in java is getting mapped to vo perfectly except for ArrayList.When trying to retrive When trying to retrive exposureUSDList (which is an arrayList) in flex I am getting empty ArrayCollection. It is not getting mapped properlyPlease find my code below:

Flex Code:
package com.example.vo
{

[code].....

View 1 Replies

Actionscript :: Flex - Debug AMF (BlazeDS) Serialization Of Java Objects?

Jun 11, 2009

I'm using BlazeDS to remote some Java objects that I'm consuming in a Flex application. I'm getting a type coercion error with one of my classes that I can't for the life of me figure out. I have other classes that are working fine using the same data types, and I've gone over my mapping a dozen times. I'm following all of the necessary conventions for getters and setters as far as I know...

Anyhow, my question is: how can I debug this problem? Running the Flex app in debug mode spits out some generic errors to the console that don't really help much (TypeError: Error #1034: Type Coercion failed: cannot convert Object@5d1d809 to valueObjects.SomeClass.).

View 5 Replies

Flex :: Develop The HTTPS Application Using Java - Remote Objects Or HTTPServices

Feb 8, 2010

I need to develop the HTTPS application using Flex and Java. But i have idea about remote objects or HTTPServices. which one is the best for developing HTTPS application.

View 1 Replies

ActionScript 3.0 :: Listen For Events Coming From Concrete Objects Made By A Factory?

Jul 29, 2009

How do I listen to an event dispatched from non-display-list concrete objects which are created by a singleton factory class?

An example would be where I want to create tweens for objects using a TweenFactoryClass. In my Main.as class I have this:

ActionScript Code:
TweenFactoryClass.instance.tweenMe( myClip, 200, 200 );

then, in my TweenFactoryClass.as, I have:

ActionScript Code:
public function tweenMe( clip:DisplayObject, xLocation, yLocation ):MyTween
{
var tween:MyTween = new MyTween();

[Code].....

I don't know where I should add the listener to be able to hear that event that was dispatched from the MyTween class.

View 9 Replies

Java :: Any Opensource Alternative To Squish To Test Flash / Silverlight / Java Applet Gui Objects?

Jun 3, 2011

If one doesn't have the source code, the only to test is to send keystroke and mouse move so I found this product but it's not free and opensource price is not even known :([URL] Squish supports automating interactions and testing non-HTML/DOM elements, that is, native objects, which are embedded in a web page. This is done at a fairly abstract level, which means that mouse and text input can be recorded and replayed.

In addition it is possible to inspect embedded native objects with the Spy tool and to insert verifications for these native objects. All of a native object's public properties can be accessed in test scripts.

View 2 Replies

Flex :: Use DTOs Or Domain Objects When Connecting To Blazeds/java/jpa Using Remote-services?

Jul 24, 2011

I am working on an Adobe Flex front-end with a Java back-end using JPA for persistence. he protocol I am using is remote objects (AMF) implemented with BlazeDS.I started out with a service-facade and entity DAOs, but without any specific DTOs. The same POJOs, the domain objects, were passed in the service-facade as those used as DTOs passed to the Hibernate DAOs.However, the latest few days I have been thinking whether this is a good approach or not. The latest article on the subject I read was this one:Interesting JPA Pattern blogThe situation:Say I have POJO Book with a unidirection ManyToOne relation with the POJO Category (i.e. each book may only be associated with one category, but the same category may be associated with many books). I see some alternatives:Alternative 1:I expose a method/operation addUpdateBook(Book book). In the implementation of this operation I add/update both the book and the referenced category.

View 1 Replies

Flex :: Objects Drawn By Flash Graphics Class Exist As Objects?

Jan 16, 2011

Internally Flash obviously keeps a list of the primitives drawn using Graphics so I wondered if you have many such primitives in a Sprite, can you re-position/remove/alter individual items rather than clear and re-draw everything? Or is this deeper into the bowels of Flash than you're allowed (or recommended) to go?

View 4 Replies

Flex :: Converting Array Of ObjectProxy Objects To Custom Objects?

Jun 10, 2011

I have a service which returns an Array of ObjectProxy objects. I would like to cast this to a custom object (a value object) and create an ArrayCollection. How can I do this?ited:I am using Django and PyAMF for the backend. I had to write a custom SQL query and I am wrapping the resulting records in ObjectProxy and sending the whole result as an ArrayCollection.Here is my client side code:

[ArrayElementType("SessionVO")]
[Bindable]
private var _list:ArrayCollection;

[code]....

View 2 Replies

Java :: Adding Two Num Flex 3.0 As Front End And Java As Back End?

May 24, 2010

i hava two text boxs in flex.have to add two txt boxs values in back end java and have to return back to third text box in flex.

View 1 Replies

Java :: Drag Objects Outside The Browser Window?

Mar 8, 2011

Is it possible to drag objects outside the browser window in order to implement file/directory copying from webserver to desktop?

UPDATE: added more tags in order to broaden the choice of methods.

View 1 Replies

Java :: BlazeDS Not Mapping AS Objects Correctly?

Mar 25, 2011

I have 2 java classes that are the same (imagine the getters and setters):

class ScheduledEvent {
private String eventName;
private List<eventValues> values; [code]....

Now there is a reason why there are two classes that are the same.When something is "scheduled", I should get the ScheduleEvent object and when an event is started, I should get the StartEvent object.And depending on the object I get back, I do different things.My problem is that, on the backend, it will send me the ScheduleEvent object, but once it got to the flex side (via BlazeDS), it becomes a StartEvent....

At first, I thought it's because these two events have exactly the same variables, so I tried changing ScheduledEvent by adding a dummy variable (String foobar) but that didn't seem to make a difference.

EDIT: I'm using BlazeDS messaging system.That's why I am not using "one java method call to one responder" approach. So, in the message.body, I should be getting ScheduledEvent but I keep receiving StartEvent. I'm wondering if it's because the two objects have the same property and BlazeDS doesn't know how to map them correctly... I even put a break point in the java service layer, to make sure that the appropriate object is being sent back and it is... But by the time BlazeDS serializes and deserializes it to the flex side, it is now a StartEvent.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved