@ RequestMapping ( "/submission" ) public final String submission ( @ RequestParam ( value = "id" , required = false , defaultValue = "SUBN1" ) final String idString , @ RequestParam ( value = "db" , required = false , defaultValue = "schoeller" ) final String dbName , final Model model ) { logger . debug ( "Entering source" ) ; final Root root = fetchRoot ( dbName ) ; final RenderingContext context = createRenderingContext ( ) ; final Submission submission = ( Submission ) root . find ( idString ) ; if ( submission == null ) { throw new SubmissionNotFoundException ( "Submission " + idString + " not found" , idString , dbName , context ) ; } final GedRenderer < ? > submissionRenderer = new GedRendererFactory ( ) . create ( submission , context ) ; model . addAttribute ( "filename" , gedbrowserHome + "/" + dbName + ".ged" ) ; model . addAttribute ( "submissionString" , submission . getString ( ) ) ; model . addAttribute ( "model" , submissionRenderer ) ; model . addAttribute ( "appInfo" , appInfo ) ; logger . debug ( "Exiting submission" ) ; return "submission" ; }
Connects HTML template file with data for the submission page .