Shaurav

Grails

Instance based login in spring security core

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 methods of plugin. So when instance change...

26-Sep-2012

Grails

Modify tinymce image/link dialog content in grails

Recently in a project i used tinymce where i needed to modify the image/link dialog of tinymce. To modify tinymce firstly make it inline/custom plugin means download and paste in javascript folder. To modify image dialog , create a gsp that you want to show in dialog box and paste in [java] ...

28-Aug-2012

Technology

get totalCount of records when using limit in one Query

For pagination we generally execute two query ,first for geting resultset by using limit in sql query and second to count the total no. of records . For total no. of records we again execute the same query with count(*). You would need two queries like these: [java] SELECT COUNT(*) FROM author WHERE name LIKE 'a%'; SELECT name,...

17-May-2012