grails

YUI DataTable - Howto have just one paginator?

Hello, I'm using the YUI DataTable in a Grails 1.1 project using the Grails UI plugin 1.0.2 (YUI being 2.6.1). By default, the DataTable displays 2 paginators: one above and another one below the table. Looking up the YUI API documentation, I could see that I can pass an array of YUI containers as a config parameter but - what are the ...

How to return specific date format as JSON in Grails?

In Grails, you can use the JSON converters to do this in the controller: render Book.list() as JSON The render result is [ {"id":1, "class":"Book", "author":"Stephen King", "releaseDate":'2007-04-06T00:00:00', "title":"The Shining"} ] You can control the output date by make a setting in Config.groovy grails.converters.json.dat...

"public class Foo" v.s. "class Foo" in Groovy domain classes

The following Groovy code creates a GORM-persisted domain class called Foo when written to grails-app/domain/Foo.groovy: class Foo { String someField } However, if I instead write "public class Foo" the class does NOT get GORM-persisted (i.e. no save() method injected, no database table created, etc.): public class Foo { String s...

Where can I find a good example of Open-Flash-Charts and Java

There are a handful of open-flash-charts tutorials on the web, mostly php from what I can see. I know there is a Java helper class, but I haven't found documentation or examples. The helper library is also includes in the ofcharts grails plugin. Java/Groovy or Grails suggestions welcome. thanks! ...

converting video files to .flv format in grails

I am developing a web-application in grails.In that I have implemented video's playing option.For playing video I used the flashplayer plugin .It is working.Now I am planning to implement the feature that user's also can upload their video's.After uploading the video files how to convert those video files to .flv format? or Does flash...

Grails date binding

In Grails, one can 'bindData' in controller: Book b = new Book() bindData(b, params) What if I have a date field with specific format (e.g. yyyy-MM-dd) from user input? In Spring, we can use registerCustomEditor(). How about Grails? ...

Troubleshooting Grails/Groovy memory leaks?

I've got a Grails application that does a fairly decent amount of domain object creation and destruction, and it seems to run out of PermGen space at a very, very rapid rate. I've done the usual tweaks (bumped PermGen to 256M, enabled class GC, etc.), but no dice. Would anyone care to recommend some (and hopefully free or very low-cost...

Performance tuning / Profiling of grails apps

What are your tricks / resources for performance tuning a grails app? I'm developing my first serious grails application, and got the basic functionality to work, so now I'd like to make it go faster. There are some operations that should not take very long but do, and an one that I know can never be fast, but which takes too long even ...

How to store a file in the database with Grails

Hi, I need to store a file in the database using Grails. So, do you know how I can do that? Which data type should I use in the domain class (byte[] might be a solution)? ...

Showing spinner.gif in ajax call on loading time in grails

Hi I am developing a web application in grails which uses lot of ajax.I need to show a spinner.gif image while processing the ajax request.My sample gsp code is <div id="ajax-area"> <g:remoteLink action="list" controller="file" update="ajax-area"> view files </g:remoteLink> </div> In the above code if we click on the view fil...

How to show a second MVC group as a dialog box in griffon

I can see how to instantiate a second MVC group, e.g. def (loginPaneModel, loginPaneView, loginPaneController) = createMVCGroup('LoginPane', 'LoginPane', [:]); view.loginPanel = loginPaneView.loginPanel But I don't want to show as part of my main window. I want it to pop up over it. What do I call to do that? Thanks...

Grails on Eclipse outline problem

Suddenly my eclipse start showing this message every time I hit ctrl+o: "Show Outline" did not complete normally. Please see the log for more information. java.lang.NullPointerException This is the Error Log: java.lang.NullPointerException at org.codehaus.groovy.eclipse.codebrowsing.TextUtils.getNodeOfInterest(TextUtils.java:77) at ...

Correct syntax to add a mime-mapping to web.xml in a grails plugin

I'm trying to add a mime-mapping element to the web.xml. My current best stab is: def doWithWebDescriptor = { xml -> xml + { 'mime-mapping' { 'extension'("htc") 'mime-type'("text/x-component") } } } I know the code is being run as the above actually outputs an invalid web.xml. The follo...

Jaspergrails problem

Hi! I am testing the jaspergrails plugin for Grails. I am following the tutorial for this plugin. I've created a trivial jasper report and I've put it under web-app\plugins\jasper-0.9.5\reports\all-races.jasper I am getting an exception Error 500: java.lang.Exception: No such report spec: reports\all-races.jasper or .jrxml Any hint wh...

How do you use grails to connect to wcf HTTPS endpoin w/ Username authentication?

I'm running a WCF service in IIS7 with Username authentication and Message Security. A client wants but develops using GRAILS. How do they go about connecting and authenticating with the service? Any information would be greatly appreciated thanks. ...

How to use onLoading event in grails remoteFunction

Hi, I am doing a web application in grails.In that I am using remoteFunction in gsp page.It is working now.In that in "onloading" event I want to call "showSpinner()" javascript function.My sample gsp code is : <div class="menuButton" onclick="${remoteFunction(action: 'index', controller: 'file', update: [success: 'ajax', failure: '...

Why do so many insist on dragging the JVM into new applications?

For example, I'm running into developers and architects who are scared to death of Rails apps, but love the idea of writing new Grails apps. From what I've seen, there is a LOT of resource overhead that goes into using the JVM to support languages such as Groovy, JRuby and Jython instead of straight Ruby or Python. Ruby and Python ca...

Beginners problem with Groovy on Grails

Hi! I am a newbie at Groovy and I want to modify one example I've found at the Internet (the blog one). I've defined two classes Post and Comment as follows: class Post { static hasMany = [comments:Comment] String title String teaser String content Date lastUpdated SortedSet comments static constraints = { title(nullable...

Grails and Spring Security: How do I get the authenticated user from within a controller?

I recently moved from the JSecurity plugin to Spring Security. How do I get the authenticated user from within my controllers? ...

Grails 1.0.4 with Acegi 0.4.1 upgraded to Grails 1.1 and Acegi 0.5.1 with problems!

Hi guys! I upgraded my Grails 1.0.4 application to 1.1. I also upgraded from acegi 0.4.1 to 0.5.1! I had some problems but i'm working on it and i think this is my last problem. When i start my grails application i get the following error message: loading security config ... ...