Re: Could not clear select2Choice component model value.

2014-10-09 Thread MadasamySankarapandian
Thanks Maxim Solodovnik.

On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik solomax...@gmail.com
wrote:

 I also noticed this issue in our project,
 Will try to take a look at it

 On 9 October 2014 07:33, MadasamySankarapandian madas...@mcruncher.com
 wrote:

  Thankyou very much for yours reply.
 
  I call formComponent.clearInput() in my ClearFormVisitor class. But It
 does
  not work.
  I have created issue-96
  https://github.com/ivaynberg/wicket-select2/issues/96 in
 wicket-select2
  project.
 
 
 
 
 
 
  On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik solomax...@gmail.com
  wrote:
 
   Done, thanks for pointing this out
  
   On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote:
  
Can you update this issue then?
   
https://github.com/ivaynberg/wicket-select2/issues/93
   
On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik 
  solomax...@gmail.com
wrote:
   
 we recently moved this component to wicketstuff:


   
  
 
 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent

 to get Wicket7 compatible version


 On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote:

  You can also ask the developer via:
  https://github.com/ivaynberg/wicket-select2/issues
 
  You should probably take a look over the open issues so that you
  are
  familiar with that other developers faced. Maybe one of those
  issues
 might
  be a road block for you?
 
  Although you will get a faster reply from Igor or another Wicket
 developer
  via this list :)
 
  On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
   mgrigo...@apache.org
  wrote:
 
   Hi,
  
   You should call formComponent.clearInput() too.
  
   Martin Grigorov
   Wicket Training and Consulting
   https://twitter.com/mtgrigorov
  
   On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
   madas...@mcruncher.com wrote:
  
   
This is regarding wicket-select2 project. I could not find
 any
 mailing
list for this project. That is why sending here. Please some
  one
help
  me.
   
I have created clear link to clear the form input values.
 After
click
  the
clear link,  all components values are cleared except
   Select2Choice
component.
   
Here with attached quickstart to recreate this problem.
   
Follow below steps to recreate this problem
   
* Download attachment and extract it.
* cd select2-quickstart.
* Then execute mvn clean package jetty:run
* Type localhost:8080 in browser
* Give the input to name and country field.
* Click clear link
   
Now name(*TextField*) field value is cleared and
  country(*Select2Choice*)
field value is not cleared.
   
   
   
--
Thanks and regards
 Madasamy
   
   
   
-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail:
 users-h...@wicket.apache.org
   
  
 



 --
 WBR
 Maxim aka solomax

   
  
  
  
   --
   WBR
   Maxim aka solomax
  
 
 
 
  --
  Thanks and regards
   Madasamy
 



 --
 WBR
 Maxim aka solomax




-- 
Thanks and regards
 Madasamy


disabling IndicatingAjaxButton during submision?

2014-10-09 Thread Garret Wilson
IndicatingAjaxButton is nice. But I need one more step: I need the 
button to be disabled during submission.


Mystic Coders indicated a solution 
http://www.mysticcoders.com/blog/disabling-an-ajax-submit-button/, but 
that doesn't seem to work with Wicket 7.


Some have filed bugs to Wicket 
https://issues.apache.org/jira/browse/WICKET-5360  and filed bugs to 
Wicket stuff https://github.com/wicketstuff/core/issues/272 to have 
this added, but were turned down.


In the Wicket documentation there is some complicated code 
http://wicket.apache.org/guide/guide/ajax.html#ajax_6 for adding 
layers and having indicators---but I already have an indicator. I just 
want to disable the button.


How can I simply disable the Ajax button during submission? I can't find 
the page that tells me how to do this---but I find lots of people 
wanting to do it, and lots of people providing complicated workarounds 
that break from one version of Wicket to the next. Any easy solutions?


Thanks in advance,

Garret


Re: Could not clear select2Choice component model value.

2014-10-09 Thread Maxim Solodovnik
@Paul, @Martin

Select2Choice sets back its value
to getWebRequest().getRequestParameters().getParameterNames()
in renderInitializationScript method [1]
It seems like JS code like: $(#country1).select2(data, null); can be
executed on clear input, but this seems to be workaround

I'm not sure why [1] method is used to get value, maybe you can suggest
correct way of fixing this?


[1]
https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62

On 9 October 2014 16:39, MadasamySankarapandian madas...@mcruncher.com
wrote:

 Thanks Maxim Solodovnik.

 On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  I also noticed this issue in our project,
  Will try to take a look at it
 
  On 9 October 2014 07:33, MadasamySankarapandian madas...@mcruncher.com
  wrote:
 
   Thankyou very much for yours reply.
  
   I call formComponent.clearInput() in my ClearFormVisitor class. But It
  does
   not work.
   I have created issue-96
   https://github.com/ivaynberg/wicket-select2/issues/96 in
  wicket-select2
   project.
  
  
  
  
  
  
   On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik 
 solomax...@gmail.com
   wrote:
  
Done, thanks for pointing this out
   
On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote:
   
 Can you update this issue then?

 https://github.com/ivaynberg/wicket-select2/issues/93

 On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik 
   solomax...@gmail.com
 wrote:

  we recently moved this component to wicketstuff:
 
 

   
  
 
 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent
 
  to get Wicket7 compatible version
 
 
  On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote:
 
   You can also ask the developer via:
   https://github.com/ivaynberg/wicket-select2/issues
  
   You should probably take a look over the open issues so that
 you
   are
   familiar with that other developers faced. Maybe one of those
   issues
  might
   be a road block for you?
  
   Although you will get a faster reply from Igor or another
 Wicket
  developer
   via this list :)
  
   On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
mgrigo...@apache.org
   wrote:
  
Hi,
   
You should call formComponent.clearInput() too.
   
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
   
On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
madas...@mcruncher.com wrote:
   

 This is regarding wicket-select2 project. I could not find
  any
  mailing
 list for this project. That is why sending here. Please
 some
   one
 help
   me.

 I have created clear link to clear the form input values.
  After
 click
   the
 clear link,  all components values are cleared except
Select2Choice
 component.

 Here with attached quickstart to recreate this problem.

 Follow below steps to recreate this problem

 * Download attachment and extract it.
 * cd select2-quickstart.
 * Then execute mvn clean package jetty:run
 * Type localhost:8080 in browser
 * Give the input to name and country field.
 * Click clear link

 Now name(*TextField*) field value is cleared and
   country(*Select2Choice*)
 field value is not cleared.



 --
 Thanks and regards
  Madasamy




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

   
  
 
 
 
  --
  WBR
  Maxim aka solomax
 

   
   
   
--
WBR
Maxim aka solomax
   
  
  
  
   --
   Thanks and regards
Madasamy
  
 
 
 
  --
  WBR
  Maxim aka solomax
 



 --
 Thanks and regards
  Madasamy




-- 
WBR
Maxim aka solomax


Re: Could not clear select2Choice component model value.

2014-10-09 Thread Maxim Solodovnik
Additionally select2 seems to need to be forked to wicketstuff to be fixed,
should I do this?

On 10 October 2014 00:49, Maxim Solodovnik solomax...@gmail.com wrote:

 @Paul, @Martin

 Select2Choice sets back its value
 to getWebRequest().getRequestParameters().getParameterNames()
 in renderInitializationScript method [1]
 It seems like JS code like: $(#country1).select2(data, null); can be
 executed on clear input, but this seems to be workaround

 I'm not sure why [1] method is used to get value, maybe you can suggest
 correct way of fixing this?


 [1]
 https://github.com/ivaynberg/wicket-select2/blob/master/wicket-select2/src/main/java/com/vaynberg/wicket/select2/Select2Choice.java#L62

 On 9 October 2014 16:39, MadasamySankarapandian madas...@mcruncher.com
 wrote:

 Thanks Maxim Solodovnik.

 On Thu, Oct 9, 2014 at 12:33 PM, Maxim Solodovnik solomax...@gmail.com
 wrote:

  I also noticed this issue in our project,
  Will try to take a look at it
 
  On 9 October 2014 07:33, MadasamySankarapandian madas...@mcruncher.com
 
  wrote:
 
   Thankyou very much for yours reply.
  
   I call formComponent.clearInput() in my ClearFormVisitor class. But It
  does
   not work.
   I have created issue-96
   https://github.com/ivaynberg/wicket-select2/issues/96 in
  wicket-select2
   project.
  
  
  
  
  
  
   On Wed, Oct 8, 2014 at 12:13 AM, Maxim Solodovnik 
 solomax...@gmail.com
   wrote:
  
Done, thanks for pointing this out
   
On 7 October 2014 23:08, Paul Bors p...@bors.ws wrote:
   
 Can you update this issue then?

 https://github.com/ivaynberg/wicket-select2/issues/93

 On Tue, Oct 7, 2014 at 12:00 PM, Maxim Solodovnik 
   solomax...@gmail.com
 wrote:

  we recently moved this component to wicketstuff:
 
 

   
  
 
 https://github.com/wicketstuff/core/tree/master/jdk-1.7-parent/select2-parent
 
  to get Wicket7 compatible version
 
 
  On 7 October 2014 22:56, Paul Bors p...@bors.ws wrote:
 
   You can also ask the developer via:
   https://github.com/ivaynberg/wicket-select2/issues
  
   You should probably take a look over the open issues so that
 you
   are
   familiar with that other developers faced. Maybe one of those
   issues
  might
   be a road block for you?
  
   Although you will get a faster reply from Igor or another
 Wicket
  developer
   via this list :)
  
   On Tue, Oct 7, 2014 at 4:23 AM, Martin Grigorov 
mgrigo...@apache.org
   wrote:
  
Hi,
   
You should call formComponent.clearInput() too.
   
Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov
   
On Tue, Oct 7, 2014 at 9:13 AM, MadasamySankarapandian 
madas...@mcruncher.com wrote:
   

 This is regarding wicket-select2 project. I could not find
  any
  mailing
 list for this project. That is why sending here. Please
 some
   one
 help
   me.

 I have created clear link to clear the form input values.
  After
 click
   the
 clear link,  all components values are cleared except
Select2Choice
 component.

 Here with attached quickstart to recreate this problem.

 Follow below steps to recreate this problem

 * Download attachment and extract it.
 * cd select2-quickstart.
 * Then execute mvn clean package jetty:run
 * Type localhost:8080 in browser
 * Give the input to name and country field.
 * Click clear link

 Now name(*TextField*) field value is cleared and
   country(*Select2Choice*)
 field value is not cleared.



 --
 Thanks and regards
  Madasamy




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

   
  
 
 
 
  --
  WBR
  Maxim aka solomax
 

   
   
   
--
WBR
Maxim aka solomax
   
  
  
  
   --
   Thanks and regards
Madasamy
  
 
 
 
  --
  WBR
  Maxim aka solomax
 



 --
 Thanks and regards
  Madasamy




 --
 WBR
 Maxim aka solomax




-- 
WBR
Maxim aka solomax


Re: disabling IndicatingAjaxButton during submision?

2014-10-09 Thread Martin Grigorov
Hi,

Recently I've added integration for
http://msurguy.github.io/ladda-bootstrap/ to
https://github.com/l0rdn1kk0n/wicket-bootstrap.

It was as simple as these two lines:
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/65529876b31781bc27441b6b2e17559c97abbd0d/bootstrap-extensions/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/ladda/LaddaAjaxCallListener.java#L15-L16

i.e. in onBeforeSend() do whatever your button needs to make itself
disabled. In onComplete() revert it.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Thu, Oct 9, 2014 at 8:29 PM, Garret Wilson gar...@globalmentor.com
wrote:

 IndicatingAjaxButton is nice. But I need one more step: I need the button
 to be disabled during submission.

 Mystic Coders indicated a solution http://www.mysticcoders.com/
 blog/disabling-an-ajax-submit-button/, but that doesn't seem to work
 with Wicket 7.

 Some have filed bugs to Wicket https://issues.apache.org/
 jira/browse/WICKET-5360  and filed bugs to Wicket stuff 
 https://github.com/wicketstuff/core/issues/272 to have this added, but
 were turned down.

 In the Wicket documentation there is some complicated code 
 http://wicket.apache.org/guide/guide/ajax.html#ajax_6 for adding layers
 and having indicators---but I already have an indicator. I just want to
 disable the button.

 How can I simply disable the Ajax button during submission? I can't find
 the page that tells me how to do this---but I find lots of people wanting
 to do it, and lots of people providing complicated workarounds that break
 from one version of Wicket to the next. Any easy solutions?

 Thanks in advance,

 Garret



Re: disabling IndicatingAjaxButton during submision?

2014-10-09 Thread Garret Wilson

On 10/9/2014 1:21 PM, Martin Grigorov wrote:

...
It was as simple as these two lines:
https://github.com/l0rdn1kk0n/wicket-bootstrap/blob/65529876b31781bc27441b6b2e17559c97abbd0d/bootstrap-extensions/src/main/java/de/agilecoders/wicket/extensions/markup/html/bootstrap/ladda/LaddaAjaxCallListener.java#L15-L16


It looks like I would spend half the day just trying to figure out how 
to integrate yet another library.


So how can I easily and simply disable a button during submission using 
only core Wicket? Can it be done?


Garret

P.S. When somebody wanted to integrate a solution into core Wicket, they 
were turned down https://issues.apache.org/jira/browse/WICKET-5360.




Re: disabling IndicatingAjaxButton during submision?

2014-10-09 Thread Garret Wilson
One of the reasons I chose Wicket for my client's project was that I 
expected that at this level of maturity Wicket would support the most 
common use cases . (Disabling a submission button during submission is 
one of the most common use cases I can think of.)


Let me first say that IndicatingAjaxButton is really cool, and works 
great! It was just what I needed. Thanks to whoever wrote it.


Disabling the submission button during submission, however, is just 
going to load me down a rat's hole of research and experimentation and 
trial-and-error and half-solutions. We have a tight deadline to meet. 
We're going to have to go with just IndicatingAjaxButton and leave it at 
that. Hopefully we can come back and address this in a future version of 
our project.


I'm just explaining our situation as it is. Nothing  personal directed 
to anyone, and I appreciate the suggestions from Martin Grigorov.


Garret

On 10/9/2014 12:29 PM, Garret Wilson wrote:
IndicatingAjaxButton is nice. But I need one more step: I need the 
button to be disabled during submission.


Mystic Coders indicated a solution 
http://www.mysticcoders.com/blog/disabling-an-ajax-submit-button/, 
but that doesn't seem to work with Wicket 7.


Some have filed bugs to Wicket 
https://issues.apache.org/jira/browse/WICKET-5360  and filed bugs to 
Wicket stuff https://github.com/wicketstuff/core/issues/272 to have 
this added, but were turned down.


In the Wicket documentation there is some complicated code 
http://wicket.apache.org/guide/guide/ajax.html#ajax_6 for adding 
layers and having indicators---but I already have an indicator. I just 
want to disable the button.


How can I simply disable the Ajax button during submission? I can't 
find the page that tells me how to do this---but I find lots of people 
wanting to do it, and lots of people providing complicated workarounds 
that break from one version of Wicket to the next. Any easy solutions?


Thanks in advance,

Garret




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