catch the paste event

2013-10-09 Thread lc991
hi,

i have a problem to get selection text after ctrl-v event. Is there a
method?

the AjaxEventBehavior paste work but now i don't know to get a text. 

In javascript the text is in the Event e object but in wicket i don't find
it.

this.add(new AjaxEventBehavior(paste) {
@Override
protected void onEvent(AjaxRequestTarget art) {

}
});

bye, lorenzo



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/catch-the-paste-event-tp4661765.html
Sent from the Users forum 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: catch the paste event

2013-10-09 Thread Martin Grigorov
Hi,

You need to use AjaxFormComponentSubmitBehavior(paste) and Wicket will
send the new value to the server.


On Wed, Oct 9, 2013 at 12:03 PM, lc991 lorenzoc...@live.it wrote:

 hi,

 i have a problem to get selection text after ctrl-v event. Is there a
 method?

 the AjaxEventBehavior paste work but now i don't know to get a text.

 In javascript the text is in the Event e object but in wicket i don't find
 it.

 this.add(new AjaxEventBehavior(paste) {
 @Override
 protected void onEvent(AjaxRequestTarget art) {

 }
 });

 bye, lorenzo



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/catch-the-paste-event-tp4661765.html
 Sent from the Users forum 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: catch the paste event

2013-10-09 Thread lc991
I add event on the my form, but how to get a text to Event e object?

form.add(new AjaxFormSubmitBehavior(paste) {

@Override
public void onEvent(Component component, IEvent? event) {
super.onEvent(component, event); 
System.err.println(event.getSource().toString());
}

});



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/catch-the-paste-event-tp4661765p4661767.html
Sent from the Users forum 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: catch the paste event

2013-10-09 Thread Martin Grigorov
AjaxFormComponentSubmittingBehavior(paste)
And then override #onSubmit() method.
The pasted value will be reachable via getFormComponent().getModelObject()


On Wed, Oct 9, 2013 at 12:16 PM, lc991 lorenzoc...@live.it wrote:

 I add event on the my form, but how to get a text to Event e object?

 form.add(new AjaxFormSubmitBehavior(paste) {

 @Override
 public void onEvent(Component component, IEvent? event) {
 super.onEvent(component, event);
 System.err.println(event.getSource().toString());
 }

 });



 --
 View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/catch-the-paste-event-tp4661765p4661767.html
 Sent from the Users forum 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