Kudos to the authors of the JQuery Tagit and Grails Taggable plugins. With these very few lines of code a comfortable user interface for tagging with auto-completion could be established. The code above searches for all tags starting with the given term and returns their name as JSON. JQuery-UI auto-completion passes the partially entered tag in request parameter term. For more information on this concept, checkout the docs of the Grails resources plugin. Since we’ve added resources to our project let’s declare them as a module for the resources plugin. one of tagit/css/tagit-.css and tagit/css/ui-anim_basic_16x16.gif to /web-app/css.We basically need to copy three files contained in the zip: Using the resources plugin for managing our css/js/image resources is also a good idea: grails install-plugin jquery-uiĭownload an unzip the latest version of tagit (1.5 when authoring this post) to some temporary location. Since the Tagit plugin depends on JQueryUI for autocompletion, lets first install this in the application. Setting up JQuery Tagit in the Grails application import īy marking the domain class with the taggable interface it gets injected some methods for manipulating its tags on instance levelĪs well as some new methods on class level: Setting up the ‘to-be-tagged’ domain classes is fairly trivial, the only thing left is to add ‘implements Taggable’ to the ‘to-be-tagged’ domain classes, e.g. TagSpaces is a free cross platform open source personal data manager that lets you take notes and organise files across all your devices. Setting up the ‘to-be-tagged’ domain classĪfter installing the taggable plugin the usual way using grails install-plugin taggable Both play together very well – showing this is the intention of this post. For the frontend side JQuery has a nice plugin called Tagit plugin caring about editing tags and auto-completion. On the application’s side, there’s the Grails Taggable plugin available. In fact there is a very simple and elegant solution for this. In order not to clutter the tagspace too much auto-complete should be available when editing the tags. This page is powered by a knowledgeable community that helps you make an informed decision. 'Flexible structure' is the primary reason people pick TagSpaces over the competition. In a recent Grails project the customer asked for support of a tagging functionality for some domain classes. TagSpaces, Tagging for Windows, and Tabbles are probably your best bets out of the 4 options considered.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |