Add jQuery Plugin In AngularJS via Directive

Directives are markers on a DOM element that tell AngularJS to attach a specified behavior to that DOM element or even transform the DOM element and its children. There are many jQuery plugins which we often need in angularjs  , I was using image slider plugin...

MultiMethod: Method dispatching in Groovy and Java

We know polymorphism is a fundamental concept in Java and groovy supports this concept as well but in enhanced way, do you think how? let us take an example: class MultiMethodDemo{ int multiMethod(String arg){ return 1 } int multiMethod(Object arg){ return 2 } public...

Accessing Domain Constraints:Grails

Constraints provide Grails with a declarative DSL for defining validation rules, schema generation and CRUD generation meta data. For example, consider these class User { String username String password String email int age static constraints = { username size: 5..15,...

Access ServletContext In Grails gsp

ServletContext is used to store global application attributes among other things,e.g In grails controller we can store global application attribute as : def mySetting = servletContext["mySetting"] servletContext["mySetting"] = "foo" asset...

Invocation Sequence Of Grails Filters

Although In most of cases like doing something before each request grails provides the concept of interceptors with in a controller, but if we like to intercept request in more than one controller than grails another functionality comes into picture called Filters....

Return Object from grails taglib

I was having a use-case where I need to use grails taglib, In this taglib I have a tag from which I need to return a map but I struggling with that as grails taglib by default return’s StreamCharBuffer e.g class ObjectReturningTagLib { static namespace =...

Display Customized Error(500) Page

When an exception is generated in server responds to client with status “500” and using this response code we display a message to enduser through UrlMapping like: "500"(controller:"error", action:"display") We can customize...