Re: FileUpload and events

2009-10-14 Thread Ian Marshall


Thorsten Scherler-3 wrote:
> 
> You say yours is working? What are you doing
> different?
> 
> ...
> 
> Good catch. Thanks for the heads up.
> 
Please let me know if your problem persists (my code should be essentially
the same as yours now).

Ian
-- 
View this message in context: 
http://www.nabble.com/FileUpload-and-events-tp25816532p25888304.html
Sent from the Wicket - User 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: FileUpload and events

2009-10-14 Thread Thorsten Scherler
On Tue, 2009-10-13 at 06:23 -0700, Ian Marshall wrote:
> 
> Thorsten Scherler-3 wrote:
> > 
> > Nobody any tips or infos?
> > 
> > salu2
> > 
> In the source code for the
> org.apache.wicket.markup.html.form.upload.FileUploadField class there is the
> class-level comment "FILE UPLOADS ARE NOT SUPPORTED BY AJAX. USE GOOGLE TO
> LEARN MORE ABOUT THIS."
> 

Doh! So I need to do some research. 

> I am no expert on the FileUploadField class (you can see my post earlier
> today about that!), but this might have a bearing on your lack of AJAX
> on-change behaviour.

Yeah reading above comment seems like it. Will investigate.

salu2

> 
> Ian Marshall
-- 
Thorsten Scherler 
Open Source Java 

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





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



Re: FileUpload and events

2009-10-14 Thread Thorsten Scherler
On Tue, 2009-10-13 at 08:14 -0700, Ian Marshall wrote:
> I am coding for just this event, to try and work around my own
> FileUploadField problem. My AJAX works using code very similar to yours
> (thanks for the example)!

You are welcome. Need to catch up on your posts around this issue (this
list is quite busy). You say yours is working? What are you doing
different?

> 
> Have you added the line
> 
>   fileUploadFieldSello.setOutputMarkupId(true); ?
> 
> You might need to add the line
> 
>   target.addComponent(fileUploadFieldSello);
> 
> too.

Good catch. Thanks for the heads up.

salu2
-- 
Thorsten Scherler 
Open Source Java 

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





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



Re: FileUpload and events

2009-10-13 Thread Ian Marshall

I am coding for just this event, to try and work around my own
FileUploadField problem. My AJAX works using code very similar to yours
(thanks for the example)!

Have you added the line

  fileUploadFieldSello.setOutputMarkupId(true); ?

You might need to add the line

  target.addComponent(fileUploadFieldSello);

too.
-- 
View this message in context: 
http://www.nabble.com/FileUpload-and-events-tp25816532p25874785.html
Sent from the Wicket - User 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: FileUpload and events

2009-10-13 Thread Ian Marshall


Thorsten Scherler-3 wrote:
> 
> Nobody any tips or infos?
> 
> salu2
> 
In the source code for the
org.apache.wicket.markup.html.form.upload.FileUploadField class there is the
class-level comment "FILE UPLOADS ARE NOT SUPPORTED BY AJAX. USE GOOGLE TO
LEARN MORE ABOUT THIS."

I am no expert on the FileUploadField class (you can see my post earlier
today about that!), but this might have a bearing on your lack of AJAX
on-change behaviour.

Ian Marshall
-- 
View this message in context: 
http://www.nabble.com/FileUpload-and-events-tp25816532p25872841.html
Sent from the Wicket - User 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: FileUpload and events

2009-10-13 Thread Thorsten Scherler
On Fri, 2009-10-09 at 09:19 +0200, Thorsten Scherler wrote:
> Hi all,
> 
> I am implementing a form where I need to upload 2 different files. 
> 
> I want to block the second upload until the user added the first file
> and I validated on the server.
> 
> In my Java code I have:
> fileUploadFieldSello = new FileUploadField("fileUploadFieldSello");
> fileUploadFieldSello.setRequired(true);
> AjaxFormComponentUpdatingBehavior update = new
> AjaxFormComponentUpdatingBehavior(
> "onchange") {
>   @Override
>   protected void onUpdate(AjaxRequestTarget target) {
> // Here goes the call to my business logic for validation
> System.out.println("onchange event triggered");
> 
> fileUploadFieldPdf.setEnabled(true);
> fileUploadFieldSello.setEnabled(false);
> target.addComponent(fileUploadFieldPdf);
>   }
> };
> fileUploadFieldSello.add(update);
> // Add one file input field (sello)
> add(fileUploadFieldSello);
> ...
> 
> Now in my html I have:
> 
>   
> Validación
> 
>   Sello
>type="file"/>
> 
> 
>   PDF
>   
> 
> 
> [[ajax upload progressbar]]
>   
> 
> 
> My problem is that the "onchange" event seems to never got triggered.
> This raises the question whether I need to trigger another event?
> Further somebody knows a good tool to see which the input type"file"
> element is triggering when I select a file?
> 
> TIA for any infos.


Nobody any tips or infos?

salu2
-- 
Thorsten Scherler 
Open Source Java 

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





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



FileUpload and events

2009-10-09 Thread Thorsten Scherler
Hi all,

I am implementing a form where I need to upload 2 different files. 

I want to block the second upload until the user added the first file
and I validated on the server.

In my Java code I have:
fileUploadFieldSello = new FileUploadField("fileUploadFieldSello");
fileUploadFieldSello.setRequired(true);
AjaxFormComponentUpdatingBehavior update = new
AjaxFormComponentUpdatingBehavior(
"onchange") {
  @Override
  protected void onUpdate(AjaxRequestTarget target) {
// Here goes the call to my business logic for validation
System.out.println("onchange event triggered");

fileUploadFieldPdf.setEnabled(true);
fileUploadFieldSello.setEnabled(false);
target.addComponent(fileUploadFieldPdf);
  }
};
fileUploadFieldSello.add(update);
// Add one file input field (sello)
add(fileUploadFieldSello);
...

Now in my html I have:

  
Validación

  Sello
  


  PDF
  


[[ajax upload progressbar]]
  


My problem is that the "onchange" event seems to never got triggered.
This raises the question whether I need to trigger another event?
Further somebody knows a good tool to see which the input type"file"
element is triggering when I select a file?

TIA for any infos.

salu2
-- 
Thorsten Scherler 
Open Source Java 

Sociedad Andaluza para el Desarrollo de la Sociedad 
de la Información, S.A.U. (SADESI)





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