Janos Cserep wrote:
>
> 4. modify getContentType() and getData() to return your objects (you can
> get
> any HTTP parameter with the getParameter() call of the Resource class in
> getData() so you could pass arguments to theURL like
> http://server/context/.../my/resource/url?id=XkdfG12
>
It t
Gesendet:* Mittwoch, 3. Januar 2007 18:13
*An:* wicket-user@lists.sourceforge.net
*Betreff:* Re: [Wicket-user] Writing byte[] to a WebResponse
or even easier (if you dont need a bookmarkable url)
abstract class ByteArrayLink extends Link {
protected abstract byte[] getbytes();
protected abstract S
free"
_
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Im Auftrag von Igor
Vaynberg
Gesendet: Mittwoch, 3. Januar 2007 18:13
An: wicket-user@lists.sourceforge.net
Betreff: Re: [Wicket-user] Writing byte[] to a WebResponse
or even easier (if you dont need a bookmarkable url)
abstra
or even easier (if you dont need a bookmarkable url)
abstract class ByteArrayLink extends Link {
protected abstract byte[] getbytes();
protected abstract String getfilename();
public void onclick() {
getRequestCycle().setRequestTarget(new IRequestTarget() {
void detach(RequestCycle rc) {}
O
Very short, very quick DynamicWebResource tutorial:)
1. Subclass DynamicWebResource
public class MyResource extends DynamicWebResource {
@Override
protected DynamicWebResource.ResourceState getResourceState() {
return new ResourceState() {
public byte[] getData() {
return "Example".t
; [mailto:[EMAIL PROTECTED] Im Auftrag von
> Philip A. Chapman
> Gesendet: Mittwoch, 03. Jänner 2007 12:03
> An: wicket-user@lists.sourceforge.net
> Betreff: Re: [Wicket-user] Writing byte[] to a WebResponse
>
>
>
>
> The reason you're getting errors in MS Word
working?
>
> Perhaps you could give me a short example
>
> Thanks
> Robert
>
>
>
> Von: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Im
> Auftrag von Philip A. Chapman
> Gesendet: Mittwoch, 03. Jänner 2007 12:03
> An: wicket-user
: Re: [Wicket-user] Writing byte[] to a WebResponse
The reason you're getting errors in MS Word is that you're converting a byte
array into a String using ByteArrayOutputStream's toString() method. A Java
String and a byte array are not always the same thing due to uni
The reason you're getting errors in MS Word is that you're converting a
byte array into a String using ByteArrayOutputStream's toString()
method. A Java String and a byte array are not always the same thing
due to unicode.
Subclass wicket.markup.html.DynamicWebResource so that it returns the
corr
Take a look at DynamicWebResource
If you need an example, look at the wicket-contrib-jasperreports code
in wicket-stuff svn.
Martijn
On 1/3/07, Thullner, Robert <[EMAIL PROTECTED]> wrote:
>
>
>
> Hello
>
> I store a lot of MS Word and Excel files as a byte[] into my database.
> I want to add a f
Hello
I store a lot of MS Word and Excel files as a byte[] into my database.
I want to add a feature to download these files from the database again,
but I did not find a way to do this in Wicket, without writing the
byte[] to a File again.
Is there a way to write a byte[] to a WebResponse? I tri
11 matches
Mail list logo