rickilama54 / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

Patch to allow cancellation of ItemKeyPressEvent #340

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
com.smartgwt.client.widgets.form.fields.events.KeyPressEvent and
com.smartgwt.client.widgets.events.KeyPressEvent both implement the
Cancellable interface, and allow the developer to stop event bubbling by
calling cancel() on the event.

I needed this feature on
com.smartgwt.client.widgets.form.events.ItemKeyPressEvent as well, and I
think it could be useful for others as well.

I implemented this feature by modifying the trunk.
It works great for my use case: I can now cancel the Ctrl + S
ItemKeyPressEvent to stop firefox from opening a "Save As" window.

I posted the patch both on rapidshare and on pastie, because it seems like
SmartGWT's issue attachment storage quota has been exceeded:
http://pastie.org/647088
http://rapidshare.com/files/290336470/DynamicForm.java.patch.html
http://rapidshare.com/files/290336622/ItemKeyPressEvent.java.patch.html

What version of the product are you using? On what operating system?
Smart GWT trunk @ rev. 795

Regards,

-Etienne

Original issue reported on code.google.com by nev...@gmail.com on 8 Oct 2009 at 4:27

GoogleCodeExporter commented 8 years ago

Original comment by sanjiv.j...@gmail.com on 20 Oct 2009 at 2:40

GoogleCodeExporter commented 8 years ago
Thanks for accepting this issue Sanjiv.

I'll attach the files, now that Google has kindly increased the issue attachment
storage quota :) ( http://code.google.com/p/support/issues/detail?id=3162 ). 
That
way, they won't disappear.

Original comment by nev...@gmail.com on 20 Oct 2009 at 8:35

Attachments:

GoogleCodeExporter commented 8 years ago
Fixed in SVN.

Original comment by sanjiv.j...@gmail.com on 26 Oct 2009 at 2:06

GoogleCodeExporter commented 8 years ago
I replaced my custom patched jar with r803 from trunk, and the cancelling works
great. Thanks for the fix.

Original comment by nev...@gmail.com on 26 Oct 2009 at 9:32

GoogleCodeExporter commented 8 years ago

Original comment by sanjiv.j...@gmail.com on 29 Nov 2009 at 10:31