You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Ramazan Pekin <ra...@yahoo.com> on 2007/08/12 23:35:39 UTC

Downloading File

Hi,
  I want to modify response header property for setting filename like this:
  getResponse().setHeader("Content-Disposition","inline; filename=\"MYTABLE.java\"");
  But there is no function for this. Is this any way for this?
  There is another thing:
  On form submit I want to set pageParameters of the predefined 
  BookmarkablePageLink. Is there any limit for the parameter?
   
   protected void onSubmit(){
  openConnection();
  CodeGeneration codeGeneration = new CodeGeneration();
  String code = codeGeneration.generateTableCode(getConnection(), getErrorContainer(), ((Input)((CodeGenerationPage)getPage()).codePanel.getModelObject()).packageName, ((Input)((CodeGenerationPage)getPage()).codePanel.getModelObject()).tableName);
  ((CodeGenerationPage)getPage()).tableName = ((Input)((CodeGenerationPage)getPage()).codePanel.getModelObject()).tableName;
  closeConnection();
  PageParameters parameters = new PageParameters();
  parameters.add("tableCode", code);
  ((CodeGenerationPage)getPage()).dataTableLink = new BookmarkablePageLink("dataTableLink", DataTable.class, parameters);
 }

       
---------------------------------
Yahoo! kullaniyor musunuz?
 Simdi, 1GB e-posta saklama alani sunuyor
http://tr.mail.yahoo.com

Re: Downloading File

Posted by Igor Vaynberg <ig...@gmail.com>.
see DownloadLink

-igor



On 8/12/07, Ramazan Pekin <ra...@yahoo.com> wrote:
>
> Hi,
> I want to modify response header property for setting filename like this:
> getResponse().setHeader("Content-Disposition","inline; filename=\"
> MYTABLE.java\"");
> But there is no function for this. Is this any way for this?
> There is another thing:
> On form submit I want to set pageParameters of the predefined
> BookmarkablePageLink. Is there any limit for the parameter?
>
>   protected void onSubmit(){
> openConnection();
> CodeGeneration codeGeneration = new CodeGeneration();
> String code = codeGeneration.generateTableCode(getConnection(),
> getErrorContainer(),
> ((Input)((CodeGenerationPage)getPage()).codePanel.getModelObject()).packageName,
> ((Input)((CodeGenerationPage)getPage()).codePanel.getModelObject()).tableName);
> ((CodeGenerationPage)getPage()).tableName =
> ((Input)((CodeGenerationPage)getPage()).codePanel.getModelObject()).tableName;
> closeConnection();
> PageParameters parameters = new PageParameters();
> parameters.add("tableCode", code);
> ((CodeGenerationPage)getPage()).dataTableLink = new
> BookmarkablePageLink("dataTableLink", DataTable.class, parameters);
> }
>
>
> ---------------------------------
> Yahoo! kullaniyor musunuz?
> Simdi, 1GB e-posta saklama alani sunuyor
> http://tr.mail.yahoo.com