I admit, the word stomped is probably a bit exaggerated.

But in my case the backing model is actually a JPA class, so if wicket picked it up by default, tadaaaa it would be written directly to db..

Johan Compagner wrote:
The problem is that it could be pretty big and then it isnt kept in
memory but streamed to disk. Then you also can do that by getting the
stream and stream it to your wanted location.

Maybe wicket could see it was connected to a byt[] and then autoi
dump, but i dont know if that is a good default.
Yeah this was what I were thinking.. I see what you mean about it being default etc, but that would be up to the users responsibility(to do this or maybe override the filedupload class's method) as with alot of other stuff with wicket..

WDYT?


On 3/29/08, Nino Saturnino Martinez Vazquez Wael
<[EMAIL PROTECTED]> wrote:
Matthew Young wrote:
I suddenly are a bit stomped why you have todo so much when it comes to
uploading files (and yes I am aware that it is only a few more lines of
code)..

What is "todo so much"? You need to tell people what it is exactly, like
put
up some code?  Otherwise no one can tell exactly what you are doing.


Well, I thought it were self explaining...
Anyway, isn't fileupoad just as simple as textfield?

        upload = new FileUploadField("upload");
        form.add(upload);


Well, I suppose adding is, but in order to get it to actually do
something you need to do this aswell, in the onsubmit part of your form:

    |     final FileUpload upload = fileUploadField.getFileUpload();

And this is where it breaks normal procedure.. You could argue that
whats wicket supposed todo with the file? But since I am giving a
compoundModel that has a field taking a bytearray wicket could place the
content in the property...
|
On Sat, Mar 29, 2008 at 4:53 AM, Nino Saturnino Martinez Vazquez Wael <
[EMAIL PROTECTED]> wrote:


As I am getting very used to the wicket way,  using compound models with
my form fields labels an so on.

I suddenly are a bit stomped why you have todo so much when it comes to
uploading files (and yes I am aware that it is only a few more lines of
code).. I think the fileupload field should work just as text field etc..

But as with other stuff I get puzzled by there are probably a very good
reason why it dosent?

--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to