Images and Listeners not working on J2EE flex server settings

188 views Asked by At

let me point out that I do not have much experience with flex programming. Now, on to my problem. I have been programming using flex 4 on adobe flesh builder 4 in order to create a website. The site require a connection to java and hence I decided on using blazeDS, in order to do so I updated the flex project's properties and set the flex server from "none\other" to "j2ee" as is required for the use of blazeDs. Ever since this change the site no longer runs as it should, as all the images are not being displayed and all action listeners are no longer working. (The problem is due to the flex server as when I changed it back to none the site worked fine)

Does anyone have any clue as to what needs to be done to solve this issue (or perhaps something I might have missed) as I need the j2ee server, and cant go by without it.

Thanks in Advance

1

There are 1 answers

0
shaunhusain On

Hahaha oh man I wish it were called flesh builder, the flesh light programming IDE, if you don't know what that is don't look it up NSFW :). I didn't actually do the setup for our builds at my work but we also utilize BlazeDS on the server side but don't have the server settings specified, I believe this is only so the application will be deployed to the J2EE instance and the URL opened in the browser will be at that location. Otherwise the steps here should do it:

http://sujitreddyg.wordpress.com/2009/04/07/setting-up-blazeds/

Info on the server setting section which all seem to validate what I said above: http://livedocs.adobe.com/flex/3/html/help.html?content=projects_3.html

We use maven here to do our builds and in the process it uses granite data services (I think) to generate the AS3 equivalent to the Java DTO and adds the RemoteClass metadata for the serialization/conversion from Java to AS3 and vice versa. Maven makes the whole process a lot easier once you have it configured and working. A typical project structure for one of our projects is like

project-root\
project-root\project-client
project-root\project-jar
project-root\project-war
project-root\project-ear

The great thing is we can pull down any project here and it will have that structure (and in the project-war and project-ear there's only a single pom.xml file that defines the extra properties for creating the war and ear archives and manifests). So to build the process is:

svn up

mvn clean install

cd project-client

mvn flexmojos:flexbuilder

cd ../project-jar

mvn eclipse:eclipse

These commands would update the source run a clean install (all the builds specified in the pom file are run, java or flex), then the flexmojos:flexbuilder plugin creates a .project file for the project to be imported into Flash/Flex builder or Eclipse with the plugin. The eclipse:eclipse call does the same (creates a .project file) for importing the java project(s). I know I'm getting way off topic at this point, but if you're managing or running your own business and plan to continue with this workflow of java and Flex I'd suggest checking out maven as it could make your life much easier. (can run the local tomcat instance for testing by typing "mvn cargo:start", can find out about library dependencies by using "mvn dependency:tree -Dincludes=":::1.2.3-SNAPSHOT", finds all depedencies with a particular version number, or could look by type groupId, which is basically top level package and/or artifactId the particular jar or swc, these are just a couple of the plugins I use more commonly but there's a ton).