Services are the place in the grails where we write all our data persistence code and business logic. So it is important that these services should be Transactional and they are. By default all the services in the grails are Transactional, it means all the data...
Following is a way I generally use to pass the parameters from GSP to action <g:link controller="myController" action="MyAction" params="[key1: val1, key2: val2]">Link</g:link> but when number of parameters increases it...
It’s a good practice to move all the re-usable configuration settings in the config file which can be read in controllers, tag-lib and services easily. Also you can get the application context in services, controllers and tag-lib easily for injecting the beans....
To delete the branch from remote: git push origin --delete <branchName> To delete the branch locally: git branch -D <branchName> For aborting the merge, follow the sequence: git merge --abort git reset --merge To revert the last commit (which has not been...
WHAT IS ELECTRICAL ENERGY ? Kinetic Energy of the generator or Chemical Energy of the cell is converted into Electrical Energy which flows through the circuit and is converted back into Light, Heat, and kinetic Energy. Energy flows from source to load. ELECTRICAL...
In my current Grails project I am using PostgreSQL database so I just wanted to share the method to integrate PostgreSQL with Grails project. Step 1: Install PostgreSQL on Linux To install postgreSql use this command:- sudo apt-get install postgresql The default...
Basics Current transformers (CTs) are sensors used to measure alternating current. They are particularly useful for measuring whole building electricity consumption (or generation for that matter). Like any other transformer, a current transformer has a primary...
Working with Google Map and add marker and lines on Map. This tutorial is explaining how to start with Google Map. 1) First create a account on developer console and create project and generate public key. 2) Create a html page. <!DOCTYPE html> <html>...
Handle JSON request in Grails In controller we get request parameters by using params. But whenever a JSON request comes on controller we can’t get its parameters on the params. To get JSON request parameters we have to use...
In Grails we often use Grails Scaffolding Templates using defscaffold = true in our Controller which automatically creates CRUD operations. Scaffolding uses the templates for code generation which can be installed by this command:- grails install-templates The...
Easy steps for Stripe Integration with Grails. This blog will help you to integrate stripe in your grails application. Step 1) Create an account on Stripe. Step 2) Get your secretKey and publishableKey from the Stripe Account . and set the api key in Config.groovy...
SEO stands for Search Engine Optimization. It is a technique which helps search engines find and rank your website higher than the millions of other sites in response to a search query. Improving website ranking is very important to get success in online business....
Inject service inside the src classes Note: A service can be injected inside only those classes which are the Spring Beans. This blog for injecting the service inside the src/groovy classes. To inject the service we need to know about two spring Annotations 1)...
I have worked on register a user with facebook via register plugin. I want to share my experience. Register plugin provide quick and easy solution for registration with your web application with facebook account. At first you need to get app secret key and id from...
Connect to a TCP server by using only a GSP/GPRS module. Hi friends! Embedded is just like to play with hardware, means fun. I am writing this post to share a very common method to connect to TCP server. Now start with hardware requirement. Hardware: We need a...
Hello friends! I am writing this post to share a very common security vulnerability that can be exploited by intruders. It is SQL Injection. What is SQL Injection ? SQL injection happens when you insert some content into a SQL query string, and the result modifies the...
Adding a map in hibernate is fairly easy. Map has key value pair and we’ll be adding a Map in the persistent class. Here’s the persistent class: public class Student { Long id; String firstName; String lastName; Map<String,String> images = new...
We’ll start by adding the maven dependency for selenium which contains most of the web-drivers and we’ll be using Firefox web driver for testing. <dependency> <groupId>org.seleniumhq.selenium</groupId>...
We will be discussing about the git and github account in this blog Git is basically a tool used for the version controlling of the documents. By version controlling we mean that we are maintaining the file where we can monitor all the changes made to it.We can also...
From today I am going to give basic concept on automated functional testing using Geb and Selenium.Today I am going to explain Selenium concept and in next session I will explain Geb and how to use Selenium in Geb. First-of-all be clear that Selenium and Geb are used...
Recent Comments