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

  • Richui

    Does ROO provide anything like the Grails RICHUI plugin?

  • #2

    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:

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

    <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.