You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by lc991 <lo...@live.it> on 2013/10/09 11:03:58 UTC
catch the paste event
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: catch the paste event
Posted by Martin Grigorov <mg...@apache.org>.
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 <lo...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
Re: catch the paste event
Posted by lc991 <lo...@live.it>.
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-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: catch the paste event
Posted by Martin Grigorov <mg...@apache.org>.
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 <lo...@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-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>