public ApplicationResource addJsFile ( final String fileName ) { if ( Util . empty ( fileName ) ) { throw new IllegalArgumentException ( "A file name must be provided." ) ; } InternalResource resource = new InternalResource ( fileName , fileName ) ; ApplicationResource res = new ApplicationResource ( resource ) ; addJsResource ( res ) ; return res ; }
Add custom JavaScript held as an internal resource to be used by the application .