6dollarmillions.in

Creating Flex Spring Maven project in minutes

1. Create a new web project using myeclipse for spring 8.6.1 and click the check box for add maven dependencies

2. follow the remaining steps mentioned in this post http://sureshpaleti.blogspot.com/2010/10/adding-flex-nature-to-myeclipse-web.html

Adding Flex nature to MyEclipse web project

Following are the steps for creating a fully functional flex project with MyEclipse for Spring 8.6.1 (make sure you have 8.6.1. if you dont have it go to the software center and click on the software tab, check for the update version 8.6.1 and click update, once done it will ask for restart, so go and restart my eclipse for spring)

Here are the steps to follow:

1. Create a new web project and scaffold a spring crud flex application.

you have to do this for that right click on the project go to MyEclipse > Scaffold spring CRUD application...

a. select the database schema check box and click next
b. select MyEclipseDerby (default) and click next
c. in the catalog drop down select classiccars and select required tables (ex: customer,payment and click add you should see those tables in the scaffolding list)
d. select Customer as the parent and click next
e. give your own package (ex: com.suresh.test) it will update in all fields and click next.
f. now select the flex check box (if you have problem in clicking next after selecting flex check box, maximize the scaffol spring crud application window, now you should be able to see it) click next
g. select the flex sdk home if you have one or use the default one (i am using flex 4.5.0.17077) and slect the Flex 4.0 radio button and click next
h. in the next screen keep default and click next
i. in the next screen keep default and click next
j. in the next screen keep default and click next
k. final screen is the summary screen click finish.

it will take some time to scaffold the crud application be patient.
ok now the scaffolding is done.

2. Right-click the project > Add/Change Project Type > Add Flex Project Type

3. In that wizard set the Application server type: J2EE, Use remote object access service > BlazeDS

4. Click Next:
-- Root Folder: WebRoot of project
-- Root URL: update URL with project name
-- Context Root: project name

ex:
-- Root folder: C:\Documents and Settings\suresh.paleti\Workspaces\MyEclipse for Spring 8.6\TestFlexSpring\WebRoot
-- Root url: http://localhost:8080/TestFlexSpring
-- Context Root: TestFlexSpring

then click validate configuration and click next

5. An error about Cannot create HTML wrapper will appear. Right-click the error to resolve the issue. If you don’t see the right-click context menu item, it can be resolved by right-clicking on the project > Flex Compiler > un-check "Generate HTML wrapper file". Click OK. Then go back into the Project properties, Flex Compiler and check "Generate HTML wrapper file" to turn it on, and click Ok. clean the project.

6. There will also be an error on the index.template.html file. You can read more about what that file does by following the link, but essentially it's not essential to compiling the flash file or running the application. So, you can turn off the javascript "build" validation for javascript if you want to remove that error. Window > Preferences > Validation > uncheck javascript Build validation

7. Right-click project >Properties > Flex Build Path > Main source folder: change to flex_src. Click OK to apply.

8. Back in project properties > Flex Applications.
-- Remove [project].mxml
-- Add... Manage*.mxml, set one of them as default.
-- Click OK.

9. Notice the Manage*.html and Manage*.swf files are now being generated in the output folder specified in the project Properties > Flex Server > Output folder. The default is WebRoot\[projectname]-debug,

10. Now right click on the project Runas > Myeclipse server application thats it you can see the working application
or
You can start the server, and browse to: http://localhost:8080/[projectname]/[projectname]-debug/Manage[domainobjectname].swf

Hooking Flash builder 4 into Myeclipse for spring

1. First install any version of eclipse i installed eclipse ide for jee developers here is the link http://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/heliossr1

2. Next install the flash builder 4 eclipse plugin, you can dowload it from this link https://www.adobe.com/cfusion/tdrc/index.cfm?product=flash_builder

3. while you are installing flash builder eclipse plugin it will ask you to point to the already installed eclipse and follow the next steps.

4. once you are done with the installation go to the eclipse (helios) folder, you will find dropins folder open it in that you will see com.adobe.flexbuilder.feature.core.nl1.link file, copy this and paste it into the dropins folder of the myeclipse for spring and you are done.

Eclipse Plug-ins

you can find at http://marketplace.eclipse.org

Most Useful Plug-ins

1. Subclipse (SVN)
http://subclipse.tigris.org/update_1.6.x or
http://subclipse.tigris.org/update_1.4.x
if this doesnot work use
http://subclipse.tigris.org/update_1.2.x (3.2+)
http://subclipse.tigris.org/update_1.0.x (3.0/3.1)

Free SVN hosting services
http://www.straw-dogs.co.uk/09/20/6-free-svn-project-hosting-services/

2. Spring IDE(select core,extensions(incubation),extensions/incubation)
http://springide.org/updatesite

3. QuickRex (http://www.bastian-bergerhoff.com/eclipse/features/web/installation.html)
http://www.bastian-bergerhoff.com/eclipse/features

4. Eclipse SQL Explorer
http://eclipsesql.sourceforge.net/

5. M2Eclipse
http://m2eclipse.sonatype.org/sites/m2e or
http://m2Eclipse.sonatype.org/update

6. VeloEclipse
http://veloeclipse.googlecode.com/svn/trunk/update/

7. Log4E
http://log4e.jayefem.de/update

8. EclipseUtilPlugins (https://eclipseutilplugins.dev.java.net/)

9. Ldap Tools
http://cyrone.com/eclipseupdates/

10. Hibernate Synchronizer (http://hibernatesynch.sourceforge.net)

11. HTML Tidy (http://sourceforge.net/projects/eclipsetidy/)

12. JSEditor (http://jseditor.sourceforge.net/)

13. JBoss plugin - improves hibernate productivity
you can find the update sites here https://www.jboss.org/tools/download.html
for galileo - http://download.jboss.org/jbosstools/updates/stable/galileo/

14. Flex pmd eclipse plugin
http://opensource.adobe.com/svn/opensource/flexpmd/plugin/trunk/flex-pmd-eclipse-plugin-site