Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-11 Thread Ilja Pavkovic | Apliki
Hi,

the same problem occurs with an UploadProgressBar in a nested form. The nested 
form is a div having an onsubmit-tag holding the ajax call to the progress 
bar.

Best Regards,
Ilja

Am Freitag, 4. Dezember 2009 08:38:18 schrieb Igor Vaynberg:
 sounds like we may have to search up the component tree until we find a
  form...
 
 can you create a quickstart and attach it to the jira issue?
 
 -igor
 
 On Thu, Dec 3, 2009 at 10:43 PM, Doug Leeper douglee...@yahoo.com wrote:
  Found the code where the iframe is being used
  (resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js)
 
  When looking at the generated html for the modal window in a nested form
  situation, it shows the submit button actually being submitted by
  wicketSubmitFormById(formId,...)  The formId is the inner form but the
  Form class actually generates a div element instead of a form (not
  the root form) and removes the enctype.  Since the enctype has been
  removed, the Javascript cannot create the iframe as it looking to see if
  the form has the enctype=multipart/form-data...hence the request is
  being sent via Ajax still and not the iframe.
 
  So my thought is that that in the Form.onComponentTag() it should not
  remove the enctype if isMultiPart() is true but add a variable enctype to
  the div...but not sure if this is allowed.
 
  Can someone verify this as this is not my area of expertise (JavaScript
  or Ajax internals)?
 
  Thanks
  - Doug
  --
  View this message in context:
  http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29
 --tp26577255p26635788.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
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

-- 
Ilja Pavkovic
Leitung Entwicklung und Projektsteuerung, Gesellschafter

Bitte beachten Sie unsere neuen Kontaktdaten!

Apliki
Psychologische IT-Beratung
Tempelhofer Ufer 1a
10961 Berlin

Fon +49 · 30 · 99277999 · 0
Mob +49 · 171 · 9342465
Mail ilja.pavko...@apliki.de
Netz www.apliki.de
__
Apliki GmbH  Co. KG, Berlin, AG Charlottenburg, HRA 39114

Persönlich haftend: 
Apliki Beteiligungs GmbH, Berlin, AG Charlottenburg, HRB 104921
vertreten durch: Steffen Eßers, Björn Balazs, Ilja Pavkovic

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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-11 Thread Ilja Pavkovic
Hi,

UploadProgressBar in a nested form also does not work (onsubmit added to a div 
representing the  inner form, but should be added to the onsubmit button of 
the outer form element).

a *very hacky* solution is something like 

boolean added = false;
protected void onBeforeRender() {
if(!added) {
added = true;
add(new UploadProgressBar(progress, this.getRootForm()));
}
super.onBeforeRender();
}

May or may not work, in my prelimary tests this solution works. 

might be better to add the onsubmit code to the most outer form, anyone 
skilled with javascript may help me here :)

Best Regards,
Ilja Pavkovic

Am Freitag, 4. Dezember 2009 08:38:18 schrieb Igor Vaynberg:
 sounds like we may have to search up the component tree until we find a
  form...
 
 can you create a quickstart and attach it to the jira issue?
 
 -igor
 
 On Thu, Dec 3, 2009 at 10:43 PM, Doug Leeper douglee...@yahoo.com wrote:
  Found the code where the iframe is being used
  (resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js)
 
  When looking at the generated html for the modal window in a nested form
  situation, it shows the submit button actually being submitted by
  wicketSubmitFormById(formId,...)  The formId is the inner form but the
  Form class actually generates a div element instead of a form (not
  the root form) and removes the enctype.  Since the enctype has been
  removed, the Javascript cannot create the iframe as it looking to see if
  the form has the enctype=multipart/form-data...hence the request is
  being sent via Ajax still and not the iframe.
 
  So my thought is that that in the Form.onComponentTag() it should not
  remove the enctype if isMultiPart() is true but add a variable enctype to
  the div...but not sure if this is allowed.
 
  Can someone verify this as this is not my area of expertise (JavaScript
  or Ajax internals)?
 
  Thanks
  - Doug
  --
  View this message in context:
  http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29
 --tp26577255p26635788.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
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 

-- 
binaere bauten gmbh · tempelhofer ufer 1a · 10961 berlin

   +49 · 171 · 9342 465

Handelsregister: HRB 115854 - Amtsgericht Charlottenburg
Geschäftsführer: Dipl.-Inform. Ilja Pavkovic, Dipl.-Inform. Jost Becker

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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-04 Thread Igor Vaynberg
1.4

-igor

On Fri, Dec 4, 2009 at 2:13 PM, Doug Leeper douglee...@yahoo.com wrote:

 1.4 trunk or 1.5 trunk?
 --
 View this message in context: 
 http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26641953.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



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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-04 Thread Doug Leeper

I have created a quick start and attached it to WICKET-2595.  I have also
included my suggested fixes to Form.java and wicket-ajax.js.  It got past
the problem of not submitting in an iframe but my AjaxButton.onSubmit is not
being called  and there are no errors generated.

Hope this helps.

- Doug
-- 
View this message in context: 
http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26652425.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: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-03 Thread Doug Leeper

I was also able to reproduce this issue.

When I stepped through the code with NestedForm, the Form.handleMultiPart()
never creates a MultipartWebRequest due to the original request is
identified as an AjaxRequest (as seen by the following code snippet.

code
protected boolean handleMultiPart()
{
if (isMultiPart()  !((WebRequest)getRequest()).isAjax())
{
...
/code

However, when I step through a non-nested Form example (with a File upload)
but utilize an Ajax call, the isAjax() is false.  Which indicates that the
seamless iframe fix is working.
(https://issues.apache.org/jira/browse/WICKET-2420)

Back to the nested form example, I even set the Outer form to be multipart
but it still doesn't work (ajax is still true).

Where is this seamless Iframe fix so I can see where it is applied and why
it is not being used even if the form is set to multi-part?

Thanks
- Doug
-- 
View this message in context: 
http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26635765.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: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-03 Thread Igor Vaynberg
please try with trunk and let us know


-igor

On Thu, Dec 3, 2009 at 8:50 PM, Doug Leeper douglee...@yahoo.com wrote:

 I was also able to reproduce this issue.

 When I stepped through the code with NestedForm, the Form.handleMultiPart()
 never creates a MultipartWebRequest due to the original request is
 identified as an AjaxRequest (as seen by the following code snippet.

 code
        protected boolean handleMultiPart()
        {
                if (isMultiPart()  !((WebRequest)getRequest()).isAjax())
                {
 ...
 /code

 However, when I step through a non-nested Form example (with a File upload)
 but utilize an Ajax call, the isAjax() is false.  Which indicates that the
 seamless iframe fix is working.
 (https://issues.apache.org/jira/browse/WICKET-2420)

 Back to the nested form example, I even set the Outer form to be multipart
 but it still doesn't work (ajax is still true).

 Where is this seamless Iframe fix so I can see where it is applied and why
 it is not being used even if the form is set to multi-part?

 Thanks
 - Doug
 --
 View this message in context: 
 http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26635765.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



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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-03 Thread Igor Vaynberg
the original issue: https://issues.apache.org/jira/browse/WICKET-2491
that fixed this i believe.

-igor

On Thu, Dec 3, 2009 at 9:24 PM, Igor Vaynberg igor.vaynb...@gmail.com wrote:
 please try with trunk and let us know


 -igor

 On Thu, Dec 3, 2009 at 8:50 PM, Doug Leeper douglee...@yahoo.com wrote:

 I was also able to reproduce this issue.

 When I stepped through the code with NestedForm, the Form.handleMultiPart()
 never creates a MultipartWebRequest due to the original request is
 identified as an AjaxRequest (as seen by the following code snippet.

 code
        protected boolean handleMultiPart()
        {
                if (isMultiPart()  !((WebRequest)getRequest()).isAjax())
                {
 ...
 /code

 However, when I step through a non-nested Form example (with a File upload)
 but utilize an Ajax call, the isAjax() is false.  Which indicates that the
 seamless iframe fix is working.
 (https://issues.apache.org/jira/browse/WICKET-2420)

 Back to the nested form example, I even set the Outer form to be multipart
 but it still doesn't work (ajax is still true).

 Where is this seamless Iframe fix so I can see where it is applied and why
 it is not being used even if the form is set to multi-part?

 Thanks
 - Doug
 --
 View this message in context: 
 http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26635765.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




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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-03 Thread Doug Leeper

Found the code where the iframe is being used
(resources/org.apache.wicket.ajax.WicketAjaxReference/wicket-ajax.js)

When looking at the generated html for the modal window in a nested form
situation, it shows the submit button actually being submitted by
wicketSubmitFormById(formId,...)  The formId is the inner form but the
Form class actually generates a div element instead of a form (not the
root form) and removes the enctype.  Since the enctype has been removed, the
Javascript cannot create the iframe as it looking to see if the form has the
enctype=multipart/form-data...hence the request is being sent via Ajax
still and not the iframe.

So my thought is that that in the Form.onComponentTag() it should not remove
the enctype if isMultiPart() is true but add a variable enctype to the
div...but not sure if this is allowed.

Can someone verify this as this is not my area of expertise (JavaScript or
Ajax internals)?

Thanks
- Doug
-- 
View this message in context: 
http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26635788.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: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-01 Thread TahitianGabriel

I've tried what you said, and indeed if you remove the nested form, it works
like a charm for the ajax-upload.
BUT, it breaks other thing (like DatePicker in IE that do not work anymore
in modal window).

It looks like a bug, so maybe you can open a jira...

Regards,

Gabriel.


Martin Dietze wrote:
 
 
 | If you want to use form in modal window component make sure that you put
 the modal window itself
 | in another form (nesting forms is legal in Wicket) and that the form on
 modal window is submitted
 | before the window get closed.
 
 However this seems to break the ajax-upload functionality. 
 I attached a zip with a modified FileUploadPage example. 
 In the example you'll see that the upload does not work.
 If you remove the 'wrapperForm' from the page and add the modal
 window to the page instead of the wrapper form, things are just
 fine.
 
 Just wondering, is this a bug or a feature? I could not find any
 hint that ajax-based uploads have problems with nested forms?
 

-- 
View this message in context: 
http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26596356.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: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-12-01 Thread Martin Dietze
On Tue, December 01, 2009, TahitianGabriel wrote:

 It looks like a bug, so maybe you can open a jira...

Just added WICKET-2595. This bug may be related to WICKET-2433,
but that one was supposed to be fixed in Wicket 1.4.2 while this
problem was observed with 1.4.3.

Cheers,

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
It was hard to code, so it should be hard to understand!

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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-11-30 Thread Igor Vaynberg
try running wicket-examples and see if the ajax upload example works
for you there

-igor

On Mon, Nov 30, 2009 at 8:11 AM, Martin Dietze d...@fh-wedel.de wrote:
 Hi,

  I recently upgraded to wicket 1.4.3 as I heard that from version
 1.4.1 and above file uploads are seamlessly handled even in Ajax
 based components.

 I now implemented a ModalWindow-based component with a Form,
 in it an ordinary FileUploadField and an AjaxButton for
 submitting the form. I placed ModalWindow in another Form as
 proposed by the JavaDoc.

 Now whenever I press the submit button the upload returned by
 the form is always null.

 I tried to find examples for ajax-based uploads in wicket 1.4.1
 and above, but I could find nothing. Now I wonder, did I
 misinterpret the announcement of 1.4.1, or are there any known
 issues? Anything I should read before proceeding?

 Cheers,

 M'bert

 --
 --- / http://herbert.the-little-red-haired-girl.org / -
 =+=
 Doch sie, die mich am meisten gequält, geärgert, betrübt,
 Die hat mich nie gehasset, und hat mich nie geliebt.  --  H. Heine

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



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



RE: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-11-30 Thread Stefan Lindner
The good news are: I did the same a few days ago: file upload in a ModalWindow 
with an AjaxButton for submitting the form containing the file input field.
And it works fine. With all browsers.
Does it work without ModalWindow?

Stefan

-Ursprüngliche Nachricht-
Von: Martin Dietze [mailto:d...@fh-wedel.de] 
Gesendet: Montag, 30. November 2009 17:12
An: users@wicket.apache.org
Betreff: FileUploadField in a ModalWindow (wicket 1.4.3)?

Hi,

 I recently upgraded to wicket 1.4.3 as I heard that from version
1.4.1 and above file uploads are seamlessly handled even in Ajax
based components.

I now implemented a ModalWindow-based component with a Form,
in it an ordinary FileUploadField and an AjaxButton for
submitting the form. I placed ModalWindow in another Form as
proposed by the JavaDoc. 

Now whenever I press the submit button the upload returned by
the form is always null. 

I tried to find examples for ajax-based uploads in wicket 1.4.1
and above, but I could find nothing. Now I wonder, did I
misinterpret the announcement of 1.4.1, or are there any known
issues? Anything I should read before proceeding?

Cheers,

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Doch sie, die mich am meisten geqult, gergert, betrbt,
Die hat mich nie gehasset, und hat mich nie geliebt.  --  H. Heine

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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-11-30 Thread Martin Dietze
On Mon, November 30, 2009, Stefan Lindner wrote:

 And it works fine. With all browsers.
 Does it work without ModalWindow?

I've had no time to check yet. The last thing I did today was
try out the ajax upload example from wicketexamples which
worked. I'll take a look at the sources tomorrow and probably
post again :)

Cheers,

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
I now declare this bizarre open!

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



Re: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-11-30 Thread TahitianGabriel

I've got the same behaviour here : the getFileUpload() return null inside a
ModalWindow (Wicket 1.4.3, Firefox 3.5.5/IE 8).
The test on line 70 of FileUploadField if (request instanceof
IMultipartWebRequest) is always false, so I guess the multipart is not set
correctly, even if I've put setMultiPart(true) in my form.

The Wicket-example application works fine.

Regards,

Gabriel.
-- 
View this message in context: 
http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26582249.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: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-11-30 Thread Stefan Lindner
Do you have
 
 @Override
 protected WebRequest newWebRequest(HttpServletRequest servletRequest) {
  return new UploadWebRequest(servletRequest);
 }

in your Application class?




Von: TahitianGabriel [mailto:glan...@piti.pf]
Gesendet: Mo 30.11.2009 22:30
An: users@wicket.apache.org
Betreff: Re: FileUploadField in a ModalWindow (wicket 1.4.3)?




I've got the same behaviour here : the getFileUpload() return null inside a
ModalWindow (Wicket 1.4.3, Firefox 3.5.5/IE 8).
The test on line 70 of FileUploadField if (request instanceof
IMultipartWebRequest) is always false, so I guess the multipart is not set
correctly, even if I've put setMultiPart(true) in my form.

The Wicket-example application works fine.

Regards,

Gabriel.
--
View this message in context: 
http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26582249.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





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

RE: FileUploadField in a ModalWindow (wicket 1.4.3)?

2009-11-30 Thread TahitianGabriel

I've added the UploadWebRequest and I still have the same problem.

Is UploadWebRequest not only for UploadProgressBar as stated in the Javadoc?



Stefan Lindner wrote:
 
 Do you have
  
  @Override
  protected WebRequest newWebRequest(HttpServletRequest servletRequest)
 {
   return new UploadWebRequest(servletRequest);
  }
 
 in your Application class?
 
 

-- 
View this message in context: 
http://old.nabble.com/FileUploadField-in-a-ModalWindow-%28wicket-1.4.3%29--tp26577255p26583667.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