Results 1 to 2 of 2

Thread: Richui

Hybrid View

  1. #1
    Join Date
    Jun 2006
    Posts
    25

    Default Richui

    Does ROO provide anything like the Grails RICHUI plugin?

  2. #2
    Join Date
    Mar 2008
    Location
    Sydney, AU
    Posts
    974

    Default

    Hi,

    I am not an expert on this Grails plugin but from what I can gather it provides a tag library abstraction on top of a number of JavaScript libraries. This offers you the convenience of using JavaScript based libraries without the need to know too many details about them.

    Roo does offer a similar approach by leveraging the Spring JS project. Spring JS currently offers an abstraction on top of Dojo but support for other libraries is also planned. So for example to get a date chooser installed in your form RichUI would require you to use the following tag:

    Code:
    <richui:dateChooser name="birthday" format="dd.MM.yyyy" />
    Spring JS does offer the same functionality via:

    Code:
    <script type="text/javascript">Spring.addDecoration(new Spring.ElementDecoration({elementId : "brithday", widgetType : "dijit.form.DateTextBox", widgetAttrs : {datePattern : "dd.MM.yyyy", required : false}})); </script>
    While this seems a little more verbose initially, it actually offers you a little more flexibility due to the in-built required check. Since both Spring JS and Dojo both come pre-installed in Roo generated applications courtesy of the MVC add-on you can also fall back to using Dojo directly at any time.

    Keep in mind that if you edit your jsp pages in Roo you need to switch off automatic maintenance of them by Roo as it will otherwise overwrite them. We are currently looking into improving this.

    Hope this helps.

    -Stefan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •