We can transform the look and feel of almost every element of HTML but it is quite difficult to apply style and change the look of input type file. This tag is use for choosing a file from local machine and upload it on web. In one of my project i have tried to change […]
@Canonical: It’s very useful annotation. It provides the combination of features of @ToString (default implementation of toString() method based upon the fields in the class), @EqualsAndHashCode(default implementation of equals() and hashCode() method of the class based upon the fields in the class) and @TupleConstructor (provides the classical constructor with default properties). [groovy] import groovy.transform.Canonical @Canonical […]
Hi, There was a case where i had to encrypt the HTML output of the GSP before displaying it to user. There are a lot of ways to do it, but i wanted to make is as simple as possible. Hence here is the pattern i used: Note: This is just an example, […]
Have you ever wondered how to overload “plus” operator in Groovy ? It is as easy as adding toppings to your favourite pizza. Let me explain. Let us taka a class for Pizza: [java] @ToString class Pizza { String name List<Topping> toppings double price } [/java] And another for the Topping: [java] @ToString class […]
Recently in one of my project i had a requirement of identifying the class of a property of an object with object class and property name and then determining whether it’s an Enum class or not. I found an easy solution for this using Reflection API. Using Java Reflection you can inspect the fields (member […]
In almost all the applications that we work on, we have to transform elements of a collection in one way or the other. We can do it in different ways. Let there be a domain “Employee” with following attributes: [java] class Employee{ String firstName String lastName Double salary } [/java] And we have 5 Employees: […]
Hi, Suppose you have implemented some logic in your application which updates the Config at runtime. Now after you have updated the config, you should notify the plugins about configChanges such that they reload their configurations. This can be done by firing the onConfigChange Event of the plugins. Similarly you can also […]
HTML 5 provides some very good features, one of it is EDITABLE Elements. It is very helpful in creating dynamic HTML5 applications, and very simple to use. so lets keep the blog short and sweet and see the code which is as follows [html] <h1>Todo List</h1> <ol contenteditable="true"> <li>Enter contents</li> </ol> [/html] you […]
Recently, I learnt something very new e.g. Knockout.js. It is quite a advanced form of javascript. It just simplifies the structure of the javascipt in your application. It basically follows MVVM pattern(Model View View Model). It is quite fast and easy to use as comparison to jquery. Some of it’s key features are :- 1. […]
AngularJSFront End Development
Need For Multiple Views In all previous examples which I used on AngularJS, there was only a single view, i.e. the view displaying the list of youtube videos. Now let’s say we wan’t to display a detail page when a video is clicked. On the detail page, we will display more details about the video […]
Hi, In one of my grails project, i needed to show the comments on any wall post of linkedin through API. I used the Java wrapper to connect any linkedIn account with the grails application which can be seen here. But somehow this library was not working when we need to fetch comments from any […]
Spring security loads the roles of user from user role table based on all roles assigned to user and that role is application specific. But In my project i require to assign roles to user based on instance . So when the instance is changed roles should be changed .In grails we can overide the […]