|
In web application development, use of frameworks has become essential . One of those frameworks which help us in making things simpler and life easy is jQuery. |
|
It seems the documentation for this JQuery autocomplete plugin isn't uptodate. Using a remote JSON call is actually easier that you might think from reading the docs. In this example i'm using a Grails controller class called KandidaatController. It contains one method to find Kandidaat objects having a lastname starting with the entered string. The objects found are returned in JSON format. |
|
Here's how to get started with Grails in NetBeans IDE 6.5. Tags: grails; how-to; introduction; |
|
A tutorial showing how do develop a Grails application with a GWT UI. |
|
After I quit looking into the Ext JS library because of the license problems, I wanted to use another AJAX framework which comes bundled with nice widgets. Before I started with Ext I had already looked into The Yahoo! User Interface Library (YUI) but preferred Ext that time. So switching back to YUI makes sense... The only reason I was hesitating was because of Yahoo's possible takeover by Microsoft as it would be uncertain what would happen to YUI on the short and long term. The news that the deal between Microsoft and Yahoo seems to be off the table definitely, made my choise to use YUI easy. Today I created an example on how to use YUI's DataTable within a Grails application. |
|
Grails makes the session object (instance of the Servlet API's HttpSession class) directly available in the Controllers and Tag Libraries. Furthermore, the Grails implementation of HttpSession allows you to access the session as a Groovy map. I wanted to encapsulate session data in a service and avoid defining session properties many places. However, the session is not directly available in a Grails Service. So if you want to access the session from a Service, you do it via the RequestContextHolder class (part of the Spring framework). |
|
An introduction to threading with Groovy. Tags: groovy; threading; |
|
I've been playing around with Grails and a bit of GWT lately, and it sure is a lot of fun. I've made some applications that use Grails, GWT, and GoogleMaps (see: Find A Wii Fit), and thought I'd write a quick tutorial on how to do it - it can be a little tricky. This application is fairly simple - it displays a google map view that is centered on the user's location, and inserts a marker where they are located. I am using MaxMind to turn an IP into latitude and longitude coordinates. They cost money and you may be able to find a free one, but they aren't that expensive (something like $20 for 50,000 lookups) and I've been pretty happy with them so far. |
|
Note: for the following "solution" to be viable you don't have to care about formatting. If you need formatting in your exported file then you will need a special library in which case I can't help :) There were already several Grails posts available with tips on how to get data from Grails to Excel. While the solutions were great, they weren't very well suited to large amounts of data. Most solutions used something like JExcelApi. Even though the library is great, it doesn't perform very well when writing large amounts of data (which is mentioned on the JExcelApi site). Creating new java objects is slow. With JExcelApi you have to create a new object for each cell (you can't change the coordinates of a cell after creating the object so you can't reuse an object). Since I had to export at least 30.000 rows, maybe more, each with 10 columns of data...well...that's a lot of objects. That was only one of the problems though. I was using Hibernate criteria for getting the data that was supposed to go into the Excel file. Usually you do something like below (this is not the actual statement, just an example): |
|
Here is an example of how to perform a query outside GORM and pass it to a view for display in a drop down select ... |