upload files an zone

2013-08-20 Thread nn kk
 Hi all,
I'm new to tapestry and have the following issue. I have a form with upload 
field in it. I use:
@Property
@Persist
private UploadedFile file;

After executing a button action, I try to refresh a zone, out of the form, and 
to fill it with the file content. Without zone it works fine, but I do not want 
to refresh the whole page, just the dynamic content part, so I put the zone, 
but after that I got some problem with the file persistence - it's not 
persisted at all, when I try to access it, I got null pointer.




  Оригинално писмо 
 От:  nn kk 
 Относно: How to add dinamic content
 До: users@tapestry.apache.org
 Изпратено на: Неделя, 2013, Август 18 14:28:32 EEST
 
 
  Hi all,
 
I want to be able to create and insert component dynamicly. For example, I want 
to have quot;add buttonquot; and by every click to add whole new tapestry 
page or component. I don't know how many addings will I have, I want this to be 
handeled dynamicly. It's like using spring to return ModelAndView object by 
ajax request and inserting it in some UI container.
 
 -
 Само сега спечели смартфон SAMSUNG и още много награди!виж
 
http://www.specheli.eu/specheli-textgbg.php
 

-
Само сега спечели смартфон SAMSUNG и още много награди!виж
http://www.specheli.eu/specheli-textgbg.php

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



Re: upload files an zone

2013-08-20 Thread Ivan Khalopik
Standard tapestry upload component doesn't work with ajax requests and so
it can not be used in zone.

You can try custom solution like this:

http://mutabra.blogspot.com/2012/07/tapestry-ajax-upload-fixin.html

Or this:

http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/




On Tue, Aug 20, 2013 at 10:31 AM, nn kk inv...@abv.bg wrote:

  Hi all,
 I'm new to tapestry and have the following issue. I have a form with
 upload field in it. I use:
 @Property
 @Persist
 private UploadedFile file;

 After executing a button action, I try to refresh a zone, out of the form,
 and to fill it with the file content. Without zone it works fine, but I do
 not want to refresh the whole page, just the dynamic content part, so I put
 the zone, but after that I got some problem with the file persistence -
 it's not persisted at all, when I try to access it, I got null pointer.




   Оригинално писмо 
  От:  nn kk
  Относно: How to add dinamic content
  До: users@tapestry.apache.org
  Изпратено на: Неделя, 2013, Август 18 14:28:32 EEST
  
  
   Hi all,
  
 I want to be able to create and insert component dynamicly. For example, I
 want to have quot;add buttonquot; and by every click to add whole new
 tapestry page or component. I don't know how many addings will I have, I
 want this to be handeled dynamicly. It's like using spring to return
 ModelAndView object by ajax request and inserting it in some UI container.
  
  -
  Само сега спечели смартфон SAMSUNG и още много награди!виж
  
 http://www.specheli.eu/specheli-textgbg.php
  

 -
 Само сега спечели смартфон SAMSUNG и още много награди!виж
 http://www.specheli.eu/specheli-textgbg.php

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




-- 
BR
Ivan


Re: upload files an zone

2013-08-20 Thread Lance Java
Unfortunately file upload in browsers is pretty archaic and ajax upload is
quite difficult and requires a trick or two. For this reason tapestry-core
only supports non-ajax file upload out of the box.

If you use tapestry-jquery, you can use the ajaxupload component
http://tapestry5-jquery.com/components/docsajaxupload

Taha has also blogged about using valums file-uploader with tapestry
http://tawus.wordpress.com/2011/06/25/ajax-upload-for-tapestry/
https://github.com/valums/file-uploader

I'm sure if you google for ajax file upload you'll find various other
libraries, some supporting drag and drop and multi file upload using
various techniques (including flash) which wouldn't be hard to integrate
with tapestry.