@ SuppressWarnings ( "unchecked" ) private void addParameters ( Model model , HttpServletRequest request ) { for ( Object objectEntry : request . getParameterMap ( ) . entrySet ( ) ) { Map . Entry < String , String [ ] > entry = ( Map . Entry < String , String [ ] > ) objectEntry ; String key = entry . getKey ( ) ; String [ ] values = entry . getValue ( ) ; if ( null != values && values . length > 0 ) { String value = values [ 0 ] ; try { model . addAttribute ( key , getParameter ( key , value ) ) ; } catch ( ParseException pe ) { log . error ( "Could not parse parameter value {} for {}, ignoring parameter." , key , value ) ; } catch ( NumberFormatException nfe ) { log . error ( "Could not parse parameter value {} for {}, ignoring parameter." , key , value ) ; } } } }
Add the extra parameters which are passed as report parameters . The type of the parameter is guessed from the first letter of the parameter name .