UploadProgressBar not updating with with ajaxbutton form submit

2012-02-24 Thread bad boy


Hi 

When I submit the form with ajax button, the progress upload  bar is not 
getting  updated with progress. When I submit the same file with the non ajax 
button , the progress bar gets updated correctly. The file is uploaded 
correctly in both cases. I have configure the  webrequest in the wicket 
aplication as

 */
@Override
protected WebRequest newWebRequest(HttpServletRequest servletRequest)
{
return new UploadWebRequest(servletRequest);
}



I attached the  progrss bar as follows :

  final FileUploadForm ajaxSimpleUploadForm = new 
FileUploadForm(ajax-simpleUpload);
  ajaxSimpleUploadForm.addOrReplace(new UploadProgressBar(progress, 
ajaxSimpleUploadForm));

I am using wicket  1.4.18. This is my form




 --div wicket:id=formHolder
 --               form wicket:id=ajax-simpleUpload
 --                   fieldset
 --                       legendUpload form with ajax progress bar/legend
 --                       p
 --                           label for=uploadFile/label
 --                           input wicket:id=fileInput id=upload 
type=file/
 --                           
 --                       /p
 --                       input type=submit value=submit via ajax 
wicket:id=ajax-button/
 --                       input type=submit value=upload / 
 --                       span wicket:id=progress[[ajax upload 
progressbar]]/span
 --                   /fieldset
 --                   
 --               /form


Thanks
badami

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



Re: Ultra strange behaviour AjaxButton - Form

2011-09-04 Thread Clint Checketts
Are you using a custom object? A converter could be failing to do the
conversion. As in you have a 'User' object tied to your field and Wicket
doesn't know by default how to convert the text 'Bob' into a new User
object.

On Fri, Sep 2, 2011 at 11:02 AM, martin.ase...@mail.bg wrote:




 Thanks, this is the case.


 However, I've no idea why the form does validation, since I have no
 required fields in it, nor have specified any validator.


 Best regards,
 Martin


 - Цитат от Ernesto Reinaldo Barreiro (reier...@gmail.com), на
 02.09.2011 в 18:55 -   maybe you have validation errors and in that
 case onError will be
 called instead.


 Regards,


 Ernesto


 On Fri, Sep 2, 2011 at 5:50 PM,  wrote:


 Hello, guys,


 I'm experiencing some very strange problem - an AjaxButton's onSubmit
 never
 gets called.


 Here are snippets of what I have:


 HTML:


 ... some fields...


 in code:


 Form form = new Form(form);


 AjaxButton submitButton = new AjaxButton(submit) {


 public void onSubmit(ART target, Form form) {


 System.out.println(clicked); // never printed


 ... some logic ...


 }


 };


 form.add(submitButton);


 add(form);


 The above statement and logic are never reached.
 The Ajax debugger prints nothing.


 Any help is appreciated.


 Thanks,
 Martin


 -
 Mail.bg: Безплатен e-mail адрес. Най-добрите
 характеристики на българския пазар - 10 GB
 пощенска кутия, 20 MB прикрепен файл,
 безплатен POP3, мобилна версия, SMS
 известяване и други.
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 -
 Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския
 пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна
 версия, SMS известяване и други.



Re: Ultra strange behaviour AjaxButton - Form

2011-09-04 Thread martin . asenov



Thanks, Clint. I found that I had overriden the validate() method of one of
the textfields. Shame on me :) 


Best regards,
Martin  


- Цитат от Clint Checketts (checke...@gmail.com), на
04.09.2011 в 15:21 -   Are you using a custom object? A converter
could be failing to do the
conversion. As in you have a 'User' object tied to your field and Wicket
doesn't know by default how to convert the text 'Bob' into a new User
object.


On Fri, Sep 2, 2011 at 11:02 AM,  wrote:


Thanks, this is the case.


However, I've no idea why the form does validation, since I have no
required fields in it, nor have specified any validator.


Best regards,
Martin


- Цитат от Ernesto Reinaldo Barreiro (reier...@gmail.com), на
02.09.2011 в 18:55 - maybe you have validation errors and in that
case onError will be
called instead.


Regards,


Ernesto


On Fri, Sep 2, 2011 at 5:50 PM, wrote:


Hello, guys,


I'm experiencing some very strange problem - an AjaxButton's onSubmit
never
gets called.


Here are snippets of what I have:


HTML:


... some fields...


in code:


Form form = new Form(form);


AjaxButton submitButton = new AjaxButton(submit) {


public void onSubmit(ART target, Form form) {


System.out.println(clicked); // never printed


... some logic ...


}


};


form.add(submitButton);


add(form);


The above statement and logic are never reached.
The Ajax debugger prints nothing.


Any help is appreciated.


Thanks,
Martin


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския
пазар - 10 GB пощенска кутия, 20 MB прикрепен
файл, безплатен POP3, мобилна
версия, SMS известяване и други.


 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov



Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ...  


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov
 


Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ...  


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin  

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

RE: Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov
Sorry, HTML is:

form wicket:id=form

... some fields...

input type=submit wicket:id=submit class=some_class /

/form




- Цитат от martin.ase...@mail.bg, на 02.09.2011 в 18:50 -



Hello, guys, 


I'm experiencing some very strange problem - an AjaxButton's onSubmit never
gets called. 


Here are snippets of what I have: 


HTML: 


... some fields...


in code: 


Form form = new Form(form); 


AjaxButton submitButton = new AjaxButton(submit) { 


public void onSubmit(ART target, Form form) { 


System.out.println(clicked); // never printed


... some logic ... 


} 


}; 


form.add(submitButton); 


add(form); 


The above statement and logic are never reached.
The Ajax debugger prints nothing. 


Any help is appreciated. 


Thanks,
Martin 

-



-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Re: Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread Ernesto Reinaldo Barreiro
maybe you have validation errors and in that case onError will be
called instead.

Regards,

Ernesto

On Fri, Sep 2, 2011 at 5:50 PM,  martin.ase...@mail.bg wrote:



 Hello, guys,


 I'm experiencing some very strange problem - an AjaxButton's onSubmit never
 gets called.


 Here are snippets of what I have:


 HTML:


 ... some fields...


 in code:


 Form form = new Form(form);


 AjaxButton submitButton = new AjaxButton(submit) {


 public void onSubmit(ART target, Form form) {


 System.out.println(clicked); // never printed


 ... some logic ...


 }


 };


 form.add(submitButton);


 add(form);


 The above statement and logic are never reached.
 The Ajax debugger prints nothing.


 Any help is appreciated.


 Thanks,
 Martin

 -
 Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския 
 пазар - 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна 
 версия, SMS известяване и други.

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



Re: Ultra strange behaviour AjaxButton - Form

2011-09-02 Thread martin . asenov



Thanks, this is the case. 


However, I've no idea why the form does validation, since I have no
required fields in it, nor have specified any validator. 


Best regards,
Martin  


- Цитат от Ernesto Reinaldo Barreiro (reier...@gmail.com), на
02.09.2011 в 18:55 -   maybe you have validation errors and in that
case onError will be
called instead.


Regards,


Ernesto


On Fri, Sep 2, 2011 at 5:50 PM,  wrote:


Hello, guys,


I'm experiencing some very strange problem - an AjaxButton's onSubmit
never
gets called.


Here are snippets of what I have:


HTML:


... some fields...


in code:


Form form = new Form(form);


AjaxButton submitButton = new AjaxButton(submit) {


public void onSubmit(ART target, Form form) {


System.out.println(clicked); // never printed


... some logic ...


}


};


form.add(submitButton);


add(form);


The above statement and logic are never reached.
The Ajax debugger prints nothing.


Any help is appreciated.


Thanks,
Martin


-
Mail.bg: Безплатен e-mail адрес. Най-добрите
характеристики на българския пазар - 10 GB
пощенска кутия, 20 MB прикрепен файл,
безплатен POP3, мобилна версия, SMS
известяване и други.   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org


 

-
Mail.bg: Безплатен e-mail адрес. Най-добрите характеристики на българския пазар 
- 10 GB пощенска кутия, 20 MB прикрепен файл, безплатен POP3, мобилна версия, 
SMS известяване и други.

Re: AjaxButton + Form

2010-12-02 Thread alex shubert
Sure. Just add a Form and AjaxButton and see.
I replaced Button with Link as assembly of object to be ready before
button handler called sounds reasonable for me.

On 1 December 2010 17:46, Andrea Del Bene adelb...@ciseonweb.it wrote:
 That sounds strange. AjaxButton implements  IFormSubmittingComponent
 interface,  hence it should first invoke its onsubmit method and then parent
 form's onSubmit (as described in Form class JavaDoc).

 Is your AjaxButton inside form's hierarchy?

 It is
 public final void onFormSubmitted()

 No, Form#onSubmit is not called at all. After successful execution of
 internal submission trace proceed to
 AjaxButton#onSubmit(AjaxRequestTarget target, Form?  form)






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





-- 
Best regards
Alex

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



Re: AjaxButton + Form

2010-12-01 Thread Andrea Del Bene
That sounds strange. AjaxButton implements  IFormSubmittingComponent 
interface,  hence it should first invoke its onsubmit method and then 
parent form's onSubmit (as described in Form class JavaDoc).


Is your AjaxButton inside form's hierarchy?

It is
public final void onFormSubmitted()

No, Form#onSubmit is not called at all. After successful execution of
internal submission trace proceed to
AjaxButton#onSubmit(AjaxRequestTarget target, Form?  form)



   



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



AjaxButton + Form

2010-11-30 Thread alex shubert
Hello!

May someone explain me, why AjaxButton must call his parent form
onSubmittion? It surely did becouse of
@Override
protected void onEvent(AjaxRequestTarget target)
{
getForm().getRootForm().onFormSubmitted();
 ...


Why to submit form if it's Ajax request?

The real example: I have a filterForm with some fileds where entered
data can be malformed and as so may not be used in filtering. So, I
mistyped something in filter fileds alredy forget about that and
pressing add button.
But as FilterForm uses onSubmission user receives error message that
does not  related with his latest activity.
May be there are any way to say AjaxButton not to call form validation
at least? Or the right way is to put such buttons in separate form?
But what if this is delete current line button?

-- 
Best regards
Alex

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



Re: AjaxButton + Form

2010-11-30 Thread Andrea Del Bene

Hi Alex,

AjaxButton was build for submitting form via Ajax and that's why it has 
an AjaxFormSubmitBehavior attached. You could substitute it with 
AjaxLink component if you want to avoid form submitting.




Hello!

May someone explain me, why AjaxButton must call his parent form
onSubmittion? It surely did becouse of
@Override
protected void onEvent(AjaxRequestTarget target)
{
getForm().getRootForm().onFormSubmitted();
  ...


Why to submit form if it's Ajax request?

The real example: I have a filterForm with some fileds where entered
data can be malformed and as so may not be used in filtering. So, I
mistyped something in filter fileds alredy forget about that and
pressing add button.
But as FilterForm uses onSubmission user receives error message that
does not  related with his latest activity.
May be there are any way to say AjaxButton not to call form validation
at least? Or the right way is to put such buttons in separate form?
But what if this is delete current line button?

   



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



Re: AjaxButton + Form

2010-11-30 Thread alex shubert
Thanks for your response.
Looks like I misunderstand the very purpose of the component.

But anyway, this is NOT submission. I mean, if you trace the call to
the end, you'll find that no call of overridden Form#onSubmit happens.
only Form#onSubmission called.
That's why I stay confused. Although it is good to know that Model
object is validated and assembled on AJAX call arrival...


-- 
Best regards
Alex

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



Re: AjaxButton + Form

2010-11-30 Thread andrea del bene
Well, Form#onSubmit is called only if form's validation step went fine. 
Maybe some of your fields' validator is preventing form submission.
BTW, where is onSubmission method? Is a Wicket standard method? I can't 
find it in Wicket classes.



Thanks for your response.
Looks like I misunderstand the very purpose of the component.

But anyway, this is NOT submission. I mean, if you trace the call to
the end, you'll find that no call of overridden Form#onSubmit happens.
only Form#onSubmission called.
That's why I stay confused. Although it is good to know that Model
object is validated and assembled on AJAX call arrival...





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



Re: AjaxButton + Form

2010-11-30 Thread alex shubert
It is
public final void onFormSubmitted()

No, Form#onSubmit is not called at all. After successful execution of
internal submission trace proceed to
AjaxButton#onSubmit(AjaxRequestTarget target, Form? form)



-- 
Best regards
Alex

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