one good way is to create a custom resource in your application's constructor. it's very easy to do this way. if you're using my contrib-database stuff, you even
get blob support for free via DatabaseResourceStream... see code below

      jon

----

       getSharedResources().add("myResource", new Resource()
       {
           public boolean isCacheable()
           {
               return false;
           }
public IResourceStream getResourceStream()
           {
               try
               {
                   long id = getParameters().getLong("id");
                   X x = (X)getDatabaseSession().load(X.class, id);
                   return new DatabaseResourceStream(x.getBlob())
                   {
                       public String getContentType()
                       {
                           return "application/whatever";
                       }

                       public Time lastModifiedTime()
                       {
                           return Time.now();
} };
               }
               catch (StringValueConversionException e)
               {
                   throw new RuntimeException(e);
               }
           }
       });


Johann Lynch wrote:

Hi Juergen,
Thanks for your response.  I'm still a bit cunfused as to what the appropriate
pattern is for overall binary file transfer.
I tried streaming data out from configureResponse(), tried not calling
super.configureResponse(), etc. but I still cannot get the formula right.  Do I
need to redirect to another page (different from the onClick() handler page)? Should I stream data from onBeginRequest() instead?

Does anyone have an example of this?

Thanks.

--Johann


--- [EMAIL PROTECTED] wrote:

Message: 3
Date: Thu, 11 Aug 2005 21:25:30 +0200
From: Juergen Donnerstag <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [Wicket-user] Streaming binary files to client
Reply-To: [email protected]

      /*  How do I do this in wicket ?
=20
      resp.setHeader("Content-disposition",
              "attachment; filename=3D" +
              document.getFileName());
      */
public class MyPage extends WebPage
{
....
  protected void configureResponse()
  {
      super.configureResponse();
      ...
  }
...
}

Juergen


--__--__--




                
____________________________________________________
Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to