Created
          September 26, 2013 23:36 
        
      - 
      
 - 
        
Save abhaytalreja/6722120 to your computer and use it in GitHub Desktop.  
    This is just a simple file for type conversions in Grails.
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | class SimpleController { | |
| def submit = { | |
| def intValue = params.int('paramInt') | |
| def shortValue = params.short('paramShort') | |
| def byteValue = params.byte('paramByte') | |
| def longValue = params.long('paramLong') | |
| def doubleValue = params.double('paramDouble') | |
| def floatValue = params.float('paramFloat') | |
| def booleanValue = params.boolean('paramBoolean') | |
| [ intValue: intValue, shortValue: shortValue, | |
| byteValue: byteValue, | |
| longValue: longValue, doubleValue: doubleValue, | |
| floatValue: floatValue, booleanValue: booleanValue ] | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment