31
2008
Using searchable across domain classes
Mike has done some great sleuthing on how to use Grails uber-cool searchable plugin to search a domain class based on properties of a nested class. This is exactly what I’ve been looking for! Gravl supports multiple blogs per install, and when you are viewing my blog, I want those seaches to be constrained to fulltext search of just *my* blog, not all the data in the blog db. My data model is 1:M from [...]
29
2008
Gravl: Funky Image Preview and Inplace Editing
I’ve been having fun implementing my first cut at Image/File management for Gravl, and along the way I’ve learnt about LightBox and the Scriptaculous InPlaceEditor stuff. First up, I needed a way of doing an image preview, so I could see what all of those PNGs really meant. Lightbox gives you a great way of “overlaying” the preview image as a popup without the need to refresh the page. Very snazzy. I followed the instructions [...]
23
2008
Gravl: Autocompleting and Funky Timelines
If you haven’t had a chance to play with the RichUI plugin, you’ve got to take it for a spin – it’s just fantastic. I’ve been meaning to implement autocomplete for Gravl tags on new blog entries, and with the RichUI plugin (which uses Yahoo Autocomplete under the hood) it’s a total snack. First you declare the RichUI taglibs in your gsp file (note: I’m using the undocumented delimChar setting so that I separate multiple [...]
22
2008
Gravl: Fulltext Search Redux with Searchable
Thanks to a fantastic tip from Karl on yesterday’s post, I’ve got the searchable plugin up and running on my Grails-RC3 install! Here’s the fix from Karl: i‘ve got a working Searchable-0.4-SNAPSHOT wo. npe, this is working with the RCs too. In the plugin‘s java directory u need to slightly modify the org/codehaus/groovy/grails/plugins/searchable/compass/SearchableCompassUtils.java file. Here is the “patched” version: http://rafb.net/p/prsZip92.html (nopaste url) So I patched my version, and I’m up and running. Getting Gravl converted [...]
21
2008
Gravl: Adding Fulltext Search
I’ve just finished adding fulltext search to Gravl, and, while is still needs some more CSS tweaks, it’s working just great. I took the chance to have a good look at the Searchable plugin and it looks awesome! Sadly, it just kept NPEing at me and complaining that it couldn’t find java.lang.Class! Perhaps it’s a victim of the RC-flux, no doubt it will resurface as 1.0 settles in. Anyways, I ripped the SearchService out of [...]
17
2008
Gravl: Referers, Geocoding, Charts
Continuing my obsession with the power of Grails filters, it was time to add some referer tracking and ipaddress Geocoding to Gravl to see where people are coming from. So I created a new RefererFilters class in conf and I was up and running. I already had a little CacheService happening, so I created a new 24 hour cache, scooped up some interesting browser header data, and squirrelled it away for later: // Scoop up [...]
14
2008
Gravl: Implementing Security on the Cheap…
Grails Filters open up a whole new world of opportunity for jumping into the request pipeline to do your own custom processing. I’m really excited about getting Referer tracking real soon now, since I’ve learned the basics of Filters when I implemented Gravl’s very basic security model. The Grails community is working on some first class plugins for Acegi and JSecurity, but for if your security model is coarse grain (authenticated users can do this, [...]
11
2008
Gravl: Mind the dust, we’re live with 0.1
Things are likely to be a little rough around the edges over this way… but welcome to the first live edition of Gravl! A few days ago my Pebble blog data become corrupt, so I was very motivated to get a rough and ready version of Gravl up and going. The code is fairly scrappy around the edges, and there will be issues (particularly not sure which browers will work with the Ajax comment magic [...]
9
2008
Gravl: CriteriaBuilder
Dynamic finders rock! But if you’re querying across tricky many-to-many joins, you might want to take advantage of GORM’s extremely powerful query DSL, criteriaBuilder. Criteria wraps Hibernate’s powerful Restrictions API, and gives you a wealth of expressiveness. For the Gravl archive, I wanted a “by tag” archive option, so you could see just the “groovy-related” archive. Because blog entries have a many to many with blog tags, dynamic finders weren’t going to get me there. [...]
8
2008
Gravl: Screencast, Command objects, Custom Validators, Pagination
Ok. My comment system is now pretty closed to being done, so it’s time to screencast some progress. Here’s a sample of comments in a Gravl Screencast (4mb) I though it might be a good chance to demonstrate command objects, the basic Grails Ajax tags and their usage, and how to handle errors nicely. I’ve added a Ajax “Preview” feature so you can see your comment markup before you post them. I’m using Command objects [...]
Glen Smith
Archives
- January 2012
- November 2011
- October 2011
- September 2011
- August 2011
- July 2011
- June 2011
- April 2011
- March 2011
- January 2011
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- May 2010
- April 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- December 2008
- November 2008
- October 2008
- September 2008
- August 2008
- July 2008
- June 2008
- May 2008
- April 2008
- March 2008
- February 2008
- January 2008
- December 2007
- November 2007
- October 2007
- September 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
- September 2006
- August 2006
- July 2006
- June 2006
- May 2006
- April 2006
- March 2006
- February 2006
- January 2006
- December 2005
- November 2005
- October 2005
- September 2005
- August 2005
- July 2005
- June 2005
- May 2005
- April 2005
- March 2005
- February 2005
- January 2005
- December 2004
- November 2004
- October 2004
- September 2004
- August 2004
- July 2004
- June 2004
- May 2004
- March 2004
- February 2004
- January 2004
- December 2003
- November 2003
- October 2003
- September 2003

An article by Glen