TO THE NEW Blog PAGES

Grails

Groovy Collection method: groupBy()

public Map groupBy(Closure closure) Going through Groovy Collection, I found this powerful method which takes a Closure as parameter & based on the closure, it returns a map in which all unique values returned by closure act as keys. Lets take an example: If you want to group integers between 1 to 100 based on […]

Grails

Restricting all URLs to end with .html in a Grails Application

While going through the grails-users mailing list, I found a question about restricting all URLs to end with ‘.html’ & returning Error 404 for the default mappings. After spending some time, I was able to build a sample CRUD application restricting URLs to end with .html. I did the following steps for the same: 1. […]

Grails

How to use $.getJSON() method of jQuery with grails?

How to use $.getJSON() method of jQuery with grails? Retriving a JSON string from Grails is very easy. You have to just write the following in your controller’s action Let me explain you with an example of populating a HTML table using JSON response: In this example, we have table with columns – name,address and […]

Technology

How to add content to WCM with Java Backed Webscripts?

Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I’ll again point out that if you are starting with Java backed web-scripts to read/write content from/to alfresco wcm, then the example script at http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples is a […]

Technology

How to retrieve data from Alfresco WCM repository using Java backed web-scripts?

Retrieveing contents from Alfresco WCM repository constitutes of two things:- 1) Retrieving the contents of a particular file. 2) Retrieving a list of files from a particular location. We were to achieve this by using Java-backed web-scripts and the example script at http://wiki.alfresco.com/wiki/Java-backed_Web_Scripts_Samples#SimpleWebScript.java was very useful. The abstract class “AbstractRepositoryWebScript.java” used in this example provides […]