Announcement Announcement Module
Collapse
No announcement yet.
How to use dojox in a roo generated application. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to use dojox in a roo generated application.

    I have seen quite a few questions regarding the use of dojox in roo applications. Here is a recipe for how I got it to work (mostly). I hope this helps someone out.

    The first step is to get dojox into your environment. I found this post that stated that webflow is compatible with dojox.

    So the first thing I did was modify my pom.xml...

    Add the repository like this:


    Code:
    <repository>
        <id>org.springframework.maven.snapshot</id>
        <name>Maven Central Compatible Spring Snapshot Repository</name>
        <url>http:// maven.springframework.org/snapshot</url>
    </repository>

    then change the version on the maven dependency:

    Code:
    <dependency>
                <groupId>org.springframework.webflow</groupId>
                <artifactId>spring-js-resources</artifactId>
                <version>2.2.0.BUILD-SNAPSHOT</version>
            </dependency>
    Now you need to modify the util/load-scripts.tagx file to include dojox. That's really it... dojox loads fine...

    Hope this helps someone out... BTW) This should not be necessary in the next version of roo.

  • #2
    Roo practices

    I use Roo list.jspx for rendering grids... It is really good btw.
    Is there a good reason for switching to dojox grid ? I have like several (5-6) Roo already in production using grids. Question: Do I will have to rewire all my controls because of the switch to dojox? I'll do the switch if it is worthy

    Thx
    jD

    Comment


    • #3
      I agree that the roo list.jspx does a great job for rendering grids. The appeal for dojox grids for me is that they support AJAX. So I can write a controller that renders json and consume that in the Grid. It's really a matter of preference honestly.

      You can selectively use dojox in a roo generated application (for example switch out one "list" to use dojox). To do it you probably only need to modify the tagx files associated with the page you want to use dojox on.

      Really unless you are looking to use AJAX (or some other feature of dojox) then it's probably not worth the effort. The generated code presents a very nice customizable UI out of the box.

      -LeoD

      Comment


      • #4
        then... You just can do what I did to enable a customized ajax view in a Roo project.

        Description follows:
        Basically on to top of generated code, I added a view where I enabled it.
        I am using ajax-solr api -not dojox- which uses jQuery engine for json-ajax requests. I believe the concept can be applied to any js lib out there. Why? I did such thing?. Roo doesn't create Solr UI code at this point -just create the back-end code -so I had to implemented my way.

        You can visit referred view at http://www.joseanportafolio.org/worldAlmanac/ under the FTS (full text search) menu. This is an example of how Roo projects can easily extended -if you have to.
        Thx
        jD

        Comment


        • #5
          Thanks for the link (nice site) and idea...

          This is kind of what I'm leaning towards as well. I'm "converting" an existing spring project (non roo) over to using roo. The existing project uses jQuery and ExtJs. I've been investigating using dojo and dojox instead (mainly because they are already built into roo).

          -LeoD

          Comment


          • #6
            how to get dojox into your environment?

            I have seen quite a few questions regarding the use of dojox in roo applications. Here is a recipe for how I got it to work (mostly). I hope this helps someone out.

            The first step is to get dojox into your environment. I found this post that stated that webflow is compatible with dojox.

            So the first thing I did was modify my pom.xml...
            ok, understood above that, but, how do i get dojox into my enviroment? i already have dijit, but because roo has it for default.

            Comment


            • #7
              same question !!

              Comment


              • #8
                If you are using spring web flow 2.2 (RC1 or later), dojox is included. (You can change your pom as indicated above to update to the latest Spring Web Flow.)

                If you are using an earlier spring web flow, I believe you will need to download dojo, dijit, and dojox and install them locally. Then change your script "include" line to point to your dojo install (e.g., "/appname/scripts/dojo/dojo.js").

                Then to use a dojox widget, you will need to include the appropriate "require" lines for your widget:

                dojo.require("dojox.grid.DataGrid");

                Comment

                Working...
                X