Re: Upload file and display its contents using AJAX

2012-12-05 Thread pureza
Thanks Martin, I had just found
https://issues.apache.org/jira/browse/WICKET-2420 before reading your reply!

I guess that clears things.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Upload-file-and-display-its-contents-using-AJAX-tp4654473p4654510.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Upload file and display its contents using AJAX

2012-12-05 Thread Martin Grigorov
Wicket uses an iframe internally for Ajax file uploads.


On Wed, Dec 5, 2012 at 11:55 AM, pureza  wrote:

> I was able to get rid of the submit button, but I don't understand why it
> works (maybe some wicket magic?).
>
> I have a Form object and in the onSubmit() method I read the uploaded file
> and store it in a model. I also added an AjaxFormSubmitBehavior to the form
> that updates the textarea with the contents of the file via ajax.
>
> The markup is simply:
>
>
> This works fine (i.e. when I choose a file to upload the textarea is
> updated
> with the file's contents), but I don't understand why. The form submission
> does not refresh the whole page, but I was told that the only way I could
> do
> this was using an iframe, which I'm not doing. Please note that I am also
> not using any kind of upload library such as jquery-file-upload.
>
> Do you have any idea as to why this works the way it does? I'm clueless...
>
> Thanks!
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Upload-file-and-display-its-contents-using-AJAX-tp4654473p4654508.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com 


Re: Upload file and display its contents using AJAX

2012-12-05 Thread pureza
I was able to get rid of the submit button, but I don't understand why it
works (maybe some wicket magic?).

I have a Form object and in the onSubmit() method I read the uploaded file
and store it in a model. I also added an AjaxFormSubmitBehavior to the form
that updates the textarea with the contents of the file via ajax.

The markup is simply:


This works fine (i.e. when I choose a file to upload the textarea is updated
with the file's contents), but I don't understand why. The form submission
does not refresh the whole page, but I was told that the only way I could do
this was using an iframe, which I'm not doing. Please note that I am also
not using any kind of upload library such as jquery-file-upload.

Do you have any idea as to why this works the way it does? I'm clueless...

Thanks!





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Upload-file-and-display-its-contents-using-AJAX-tp4654473p4654508.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Upload file and display its contents using AJAX

2012-12-04 Thread pureza
Hi again,

I was able to get the desired result by putting an AjaxButton on the form
containing the  component. So, the user selects a file,
presses submit and everything works.

However, I'd prefer if the upload would start immediately after the user
selects a file. Can I get rid of the button?

Thanks.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Upload-file-and-display-its-contents-using-AJAX-tp4654473p4654478.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Upload file and display its contents using AJAX

2012-12-04 Thread pureza
Nick,

As I said on my previous email, I can't access the file contents within an
AjaxBehavior, because FileInputField.getModelObject() is always null (maybe
I'm not setting it up correctly when I instantiate the FileInputField?).



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Upload-file-and-display-its-contents-using-AJAX-tp4654473p4654477.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Upload file and display its contents using AJAX

2012-12-04 Thread Nick Pratt
Once the file is uploaded, set the contents of the IModel backing the
TextArea, and then add the Form(or TextArea) to the AjaxRequestTarget.

On Tue, Dec 4, 2012 at 11:51 AM, pureza  wrote:

> Hi,
>
> I need to upload a file, parse it and display its contents inside a
> textarea, all this using ajax.
>
> At first I tried to use jquery-file-upload, and I was able to upload the
> file to an IResource as explained at
> http://wicketinaction.com/2012/11/uploading-files-to-wicket-iresource/.
> However, I have no idea as to how to display the contents of the file
> inside
> the textarea when the upload is finished.
>
> Then I tried to use a plain FileUploadField component and I attached an
> AjaxFormSubmitBehavior to it, but it seems that the model is always null
> and
> I am unable to access the uploaded files.
>
> Any help is appreciated.
>
> Thanks!
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Upload-file-and-display-its-contents-using-AJAX-tp4654473.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
No.. the field name is "rawInput":

rawInputField = FormComponent.class.getDeclaredField("rawInput");

**
Martin

2009/9/17 Sam Zilverberg :
> I'd rather use some other method than mine, because with mine the validation
> of input is done twice when uploading.
> first on the uploaded file, and then another time on the textarea when
> pressing the wizard's next button.
>
> I tried replacing my "fixup" with this one but got a big fat
> java.lang.NoSuchFieldException
> on getDeclaredField( name) line in the code.
> I got this a couple of times using different names such as
> TextArea.class.getSimpleName() and "serials" (the wicket id for the
> textarea).
>
> Any ideas on what name I should be using?
>
> heres some code and the markup for the wizard page with the upload
> form/textarea :
>
> 
>    
>        
>            
>              
>              
>                File
>                
>                 wicket:id="uploadLabel">upload
>              
>              
>            
>            
>                info
> message  
>                
>            
>        
>    
>
> i'm using  in the markup instead of  type="submit"> as per the example
> because pressing the latter button causes the whole wizard page to validate,
> including the text area which is usualy empty
> in the case of file upload.
>
> Button uploadButton = new Button("uploadButton") {
>                   �...@override
>                    public void onSubmit() {
>                        final FileUpload upload =
> fileUploadField.getFileUpload();
>                        if (upload != null) {
>                            String uploadedContent = new
> String(upload.getBytes());
>                            try {
>                                Field f =
> FormComponent.class.getDeclaredField(TextArea.class.getSimpleName());
>                                f.setAccessible(true);
>                                f.set(textArea, uploadedContent);
>                            } catch (Exception e) {
>                                e.printStackTrace();
>                            }
>                        }
>                    }
> }
>
> On Thu, Sep 17, 2009 at 12:29 AM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> Ah.. forgot that crucial part, the reflection:
>>
>>  public static > void fakeRawInput(T
>> formComponent, String value) {
>>    try {
>>      rawInputField.set(formComponent, value);
>>     } catch (Exception e) {
>>      Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
>> access failed.", e);
>>    }
>>  }
>>
>> where
>>      rawInputField = FormComponent.class.getDeclaredField("rawInput");
>>      rawInputField.setAccessible(true);
>>
>>
>> 2009/9/17 Martin Makundi :
>> > Hi!
>> >
>> >> I currently solved this problem by "filtering" the input from the
>> uploaded
>> >> file and creating a correct object model (Set)  out of it,
>> >> then setting the modelObject of the textarea to be this filtered one.
>> >
>> > Good, so you got the upload part working.
>> >
>> > By reflection I mean that instead of setting model object you could do
>> > this, if necessary:
>> >
>> >  public static > void fakeRawInput(T
>> > formComponent, T existingComponent) {
>> >    try {
>> >      String rawInput = (String) rawInputField.get(existingComponent);
>> >      fakeRawInput(formComponent, rawInput);
>> >    } catch (Exception e) {
>> >      Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
>> > access failed.", e);
>> >    }
>> >  }
>> >
>> > In this way your modelObject state does not change as compared to:
>> >
>> >> simply using setModelObject( (Set) uploadedContent) ?
>> >
>> > But if you can change the model that's definitely cleaner.
>> >
>> > **
>> > Martin
>> >
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Sam Zilverberg
I'd rather use some other method than mine, because with mine the validation
of input is done twice when uploading.
first on the uploaded file, and then another time on the textarea when
pressing the wizard's next button.

I tried replacing my "fixup" with this one but got a big fat
java.lang.NoSuchFieldException
on getDeclaredField( name) line in the code.
I got this a couple of times using different names such as
TextArea.class.getSimpleName() and "serials" (the wicket id for the
textarea).

Any ideas on what name I should be using?

heres some code and the markup for the wizard page with the upload
form/textarea :





  
  
File

upload
  
  


info
message  





i'm using  in the markup instead of  as per the example
because pressing the latter button causes the whole wizard page to validate,
including the text area which is usualy empty
in the case of file upload.

Button uploadButton = new Button("uploadButton") {
@Override
public void onSubmit() {
final FileUpload upload =
fileUploadField.getFileUpload();
if (upload != null) {
String uploadedContent = new
String(upload.getBytes());
try {
Field f =
FormComponent.class.getDeclaredField(TextArea.class.getSimpleName());
f.setAccessible(true);
f.set(textArea, uploadedContent);
} catch (Exception e) {
e.printStackTrace();
}
}
}
}

On Thu, Sep 17, 2009 at 12:29 AM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> Ah.. forgot that crucial part, the reflection:
>
>  public static > void fakeRawInput(T
> formComponent, String value) {
>try {
>  rawInputField.set(formComponent, value);
> } catch (Exception e) {
>  Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
> access failed.", e);
>}
>  }
>
> where
>  rawInputField = FormComponent.class.getDeclaredField("rawInput");
>  rawInputField.setAccessible(true);
>
>
> 2009/9/17 Martin Makundi :
> > Hi!
> >
> >> I currently solved this problem by "filtering" the input from the
> uploaded
> >> file and creating a correct object model (Set)  out of it,
> >> then setting the modelObject of the textarea to be this filtered one.
> >
> > Good, so you got the upload part working.
> >
> > By reflection I mean that instead of setting model object you could do
> > this, if necessary:
> >
> >  public static > void fakeRawInput(T
> > formComponent, T existingComponent) {
> >try {
> >  String rawInput = (String) rawInputField.get(existingComponent);
> >  fakeRawInput(formComponent, rawInput);
> >} catch (Exception e) {
> >  Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
> > access failed.", e);
> >}
> >  }
> >
> > In this way your modelObject state does not change as compared to:
> >
> >> simply using setModelObject( (Set) uploadedContent) ?
> >
> > But if you can change the model that's definitely cleaner.
> >
> > **
> > Martin
> >
>


Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
Ah.. forgot that crucial part, the reflection:

  public static > void fakeRawInput(T
formComponent, String value) {
try {
  rawInputField.set(formComponent, value);
} catch (Exception e) {
  Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
access failed.", e);
}
  }

where
  rawInputField = FormComponent.class.getDeclaredField("rawInput");
  rawInputField.setAccessible(true);


2009/9/17 Martin Makundi :
> Hi!
>
>> I currently solved this problem by "filtering" the input from the uploaded
>> file and creating a correct object model (Set)  out of it,
>> then setting the modelObject of the textarea to be this filtered one.
>
> Good, so you got the upload part working.
>
> By reflection I mean that instead of setting model object you could do
> this, if necessary:
>
>  public static > void fakeRawInput(T
> formComponent, T existingComponent) {
>    try {
>      String rawInput = (String) rawInputField.get(existingComponent);
>      fakeRawInput(formComponent, rawInput);
>    } catch (Exception e) {
>      Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
> access failed.", e);
>    }
>  }
>
> In this way your modelObject state does not change as compared to:
>
>> simply using setModelObject( (Set) uploadedContent) ?
>
> But if you can change the model that's definitely cleaner.
>
> **
> Martin
>
>>
>> On Wed, Sep 16, 2009 at 11:32 PM, Martin Makundi <
>> martin.maku...@koodaripalvelut.com> wrote:
>>
>>> 1. You know how to upload file?
>>> http://www.wicket-library.com/wicket-examples/upload/single
>>> -> or ajax upload
>>>
>>> http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket
>>>
>>> 2. Just put the file contents into textarea with jafa reflection.
>>>
>>> 3. AJax update the textarea:
>>> http://www.wicket-library.com/wicket-examples/ajax/clock.2
>>> -> This is timed update..but similarly just add the textarea into ajax
>>> target.
>>>
>>> **
>>> Martin
>>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
Hi!

> I currently solved this problem by "filtering" the input from the uploaded
> file and creating a correct object model (Set)  out of it,
> then setting the modelObject of the textarea to be this filtered one.

Good, so you got the upload part working.

By reflection I mean that instead of setting model object you could do
this, if necessary:

  public static > void fakeRawInput(T
formComponent, T existingComponent) {
try {
  String rawInput = (String) rawInputField.get(existingComponent);
  fakeRawInput(formComponent, rawInput);
} catch (Exception e) {
  Utils.errorLog(MarkupUtils.class, "Fatal Error: Form field
access failed.", e);
}
  }

In this way your modelObject state does not change as compared to:

> simply using setModelObject( (Set) uploadedContent) ?

But if you can change the model that's definitely cleaner.

**
Martin

>
> On Wed, Sep 16, 2009 at 11:32 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> 1. You know how to upload file?
>> http://www.wicket-library.com/wicket-examples/upload/single
>> -> or ajax upload
>>
>> http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket
>>
>> 2. Just put the file contents into textarea with jafa reflection.
>>
>> 3. AJax update the textarea:
>> http://www.wicket-library.com/wicket-examples/ajax/clock.2
>> -> This is timed update..but similarly just add the textarea into ajax
>> target.
>>
>> **
>> Martin
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Sam Zilverberg
thanks a lot for the help and the links!
I checked them all out, the second one (upload panel) was too complicated
for me atm.
Maybe I'l come back to it when I'l have more experience with wicket.

I liked the timed ajax behaviour example, but couldn't figure out  exactly
how it works so i could use it in my project.
??how does the behaviour know how to update the clock??

I currently solved this problem by "filtering" the input from the uploaded
file and creating a correct object model (Set)  out of it,
then setting the modelObject of the textarea to be this filtered one.

I also didn't understand what you meant by simply using reflection to put
the content of the file into the textarea,
did you mean simply using setModelObject( (Set) uploadedContent) ?

thanks again for all the help so far

On Wed, Sep 16, 2009 at 11:32 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> 1. You know how to upload file?
> http://www.wicket-library.com/wicket-examples/upload/single
> -> or ajax upload
>
> http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket
>
> 2. Just put the file contents into textarea with jafa reflection.
>
> 3. AJax update the textarea:
> http://www.wicket-library.com/wicket-examples/ajax/clock.2
> -> This is timed update..but similarly just add the textarea into ajax
> target.
>
> **
> Martin
>


Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
1. You know how to upload file?
http://www.wicket-library.com/wicket-examples/upload/single
-> or ajax upload
http://blog.demay-fr.net/index.php/2007/12/07/93-simulate-ajax-file-upload-with-wicket

2. Just put the file contents into textarea with jafa reflection.

3. AJax update the textarea:
http://www.wicket-library.com/wicket-examples/ajax/clock.2
-> This is timed update..but similarly just add the textarea into ajax target.

**
Martin

2009/9/16 Sam Zilverberg :
> sounds good, but how do I do this? :)
>
>
> On Wed, Sep 16, 2009 at 9:45 PM, Martin Makundi <
> martin.maku...@koodaripalvelut.com> wrote:
>
>> You could ajax update the textarea after upload, with the content that
>> you want? If you do not want to set the model object then you will
>> have to fake raw input (reflection).
>>
>> **
>> Martin
>>
>>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: upload file content to textarea

2009-09-16 Thread Sam Zilverberg
sounds good, but how do I do this? :)


On Wed, Sep 16, 2009 at 9:45 PM, Martin Makundi <
martin.maku...@koodaripalvelut.com> wrote:

> You could ajax update the textarea after upload, with the content that
> you want? If you do not want to set the model object then you will
> have to fake raw input (reflection).
>
> **
> Martin
>
>


Re: upload file content to textarea

2009-09-16 Thread Martin Makundi
You could ajax update the textarea after upload, with the content that
you want? If you do not want to set the model object then you will
have to fake raw input (reflection).

**
Martin

2009/9/16 Sam Zilverberg :
> In one of my wizard's steps I have a upload form and a textarea.
>
> The textarea is used to enter serial numbers(seperated by newline) and is
> connected to a object property of type Set using a propertymodel.
> I've written a custom converter to turn the entered input to a Set
> and from a Set back to simple string.
>
> When pressing the wizard's next the input is validated and if valid the
> backing model will have Set of serials.
>
> I want the upload form to be used to upload a file containing serial
> numbers.
> I would like that the content of the uploaded file will be placed into the
> textarea, so that when Next is pressed again it is validated.
>
> Is this possible?
> Can I put the file's content into the text area by pressing upload without
> ruining the property model the textarea uses?
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Upload file

2008-03-06 Thread Nino Saturnino Martinez Vazquez Wael

great:) and np..

Pierre G wrote:

ExternalLink works great with relative path (/DownloadedFiles/file1)
and I was able to access the context path 
using getServletContext().getRealPath("/") in Application.init 


Thanks

Pierre


Nino.Martinez wrote:
  



folder.getFiles()[1].toURL() should give the direct url for the file, now
if you want to serve if through wicket then you got to use resources..
Otherwise just create some externalLinks and that should be it..






  


--
-Wicket for love
-Jme for fun

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]



Re: Upload file

2008-03-06 Thread Pierre G

ExternalLink works great with relative path (/DownloadedFiles/file1)
and I was able to access the context path 
using getServletContext().getRealPath("/") in Application.init 

Thanks

Pierre


Nino.Martinez wrote:
> 
> 
> 
> 
> folder.getFiles()[1].toURL() should give the direct url for the file, now
> if you want to serve if through wicket then you got to use resources..
> Otherwise just create some externalLinks and that should be it..
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Upload-file-tp15849850p15868265.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Upload file

2008-03-05 Thread Nino Saturnino Martinez Vazquez Wael

Taken from the example you mention:

|File newFile = new File(getUploadFolder(), upload.getClientFileName());

||newFile.createNewFile();
upload.writeTo(newFile);

Above writes to the file..

This lets you traverse  through the directory..:

|

private Folder uploadFolder = null;


uploadFolder = new Folder(System.getProperty("mysubFolder  "), 
"wicket-uploads");
// Ensure folder exists
uploadFolder.mkdirs();


folder.getFiles()[1].toURL() should give the direct url for the file, now if 
you want to serve if through wicket then you got to use resources.. Otherwise 
just create some externalLinks and that should be it..


regards 




Pierre G wrote:

Thanks Nino,

Sorry, I dont understand. Please be more detailed.
I try to use Folder from util.file package
uploadFolder = new Folder(?, "DownloadedFiles");
then can I use the folder as resource ? how ?

I still dont have any idea how to have my uploadFolder in the context 


Nino.Martinez wrote:
  
Theres file in utils package.. Producing a  url for that  could be  
mounting a  resource and  using the urlfor...


Pierre Gilquin wrote:


I try to modify the upload example
(http://www.wicket-library.com/wicket-examples/upload/single)  for my own
need.
I would like to be able to upload the file in a directory under my
context (ie. tomcat_install/webapps/MyApp/DownloadedFiles) and generate
the corresponding internet url for the files (ie.
http://localhost:8080/MyApp/DownloadedFiles/file1)

How can I get the local and internet paths from my appli. ?

Thanks in advance


Pierre
  
  

--
-Wicket for love
-Jme for fun

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
-Jme for fun

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]



Re: Upload file

2008-03-05 Thread Pierre G

Thanks Nino,

Sorry, I dont understand. Please be more detailed.
I try to use Folder from util.file package
uploadFolder = new Folder(?, "DownloadedFiles");
then can I use the folder as resource ? how ?

I still dont have any idea how to have my uploadFolder in the context 


Nino.Martinez wrote:
> 
> Theres file in utils package.. Producing a  url for that  could be  
> mounting a  resource and  using the urlfor...
> 
> Pierre Gilquin wrote:
>> I try to modify the upload example
>> (http://www.wicket-library.com/wicket-examples/upload/single)  for my own
>> need.
>> I would like to be able to upload the file in a directory under my
>> context (ie. tomcat_install/webapps/MyApp/DownloadedFiles) and generate
>> the corresponding internet url for the files (ie.
>> http://localhost:8080/MyApp/DownloadedFiles/file1)
>>
>> How can I get the local and internet paths from my appli. ?
>>
>> Thanks in advance
>>
>>
>> Pierre
>>   
> 
> -- 
> -Wicket for love
> -Jme for fun
> 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Upload-file-tp15849850p15852279.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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



Re: Upload file

2008-03-05 Thread Nino Saturnino Martinez Vazquez Wael
Theres file in utils package.. Producing a  url for that  could be  
mounting a  resource and  using the urlfor...


Pierre Gilquin wrote:

I try to modify the upload example 
(http://www.wicket-library.com/wicket-examples/upload/single)  for my own need.
I would like to be able to upload the file in a directory under my context (ie. 
tomcat_install/webapps/MyApp/DownloadedFiles) and generate the corresponding 
internet url for the files (ie. 
http://localhost:8080/MyApp/DownloadedFiles/file1)

How can I get the local and internet paths from my appli. ?

Thanks in advance


Pierre
  


--
-Wicket for love
-Jme for fun

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]