Announcement Announcement Module
Collapse
No announcement yet.
Best practice Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Best practice

    Thanks for integrating Flex + Spring.

    I succeed to run the testDrive sample on eclipse + tomcat.

    My question is:
    1. Is it possible to run the testDrive sample on Flex Developer? - In Flex Developer IDE there are no option to configure a server (e.g tomcat).
    2. What is the best practice of deveolping flex + spring? To design in Flex Developer and then code and defined the Spring part in eclipse. There must be a faster way of development!

    Thanks

  • #2
    Eclipse with Flex builder plugin

    I succeed to install the Flex Builder plugins
    But the design panel of Flex shows an error:
    "An unknown item is declared as the root of your MXML document. Switch to source mode to correct it."
    So I can not see the components in the MXML design panel

    How to fix it?
    Last edited by isys; Oct 28th, 2009, 01:04 PM.

    Comment


    • #3
      create new Fx project works fine with plugin

      create new Fx project works fine with plugin
      but the testDrive sample has problems with the MXML editor
      All the projects imported from the testDrive sample are not recognized as Fx project, therefor the IDE (eclipse 3.4.2 with flex 3 plugin) can not display the components in the MXML file.

      Some one must have solved this!
      Please help

      Comment


      • #4
        I'm not entirely sure the menu options are exactly the same in FB3, but in the new Flash Builder 4 Beta 2 plugin, you just right-click on the project and select "Add/Change Project Type -> Add Flex Project Type..." and follow the dialogs from there.

        Comment


        • #5
          Is it possible at all to display the testDrive sample in design mode?

          Originally posted by jeremyg484 View Post
          I'm not entirely sure the menu options are exactly the same in FB3, but in the new Flash Builder 4 Beta 2 plugin, you just right-click on the project and select "Add/Change Project Type -> Add Flex Project Type..." and follow the dialogs from there.
          1. I recreated my IDE, install eclipse 3.4.2 with FB4 beta 2 plugin.
          2. Imported the testDrive sample
          3. Run on Tomcat 6

          So fare it works.

          But when I try to open a MXML file in the design editor panel nothing is displayed. (in FB3 an error was shown: "An unknown item is declared as the root of your MXML document. Switch to source mode to correct it."
          )
          .
          Then I tried to follow your instructions to change the project type, which just erase the original structure of the project.
          Sorry it didn`t help.

          Is it possible at all to display the testDrive sample in design mode?

          Comment


          • #6
            The trick is that you've got to set everything up to mimic the Maven build. Here are the steps I just went through for the "insync01" project as a test. This assumes you've already got all of the projects imported into Eclipse.

            1. Right-click on the project, select "Add/Change Project Type...->Add Flex Project Type..."

            2. Set the Flex SDK Version to Flex 3.4, the Application server type to "J2EE" and "BlazeDS", then click "Next >"

            3. Here is the annoying part...it seems it won't allow you to specify relative paths for the server. So for "Root folder:" click "Browse..." and manually navigate to the equivalent of "../testdrive/src/main/webapp". Set "Root URL:" to "http://localhost:8080/testdrive/". Set "Context root:" to "testdrive". Click "Validate Configuration". It will probably show a warning saying "Server root is not pointing to a BlazeDS server root folder." but this is okay, things still seem to work. For "Output folder:" click "Browse..." and manually choose the equivalent of "../testdrive/src/main/webapp/insync01". It will show a warning that the folder already exists, but this is okay. Click "Finish"

            4. It will create a blank "insync01.mxml" in the project root...leave it for now. Right-click on the project and select "Properties". Select "Flex Build Path". Switch to the "Source path" tab. For "Main source folder:" click "Browse..." and select the "src/main/flex" folder. Click "OK". You can now delete the empty insync01.mxml, and you should be able to open up the correct one in Design view. If you've got the Tomcat server running, you should also be able to Right-click the project and select "Run As...->Web Application".

            (One last thing I ran into...this may have just been my Eclipse install...I get an error about not being able to generate the HTML wrapper. I was able to right-click on the specific error in the "Problems" view and select "Recreate HTML Templates" and it worked.)

            Also, to answer your original question, my setup is to use SpringSource Tool Suite as the base Eclipse install, and then install Flash Builder as a plugin on top of it. This gives you the best of both worlds in one single environment. I should also note that I'm using the Eclipse 3.5 version of STS, as I had some weird issues with not being able to run Tomcat in Debug mode when installing the plugin on the 3.4 version.

            Comment


            • #7
              Can display in design mode but after editing on mxml then the html disappear

              Originally posted by jeremyg484 View Post
              (One last thing I ran into...this may have just been my Eclipse install...I get an error about not being able to generate the HTML wrapper. I was able to right-click on the specific error in the "Problems" view and select "Recreate HTML Templates" and it worked.)
              Thaks alot. But still one problem left.

              I use STS with FB4 plugin and followed your instructions.
              1. The insyn01.mxml is displayed in design mode.
              2. Run the testDrive on Tomcat. Great
              3. I edit insyn01.mxml by rename the search button in design mode.
              4. Then Run the testDrive on Tomcat. The browser failed: HTTP Status 404 - /testdrive/insync01/insync01.html
              After investigating I found out that a html file should be created in the path "testdrive\src\main\webapp\insync01".
              I think that some definition is missing. No insync01.html file was created.
              How to define in the insync01 flex project to create the html file and locate in /testdrive/insync01/insync01.html ?
              Last edited by isys; Nov 1st, 2009, 10:51 AM.

              Comment


              • #8
                Succeeded - able to edit in design mode and run it

                Originally posted by jeremyg484 View Post
                (One last thing I ran into...this may have just been my Eclipse install...I get an error about not being able to generate the HTML wrapper. I was able to right-click on the specific error in the "Problems" view and select "Recreate HTML Templates" and it worked.)
                Before the problem you mention "Recrate HTML Template", there was one more problem with locale iw_IL. I changed it to be en_US, but the problem of HTML wrapper was not in the list of problems. Somehow, now it is listed and I selected "Recreate HTML Templates" and it works.

                Great!! Thanks

                Comment


                • #9
                  Originally posted by jeremyg484 View Post
                  Also, to answer your original question, my setup is to use SpringSource Tool Suite as the base Eclipse install, and then install Flash Builder as a plugin on top of it. This gives you the best of both worlds in one single environment. I should also note that I'm using the Eclipse 3.5 version of STS, as I had some weird issues with not being able to run Tomcat in Debug mode when installing the plugin on the 3.4 version.
                  Thank you for these detailed and informative instructions! Worked great for me.

                  How do I configure my Springsource Tool Suite w/ Flash Builder setup to step debug through the Flex code? For example, I want to step debug through the send() function in the JMS Chat example (jmschat.mxml).

                  I tried to apply your instructions for the "insync01" project to the "insync02" project and set a breakpoint at line 16 of insync02.mxml. Unfortunately, execution does not stop there. I don't know if its because there is a red "f" symbol on top of the insync02 project - which appeared after I followed your above instructions to try to debug it.

                  Any help would be greatly appreciated.

                  Comment


                  • #10
                    Make sure you're using the debug version of the Flash player. The installer for it comes with the Flex SDK download. There is a helpful page here that will detect and display your installed version of the player: http://kb2.adobe.com/cps/192/tn_19245.html

                    Comment


                    • #11
                      Originally posted by jeremyg484 View Post
                      Make sure you're using the debug version of the Flash player. The installer for it comes with the Flex SDK download. There is a helpful page here that will detect and display your installed version of the player: http://kb2.adobe.com/cps/192/tn_19245.html
                      Thanks for the URL! I checked it for my Internet Explorer 8 browser and confirmed I have "Flash Content Debugger ActiveX Player" installed there, with version WIN,9,0,260.

                      I am now working with Eclipse Galileo with Flash Builder 4 Beta plugin installed, using a project that I created as a Flex Project with Application Server Type=J2EE. Unfortunately, I cannot step debug at all, not even through the Java source code - all my breakpoints are ignored.

                      Comment


                      • #12
                        Are you sure you're starting the server in debug mode?

                        Comment


                        • #13
                          The solution I found was to run Adobe Flex Builder 3 in parallel with Eclipse, with Flex Server->Root Folder in Flex Builder set to the same web root folder under wtwebapps as the Eclipse project.

                          1. Start Debug on Eclipse.
                          2. If the .swf files are missing in the web root, force a build in Flex Builder
                          3. Debug <application name> in Flex Builder

                          I can step debug on both the Java and Flex side now. Perhaps this is not working yet with Flash Builder 4 Beta Plugin for Eclipse.

                          Comment

                          Working...
                          X