Grails Errors ,Its Resolution & few Tips

set value in params
params.putAt("createdBy", "James")

set direct url for grails form filling


username of spring security user
def principal = springSecurityService.principal
String username = principal.username

Inside DataSource.groovy,
modify as below

sort any domains list in grails

 static mapping = {
 //createdDate default sysdate 
 table "cf_source_cd_mapping"
 id column: "source_map_id", generator:'sequence', params:[sequence:'SOURCE_MAP_ID_SEQ']
 sort id: "desc"

transient in domain
static transients = [ "client","marketingOffer" ]
String client
String marketingOffer

Getting HTTP request param in grails
 String forwardURI = "${request.forwardURI}"
 String contextPath = "${request.contextPath}"
 String queryString= "${request.queryString}"


Popular posts from this blog

Conversion from Clob To String in java and Vice versa

Portable Java 8/ JDK8 setup without admin rights

Multi Threading , Producer consumer problem in Java