A few days ago I faced a problem of evaluating dynamic expressions on domain objects. The scenario was that, depending upon the user input, I needed to sort a list of objects on some properties, which were nested deep in the object, e.g., [java] student.course?.college?.name // if a user chose to sort students by college name ...
AOP means Aspect Oriented Programming Enables encapsulation of functionality that affects multiple classes in separate units. Complements Object Oriented Programming. Cross Cutting Concerns : Functionality whose implementation spans multiple modules. Different From OOPS Sometimes we want to implement common functionality...
This application saves user’s time for registration by providing a way through which user can login into application with its twitter credentials. Application will get the user details from his corresponding twitter account and will do the registration programmatically, so user can easily manage account through his twitter account. ...
Different Levels of Logging to Different Appenders or Files: When a project is running, then lot of log messages (all type of log messages e.g. Error, Fatal, Warning, Info, Debug etc.) are logged into a single log file. Many times we try to find the error messages only, instead of debugging the complete application. In that case we...
We are constantly striving to be more productive by minimizing key-strokes for a lot of commonly used shell commands. Alias is one way of achieving it, but it isn't always the answer. Bash auto completion is one feature that I use a lot. To avoid the hassles of working with multiple grails projects, I use this script and for auto...
To run your Grails application on SSL, firstly you need to configure the Tomcat server. Here in this example, I will show how to configure Tomcat instance and run Grails/Java application. For SSL/HTTPS: We need .keystore file. You can generate it by using command“keytool -genkey”. Run this command on linux terminal or window...
Hi, In one of my Grails project, i needed to 'Like' any Facebook wall post using facebook API. I searched about it and found a way to achieve this using Facebook Graph API and thought it worth sharing. To achieve it, we should have a valid facebook access_token, which can be obtained using steps described here. After obtaining a...
Hi, In my recent grails project, i needed to post images to the albums for Facebook Profile/ Fan page/ Group using facebook API. I searched a lot and find a way to achieve this using Facebook Graph API. To post any content over facebook, we need to have facebook access_token which can be obtained using steps described here After...
Hiya.... Last time we met, we were talking about how to get started on Integrating Grails With Weceem CMS. Moving on, when you actually use it in a typical product development scenario, you will more often that end up customizing the content being served by Weceem. So this blog will concentrate on exactly that..... Creating...
While working on my project using Grails 2.0.3, I was getting java.lang.OutOfMemoryError with grails run-war even when my JAVA_OPTS are set. Then while going through documentation and this thread i found how to set jvm args for grails run-war. Just add this code in your BuildConfig.groovy and you are done. [code]...
I was going through the source code of one of the Grails Plugins where I found the use of Spring's BeanDefinitionRegistryPostProcessor to override some configurations that are available in DataSource.groovy. That involved a complete over riding of a PropertyValue definition. It set me thinking about whether there is a way to...
Here we are going to talk about a scenario where there are some records in database which are specific to locale and they need to be displayed as per user's current locale at number of places.Also user can change its preferred locale. For this I preferred to set the user's locale in the session object. There are two ways to do this :- ...