code: protected AjaxLink<Void> newDownloadLink(final String id, final IModel<DownloadModelBean> model)
  	{
  		final AjaxDownloadBehavior download = new AjaxDownloadBehavior()
  		{
  			/** The Constant serialVersionUID. */
  			private static final long serialVersionUID = 1L;
  
  			/**
  			 * {@inheritDoc}
  			 */
  			@Override
  			protected String getFileName()
  			{
  				return model.getObject().getFilename();
  			}
  
  			/**
  			 * {@inheritDoc}
  			 */
  			@Override
  			protected IResourceStream getResourceStream()
  			{
  				try
  				{
  					return ApplicationExtensions.getResourceStream(WebApplication.get(),
  						model.getObject().getPath(), model.getObject().getContentType());
  				}
  				catch (final IOException e)
  				{
  					getSession().info("Error: " + e.getLocalizedMessage());
  				}
  				return null;
  			}
  		};
  		final AjaxLink<Void> downloadLink = new AjaxLink<Void>(id)
  		{
  			/** The Constant serialVersionUID. */
  			private static final long serialVersionUID = 1L;
  
  			/**
  			 * {@inheritDoc}
  			 */
  			@Override
  			public void onClick(final AjaxRequestTarget target)
  			{
  				download.initiate(target);
  			}
  		};
  		downloadLink.add(download);
  		return downloadLink;
  	}
docs: Factory method for creating the new {@link AjaxLink} for the download. This method is invoked
  in the constructor from the derived classes and can be overridden so users can provide their
  own version of a new {@link AjaxLink} for the download.
  
  @param id
  the id
  @param model
  the model
  @return the new {@link AjaxLink} for the download.