Java :: Handle Nullable Integer - Flex Remoting Application?

Feb 10, 2011

I have an Application consisting of a Java Server part and a Flash/Flex client, both communicate via BlazeDS. In order to have the same typed Objects on both sites, I use the GAS3 code generator (used by flex-mojos).But now I am facing the problem of handling nullable Integers. The problem is that I have an Object (A) which contains a foreign key ID which is reference an optional Object B. - But I only send the ID to the flex client.On the Java site it is easy:

class A {
private Integer bFk;
getter/setter
}

But on the flex client side, bFk is of type int. And a Flash int can not be null. So the remoting mechanism converts the Java null Integer to 0. After sending it back to the server, the Java bFk becomes 0 even on the Java side. - That is not acceptable, because I need to separate 0 and nullMy first workround is using not a Integer on the Java side, but an new Class NullAbleID, which works a bit like a wrapper/adapter, that wrap an internal int where -1 represent null (I can use -1 for null, because real id will be negative). But when I would using this it means I have to replace all Java Integer ids, by this NullAbleID class.

View 1 Replies


Similar Posts:


Handle M:M Entity Relationships In Flex / Java Web Application?

Dec 21, 2010

I am struggling to come up with a way to efficiently manage Flex entities that have a many-to-many relationships between their JPA/Java counter parts.[code]Both of these entities can exist independently of each other and both have a 1:M relationship with the other. The relationship is not really owned by one side or the other.Within the application there are Flex UI's that sometimes want to see viewers based on movies and other UI's that want to see movies based on viewers.Currently both the Movies.Viewers and Viewers.Movies collections are lazy loaded by JPA which works fine. The problem is that every time I ask a viewer for it's list of movies, then they all get sent over the wire and then within Flex I end up with a bunch of Movie objects that (often, not always) duplicate the ones I already have there.

It seems inefficient at best and could likely cause errors if the duplicate objects are not dealt with.In my real application I have tons of these types of relationships all over some very large object graphs.It almost seems to me that the lazy loaded object collections need to be turned into eagerly loaded collections of foreign keys which are used to explicitly load objects on the Flex side of things. But this seems like I am writing a JPA provider in Flex! Is the correct answer to never store state in a Flex application? (Yikes)I should add that all my value objects have a UID that is created on the server side, so I could somehow use that to find/remove duplicates on the Flex side. But how?

View 2 Replies

Java :: Handle Custom Java Exception In Flex App?

Mar 18, 2010

we are using BlazeDS as a proxy between Flex and Java. The approach is the same as in

[Code]...

View 3 Replies

Actionscript 3 :: Flex Can't Handle Java Socket Data Quickly Enough?

Oct 26, 2011

I'm sending through a socket from java to flex client some data and the flex side can't seem to handle it right. In the java i'm looping over 8 objects and for each object I create a long string 1:lsls:2:3:justexample then the java does writeToSocket("1:lsls:2:3:justexample") for every iteration of the loop. But in the client side, it seems that only 2 out of the 8 arrived. what can be the problem?

View 1 Replies

Handle Application Views In Flex?

Jul 1, 2010

I have a Flex application with three different views. Only one view is shown at a time, and the choice of view depends on what part of the application the user is working with. If it had been an ordinary HTML webapp I would have created three different HTML-templates/pages for each view.

What is the recommended way to handle such application views in Flex?

View 1 Replies

Java :: Batch Several Remoting Calls Within A Single Transaction On Server-side?

May 5, 2011

I am looking the way to batch several remote calls from flex-based application to java-based server, so that they would be processed within a single transaction on the server-side.My idea is to build several services on server-side with setter/getter like operations:

interface MyService1 {
void setField1(long myEntity1Id, int field1Value);
void setField2(long myEntity1Id, int field2Value);

[code]......

View 1 Replies

Actionscript :: Flex - C# Nullable Double To NaN Through Fluorine Gateway

Aug 19, 2010

Is there a way in fluorine to force a nullable double to be passed to flex as NaN? (and vice versa) By default these values are passed as null, but a Number in actionscript is not nullable, so it is converted to 0 by default. I need server side nullable doubles to be NaN in flex, and NaN values from flex to be nullable doubles on the server side.

View 1 Replies

Flash :: How To Build A Remoting Application

Jun 5, 2010

I'm looking for examples (code) of applications that uses Flash (NOT Flex) and Remoting classes for ActionScript 3 (NetConnection). Once there was ARP, a repository of code of this kind, but it seems there is not anymore. I'm trying to figure out how to build an applications that makes heavy use of calls to WebORB and responders. I need an architect point of view, NOT a sample of communication between parts, but a real world scenario.

View 1 Replies

Flex :: Spark DataGrid On Mobile Application Handle Scroll And Selection Item?

Dec 15, 2011

I have a spark datagrid on a mobile application, I set the

interactionMode="touch"

and the dataGrid scrolling is good, I got some problems adding a selectionChange eventListener to it, because scrolling the dataGrid will automatically change the selection and instead simply scrolling it, the function binded will start...

How can I add the touch dalay before select the index, so if I scroll the grid the selection won't change, and it change only if I press the item without scrolling?

View 1 Replies

ActionScript 2.0 :: Application Structure / Flash Remoting & MovieClipLoader

Jul 11, 2007

I'm building an application that is going to use Flash Remoting very heavily. I'm wondering how I should structure my Service connections. Should I put them in each(several) loaded movies or in the root timeline where any loaded move can access them. The latter would cause issues when trying to test each movie individually. But by putting the Service connections in each movie would require imports needed for FR at the top affecting load time. Also, I'm new to using the moviecliploader. I have a few functioning properly, however, is it wise to try and create a "smart" loader? Meaning use one loader having code to zip when the zip.swf is loaded and zag with zag.swf. Or should I just accept, and get in the habit of using a zip loader and a zag loader separately, meaning each loader simply serve a specific function.

View 3 Replies

Java :: Can Flex Be Used For A Desktop Application

Nov 2, 2010

Can Flex be used for a desktop application whose business logic is written using Java? Everything I've read about flex uses a remoting or http protocol to communicate with the backend via a J2EE server, so I'm not sure how that would work for a desktop app (unless an embedded j2ee server was running in the app).

View 4 Replies

Flex :: Actionscript - Wrap A Java Applet Around A Flex Application?

Oct 20, 2009

I'm just learning about Flex and I'm loving it. Unfortunatly I still have to make the decision on which RIA technology to use and its dependent on, among other things, from the following case: How can we wrap a java applet around a Flex application? More specifically, I would like to wrap/integrate NASA's World Wind applet in a Flex panel, similar to what Adrew Trice did with the Google Earth API.

An alternative would be id Flex would support direct access to the 3D hardware through OpenGL or DirectX. But I do not think that that is the case yet, not even through AIR.

View 2 Replies

Flex :: Execute An External EXE From AIR Or Java Web Application

Aug 14, 2009

Need to execute an external EXE from either a Java web app (running on Glassfish on Windows Server) or from an Flex/AIR desktop app.

View 2 Replies

Java :: Way To Secure A Flex-BlazeDS Application?

Feb 24, 2010

What's the best way to secure a Flex-BlazeDS application? I've googled it an several solutions came up.UPDATE after question from jsight:Flex would login, so on the RemoteObject I'll set Credentials I don't know if there comes authentication and authorization with BlazeDS (WebORB for instance does and WebORB looked at BlazeDS for their product) SSL not needed 've seen some links on the internet talking about spring security, so I'll check that out.

View 1 Replies

Java :: Deploy A Flex+blazeds Application?

Mar 23, 2010

I developed an application using flex+java+blazeds with tomcat that provide flex enviroment.I want to deploy my application using tomcat but I can't, how can I deploy my app?

View 2 Replies

Flash :: Flex - Embedding A UI In A Java Application

Oct 10, 2010

What's out there that lets you do this? Are there any OSS projects or maybe something a little more popular than this:[URL]? This does exactly what I'm suggesting (i.e. cuts out the need for Swing UI for the most part) but for a number of reasons I'd be interested in any better alternatives. alternatives would need to support the Flex SDK.

View 3 Replies

Java :: Flex GUI Compatibility For Desktop Application?

Feb 10, 2012

i want to know if it is possible to create GUI for java desktop based application in Adobe FLEX.

or any other powerful framework to make rich GUI interfaces for Java desktop applications.

View 1 Replies

Java :: Flex Application Resets Connection When Using XmlSocket?

Mar 23, 2010

[URL]

I am using the same java server given there. and I am creating the XmlSocket in a flex air application. When I run my air application I get a java.net.SocketException connection reset at the java server.

Both are stand alone applications on my desktop.

Flex Code:

<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" initialize="init()">

[Code].....

View 1 Replies

Java :: Embed A Jar File Inside A Flex Application?

Jan 30, 2011

I have a great idea and I want to build a flex application around a .jar file. Is there a way I can go by embedding a jar file into the flex application?

View 1 Replies

Flex :: Develop A Video Chat Web Application In Java?

Apr 19, 2011

Currently we are in the design phase of an application that will allow two users to communicate with each other using chat and video (with audio), the application is a web application that currently is a java web app with Spring and hibernate, but we want to incorporate video and chat between two users and we are evaluating the options to developing it, so far we have two choices, either develop a Flex UI that leverages its video and chatting capabilities through Red5 or something like that and communicates with the Spring app using BlazeDS or a completely java based approach using (maybe) JMF and/or applets to achieve the video and chat interaction. The question is, which would be the most scalable approach to develop such an application?, what would be the approach that is the least intrusive from the end user perspective?

View 2 Replies

Java :: Flex - AIR - Build An Application To Run In Local Mode

Dec 20, 2011

I don't know really well the diference between AIR and FLEX, i do with Java tought, My question is that I want to build an application to run in local mode, but maybe in the future I want it to be available trought the web, The basic sequence diagram is the following: So I want the client to connect to a server for login information, and for storing some data, and I don't know wich one of the three technologies is the best..

View 2 Replies

Flex :: Mx:method, Mx.rpc.remoting.mxml.RemoteObject, And Sub-classing Mx.rpc.remoting.mxml.RemoteObject?

May 6, 2010

I am looking to subclass RemoteObject. Instead of:

<mx:RemoteObject ... >
<mx:method ... />
<mx:method ... />

[code].....

View 1 Replies

Java :: Embed A Flex Component In A Pure Android Application?

Sep 7, 2010

I know it is possible to develop a full flex application using AIR for android but what I need is to embed a flex component into an already existing classic java android application.

I found some flash players in java but they all either require a JFrame or include of specific windows dlls.

View 2 Replies

Java :: Externalizing Client ChannelSet Configuration For Flex Web Application?

Dec 10, 2010

I am looking for an approach that will allow me to (somehow) dynamically pass the server name, server port, and web context to my Flex client so it can create a ChannelSet for it's RemoteObjects to use. These three properties are, of course, readily available to my Java server-side code so I just need a way to get them to the client.

By default, Adobe says you should compile your Flex application against the server configuration file "services-config.xml". This is a highly inflexible practice that Spring says should be avoided (I agree).

One popular approach is to use Flex's http service to download an XML configuration file. I like this idea, but I don't want to hard-code an XML file and keep it inside my WAR file. Is there a way to dynamically generate this from Java code?somehow use flashvars to pass the properties in from the containing HTML page to the SWF file. But again, I don't want to hard code them into the HTML page. Is there a way (maybe with Javascript?) to dynamically set the value of these when the page loads?

View 1 Replies

Java :: Accesing A File When Deploying In Tomcat A Flex Application?

May 22, 2011

I have two applications: a client in flex and a server in Java. When I deploying the application inside flex builder with the tomcat server inside as well, everything works fine. But now I'm trying to deploy in apache tomcat outside the flex/eclipse builder and I have a problem.I think the problem is with relative/absolute paths but I do not know how to resolve it.In my Java application I have to access a database and a get a file from it. I use a properties to set a path where I want to download that files like this:pacs.ruta=C:\resources\And then I need to access to that file so in use this code:fin = new FileInputStream(pacsRuta+""+f.getName());where f.getName() gives me the name of the file so I get the path of the file with the path I set in pacs.ruta and the files name.

I do not know why it does not work. I tried to put pacs.ruta=/resources/to associate with a folder in my application but It does not work.Could someone give me an advice? Do you think it is the problem? Because the whole application works fine deploying in a tomcat server outside the flex/eclipse builder but when this code is called the application does not work.

View 2 Replies

Java :: Call Method Into An Adobe Flex Mobile Application

Nov 22, 2011

I would like to learn Adobe Flex mobile development.I have created a new project called SampleProject, then I got SampleProject.mxml in default package and SampleProjectHomeView.mxml.[code]How can I call the add and sub methods from the class above in SampleProjectHomeView.mxml?

View 1 Replies

Java :: Java, BlazeDS And Config File For Application?

Nov 11, 2010

I'm programming Rich web applications with Flex and Java on Flex Builder 3 using blazeDS and SharedObjects.Now I need that my program will use configuration file.so, I need that my Java class will read it at the first time but the default path of java to read and write files is c:program filesFlex Builder 3 and not my application directory inside the tomcat webapps directory How can I read the config file from the java class without write the path hardcoded in the java?

View 1 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 :: Structuring System Architecture In A Flex Web Application On A Budget (w/o Java)

May 28, 2010

I started a project a while back using the following architecture from Adobe Developer Article talking about Creating marketing platforms in Flex. I did my first set of coding locally forgetting that my server did not handle Tomcat. So I said okay, and cut some corners and then some other limitation came up and I cut some more corners. Eventually for a good week or two, it was trying to get the project working with making the ends meet. Layers started to merge.

In the end I used a

PureMVC (Presentation/Client) -> ZendAMF (Communication) -> MySql (Data) Layout.

It worked but I never felt as though I had some layer just to take care of all the SQL calls to the data.It just felt hacked together

So should I keep the above setup and just start from the presentation layer and move downwards like they said in the article or is there a better layering (based on a hosting plan that does not handle Java) I could accomplish ?

UPDATE: My current hosting plan - [URL]

View 1 Replies

Java :: Avoid Flex Application Store Temporary Internet Files?

Jan 12, 2012

I've programmed a Java application using BlazeDS and Flex, but i think the problem also occurs in any ajax style application. It's a monitoring application, so requests are made regularly to the server. The browser has stored a large amount of temporary internet files on the client pc even getting it saturated. How I can avoid this? I have seen some articles that say to include variables in the html header as:

[Code]...

View 1 Replies







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