Grails Errors ,Its Resolution & few Tips

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

set direct url for grails form filling

"/create/$paramOne?/$paramTwo?/$paramThree?/$paramFour?"(controller:'myController',action:'create')

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

org.codehaus.groovy.grails.orm.hibernate.exceptions.CouldNotDetermineHibernateDialectException
Inside DataSource.groovy,
modify as below
dialect='org.hibernate.dialect.H2DialectPatch'

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}"

Comments

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