diff options
129 files changed, 780 insertions, 261 deletions
diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/arrow-down.png b/WebContent/VAADIN/themes/runo/icons/icons16/arrow-down.png Binary files differnew file mode 100644 index 0000000000..ffd0ee50a5 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/arrow-down.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/arrow-left.png b/WebContent/VAADIN/themes/runo/icons/icons16/arrow-left.png Binary files differnew file mode 100644 index 0000000000..27dd25110d --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/arrow-left.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/arrow-right.png b/WebContent/VAADIN/themes/runo/icons/icons16/arrow-right.png Binary files differnew file mode 100644 index 0000000000..69bf88da8a --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/arrow-right.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/arrow-up.png b/WebContent/VAADIN/themes/runo/icons/icons16/arrow-up.png Binary files differnew file mode 100644 index 0000000000..76e5b43e08 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/arrow-up.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/attention.png b/WebContent/VAADIN/themes/runo/icons/icons16/attention.png Binary files differnew file mode 100644 index 0000000000..350de56aa5 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/attention.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/calendar.png b/WebContent/VAADIN/themes/runo/icons/icons16/calendar.png Binary files differnew file mode 100644 index 0000000000..7717a5e220 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/calendar.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/cancel.png b/WebContent/VAADIN/themes/runo/icons/icons16/cancel.png Binary files differnew file mode 100644 index 0000000000..19a0783733 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/cancel.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-add.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-add.png Binary files differnew file mode 100644 index 0000000000..d84e349526 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-add.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-delete.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-delete.png Binary files differnew file mode 100644 index 0000000000..cc3172224a --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-delete.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-doc.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-doc.png Binary files differnew file mode 100644 index 0000000000..7def77428a --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-doc.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-image.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-image.png Binary files differnew file mode 100644 index 0000000000..8a1bf253e8 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-image.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-pdf.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-pdf.png Binary files differnew file mode 100644 index 0000000000..b58ccf7567 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-pdf.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-ppt.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-ppt.png Binary files differnew file mode 100644 index 0000000000..b60f429be2 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-ppt.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-txt.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-txt.png Binary files differnew file mode 100644 index 0000000000..05659b19b2 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-txt.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-web.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-web.png Binary files differnew file mode 100644 index 0000000000..fcfd8685f0 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-web.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document-xsl.png b/WebContent/VAADIN/themes/runo/icons/icons16/document-xsl.png Binary files differnew file mode 100644 index 0000000000..571823847f --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document-xsl.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/document.png b/WebContent/VAADIN/themes/runo/icons/icons16/document.png Binary files differnew file mode 100644 index 0000000000..a2bab1bb0b --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/document.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/email-reply.png b/WebContent/VAADIN/themes/runo/icons/icons16/email-reply.png Binary files differnew file mode 100644 index 0000000000..be7fd2244d --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/email-reply.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/email-send.png b/WebContent/VAADIN/themes/runo/icons/icons16/email-send.png Binary files differnew file mode 100644 index 0000000000..0ef7a1c398 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/email-send.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/email.png b/WebContent/VAADIN/themes/runo/icons/icons16/email.png Binary files differnew file mode 100644 index 0000000000..68d6c93465 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/email.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/error.gif b/WebContent/VAADIN/themes/runo/icons/icons16/error.gif Binary files differnew file mode 100644 index 0000000000..c9582b2c28 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/error.gif diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/error.png b/WebContent/VAADIN/themes/runo/icons/icons16/error.png Binary files differnew file mode 100644 index 0000000000..0141e4dfc3 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/error.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/folder-add.png b/WebContent/VAADIN/themes/runo/icons/icons16/folder-add.png Binary files differnew file mode 100644 index 0000000000..48aa7c9220 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/folder-add.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/folder-delete.png b/WebContent/VAADIN/themes/runo/icons/icons16/folder-delete.png Binary files differnew file mode 100644 index 0000000000..7cc389d6b2 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/folder-delete.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/folder.png b/WebContent/VAADIN/themes/runo/icons/icons16/folder.png Binary files differnew file mode 100644 index 0000000000..f4fec377c6 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/folder.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/globe.png b/WebContent/VAADIN/themes/runo/icons/icons16/globe.png Binary files differnew file mode 100644 index 0000000000..ea4034c149 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/globe.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/help.png b/WebContent/VAADIN/themes/runo/icons/icons16/help.png Binary files differnew file mode 100644 index 0000000000..d82a8852bf --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/help.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/lock.png b/WebContent/VAADIN/themes/runo/icons/icons16/lock.png Binary files differnew file mode 100644 index 0000000000..29f1023613 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/lock.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/note.png b/WebContent/VAADIN/themes/runo/icons/icons16/note.png Binary files differnew file mode 100644 index 0000000000..efafae5570 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/note.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/ok.png b/WebContent/VAADIN/themes/runo/icons/icons16/ok.png Binary files differnew file mode 100644 index 0000000000..89591faef2 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/ok.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/reload.png b/WebContent/VAADIN/themes/runo/icons/icons16/reload.png Binary files differnew file mode 100644 index 0000000000..2c54836bff --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/reload.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/settings.png b/WebContent/VAADIN/themes/runo/icons/icons16/settings.png Binary files differnew file mode 100644 index 0000000000..019f0df663 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/settings.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/trash-full.png b/WebContent/VAADIN/themes/runo/icons/icons16/trash-full.png Binary files differnew file mode 100644 index 0000000000..7d790e6c9a --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/trash-full.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/trash.png b/WebContent/VAADIN/themes/runo/icons/icons16/trash.png Binary files differnew file mode 100644 index 0000000000..8875ae322e --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/trash.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/user.png b/WebContent/VAADIN/themes/runo/icons/icons16/user.png Binary files differnew file mode 100644 index 0000000000..522f864884 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/user.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons16/users.png b/WebContent/VAADIN/themes/runo/icons/icons16/users.png Binary files differnew file mode 100644 index 0000000000..01f2a1251c --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons16/users.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/arrow-down.png b/WebContent/VAADIN/themes/runo/icons/icons32/arrow-down.png Binary files differnew file mode 100644 index 0000000000..20c33b70fb --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/arrow-down.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/arrow-left.png b/WebContent/VAADIN/themes/runo/icons/icons32/arrow-left.png Binary files differnew file mode 100644 index 0000000000..ed2aae2cb0 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/arrow-left.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/arrow-right.png b/WebContent/VAADIN/themes/runo/icons/icons32/arrow-right.png Binary files differnew file mode 100644 index 0000000000..bd7707ec8a --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/arrow-right.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/arrow-up.png b/WebContent/VAADIN/themes/runo/icons/icons32/arrow-up.png Binary files differnew file mode 100644 index 0000000000..01c1a8ec83 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/arrow-up.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/attention.png b/WebContent/VAADIN/themes/runo/icons/icons32/attention.png Binary files differnew file mode 100644 index 0000000000..6b00733567 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/attention.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/calendar.png b/WebContent/VAADIN/themes/runo/icons/icons32/calendar.png Binary files differnew file mode 100644 index 0000000000..789ad9031c --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/calendar.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/cancel.png b/WebContent/VAADIN/themes/runo/icons/icons32/cancel.png Binary files differnew file mode 100644 index 0000000000..725240d558 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/cancel.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-add.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-add.png Binary files differnew file mode 100644 index 0000000000..26bca0d112 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-add.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-delete.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-delete.png Binary files differnew file mode 100644 index 0000000000..43e9a43e5b --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-delete.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-doc.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-doc.png Binary files differnew file mode 100644 index 0000000000..8df20cfdcf --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-doc.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-edit.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-edit.png Binary files differnew file mode 100644 index 0000000000..1d17383ca7 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-edit.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-image.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-image.png Binary files differnew file mode 100644 index 0000000000..88c78665b8 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-image.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-pdf.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-pdf.png Binary files differnew file mode 100644 index 0000000000..048a02fddf --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-pdf.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-ppt.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-ppt.png Binary files differnew file mode 100644 index 0000000000..7fd7385cbd --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-ppt.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-txt.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-txt.png Binary files differnew file mode 100644 index 0000000000..25264732c6 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-txt.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-web.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-web.png Binary files differnew file mode 100644 index 0000000000..72fd847ac3 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-web.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document-xsl.png b/WebContent/VAADIN/themes/runo/icons/icons32/document-xsl.png Binary files differnew file mode 100644 index 0000000000..2ff4607ad3 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document-xsl.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/document.png b/WebContent/VAADIN/themes/runo/icons/icons32/document.png Binary files differnew file mode 100644 index 0000000000..1a38dcc304 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/document.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/email-reply.png b/WebContent/VAADIN/themes/runo/icons/icons32/email-reply.png Binary files differnew file mode 100644 index 0000000000..fd0203f768 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/email-reply.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/email-send.png b/WebContent/VAADIN/themes/runo/icons/icons32/email-send.png Binary files differnew file mode 100644 index 0000000000..dc34ac694d --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/email-send.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/email.png b/WebContent/VAADIN/themes/runo/icons/icons32/email.png Binary files differnew file mode 100644 index 0000000000..bef86e6cbb --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/email.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/folder-add.png b/WebContent/VAADIN/themes/runo/icons/icons32/folder-add.png Binary files differnew file mode 100644 index 0000000000..e0b78d6e1d --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/folder-add.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/folder-delete.png b/WebContent/VAADIN/themes/runo/icons/icons32/folder-delete.png Binary files differnew file mode 100644 index 0000000000..8e3c4a404c --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/folder-delete.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/folder.png b/WebContent/VAADIN/themes/runo/icons/icons32/folder.png Binary files differnew file mode 100644 index 0000000000..7577a17ac3 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/folder.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/globe.png b/WebContent/VAADIN/themes/runo/icons/icons32/globe.png Binary files differnew file mode 100644 index 0000000000..6c7d469ba2 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/globe.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/help.png b/WebContent/VAADIN/themes/runo/icons/icons32/help.png Binary files differnew file mode 100644 index 0000000000..218910c98d --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/help.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/lock.png b/WebContent/VAADIN/themes/runo/icons/icons32/lock.png Binary files differnew file mode 100644 index 0000000000..4fc16565f0 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/lock.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/note.png b/WebContent/VAADIN/themes/runo/icons/icons32/note.png Binary files differnew file mode 100644 index 0000000000..e7e035dc8c --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/note.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/ok.png b/WebContent/VAADIN/themes/runo/icons/icons32/ok.png Binary files differnew file mode 100644 index 0000000000..ac0438828c --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/ok.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/reload.png b/WebContent/VAADIN/themes/runo/icons/icons32/reload.png Binary files differnew file mode 100644 index 0000000000..c3556ec890 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/reload.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/settings.png b/WebContent/VAADIN/themes/runo/icons/icons32/settings.png Binary files differnew file mode 100644 index 0000000000..92eda74c54 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/settings.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/trash-full.png b/WebContent/VAADIN/themes/runo/icons/icons32/trash-full.png Binary files differnew file mode 100644 index 0000000000..a9707e76d6 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/trash-full.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/trash.png b/WebContent/VAADIN/themes/runo/icons/icons32/trash.png Binary files differnew file mode 100644 index 0000000000..6eaac86166 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/trash.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/user.png b/WebContent/VAADIN/themes/runo/icons/icons32/user.png Binary files differnew file mode 100644 index 0000000000..ebb5a7f9f8 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/user.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons32/users.png b/WebContent/VAADIN/themes/runo/icons/icons32/users.png Binary files differnew file mode 100644 index 0000000000..af225a9e46 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons32/users.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/arrow-down.png b/WebContent/VAADIN/themes/runo/icons/icons64/arrow-down.png Binary files differnew file mode 100644 index 0000000000..bdf5d0474e --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/arrow-down.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/arrow-left.png b/WebContent/VAADIN/themes/runo/icons/icons64/arrow-left.png Binary files differnew file mode 100644 index 0000000000..b90ed88840 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/arrow-left.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/arrow-right.png b/WebContent/VAADIN/themes/runo/icons/icons64/arrow-right.png Binary files differnew file mode 100644 index 0000000000..6331a5ddf3 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/arrow-right.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/arrow-up.png b/WebContent/VAADIN/themes/runo/icons/icons64/arrow-up.png Binary files differnew file mode 100644 index 0000000000..821fbe348f --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/arrow-up.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/attention.png b/WebContent/VAADIN/themes/runo/icons/icons64/attention.png Binary files differnew file mode 100644 index 0000000000..77265e48ee --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/attention.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/calendar.png b/WebContent/VAADIN/themes/runo/icons/icons64/calendar.png Binary files differnew file mode 100644 index 0000000000..f13fbd6efb --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/calendar.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/cancel.png b/WebContent/VAADIN/themes/runo/icons/icons64/cancel.png Binary files differnew file mode 100644 index 0000000000..1d1a719a6c --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/cancel.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-add.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-add.png Binary files differnew file mode 100644 index 0000000000..acdcb06123 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-add.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-delete.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-delete.png Binary files differnew file mode 100644 index 0000000000..2a46863b7f --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-delete.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-doc.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-doc.png Binary files differnew file mode 100644 index 0000000000..455c1f15bd --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-doc.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-edit.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-edit.png Binary files differnew file mode 100644 index 0000000000..6af96c9b77 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-edit.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-image.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-image.png Binary files differnew file mode 100644 index 0000000000..079978e850 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-image.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-pdf.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-pdf.png Binary files differnew file mode 100644 index 0000000000..cb6bc59675 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-pdf.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-ppt.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-ppt.png Binary files differnew file mode 100644 index 0000000000..dd501bfbc9 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-ppt.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-txt.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-txt.png Binary files differnew file mode 100644 index 0000000000..e64f746bd9 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-txt.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-web.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-web.png Binary files differnew file mode 100644 index 0000000000..9d81eb5702 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-web.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document-xsl.png b/WebContent/VAADIN/themes/runo/icons/icons64/document-xsl.png Binary files differnew file mode 100644 index 0000000000..6008085a34 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document-xsl.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/document.png b/WebContent/VAADIN/themes/runo/icons/icons64/document.png Binary files differnew file mode 100644 index 0000000000..224de0bc84 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/document.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/email-reply.png b/WebContent/VAADIN/themes/runo/icons/icons64/email-reply.png Binary files differnew file mode 100644 index 0000000000..2c6f7b690d --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/email-reply.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/email-send.png b/WebContent/VAADIN/themes/runo/icons/icons64/email-send.png Binary files differnew file mode 100644 index 0000000000..9ec7198853 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/email-send.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/email.png b/WebContent/VAADIN/themes/runo/icons/icons64/email.png Binary files differnew file mode 100644 index 0000000000..e11245b2f5 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/email.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/folder-add.png b/WebContent/VAADIN/themes/runo/icons/icons64/folder-add.png Binary files differnew file mode 100644 index 0000000000..111318cc3c --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/folder-add.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/folder-delete.png b/WebContent/VAADIN/themes/runo/icons/icons64/folder-delete.png Binary files differnew file mode 100644 index 0000000000..d249983eac --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/folder-delete.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/folder.png b/WebContent/VAADIN/themes/runo/icons/icons64/folder.png Binary files differnew file mode 100644 index 0000000000..edb7b9f786 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/folder.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/globe.png b/WebContent/VAADIN/themes/runo/icons/icons64/globe.png Binary files differnew file mode 100644 index 0000000000..1786635b45 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/globe.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/help.png b/WebContent/VAADIN/themes/runo/icons/icons64/help.png Binary files differnew file mode 100644 index 0000000000..a66e8aafa6 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/help.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/lock.png b/WebContent/VAADIN/themes/runo/icons/icons64/lock.png Binary files differnew file mode 100644 index 0000000000..deaf7db0a4 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/lock.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/note.png b/WebContent/VAADIN/themes/runo/icons/icons64/note.png Binary files differnew file mode 100644 index 0000000000..1383847ed1 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/note.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/ok.png b/WebContent/VAADIN/themes/runo/icons/icons64/ok.png Binary files differnew file mode 100644 index 0000000000..dc0d00c38b --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/ok.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/reload.png b/WebContent/VAADIN/themes/runo/icons/icons64/reload.png Binary files differnew file mode 100644 index 0000000000..b91f51c67f --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/reload.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/settings.png b/WebContent/VAADIN/themes/runo/icons/icons64/settings.png Binary files differnew file mode 100644 index 0000000000..1c9b794ab0 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/settings.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/trash-full.png b/WebContent/VAADIN/themes/runo/icons/icons64/trash-full.png Binary files differnew file mode 100644 index 0000000000..81d060e509 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/trash-full.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/trash.png b/WebContent/VAADIN/themes/runo/icons/icons64/trash.png Binary files differnew file mode 100644 index 0000000000..41ef761061 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/trash.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/user.png b/WebContent/VAADIN/themes/runo/icons/icons64/user.png Binary files differnew file mode 100644 index 0000000000..60d6c6e1b3 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/user.png diff --git a/WebContent/VAADIN/themes/runo/icons/icons64/users.png b/WebContent/VAADIN/themes/runo/icons/icons64/users.png Binary files differnew file mode 100644 index 0000000000..3a42c17790 --- /dev/null +++ b/WebContent/VAADIN/themes/runo/icons/icons64/users.png diff --git a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java index 9dd51f8c6d..0d8f117329 100644 --- a/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java +++ b/buildhelpers/src/com/vaadin/buildhelpers/GeneratePackageExports.java @@ -26,6 +26,7 @@ import java.util.jar.JarEntry; import java.util.jar.JarFile; import java.util.jar.Manifest; import java.util.logging.Logger; +import java.util.regex.Pattern; /** * Generates Export-Packages attribute for OSGi compatible manifest. @@ -172,6 +173,9 @@ public class GeneratePackageExports { private static HashSet<String> getPackages(JarFile jar, List<String> acceptedPackagePrefixes) { HashSet<String> packages = new HashSet<String>(); + + Pattern startsWithNumber = Pattern.compile("\\.\\d"); + for (Enumeration<JarEntry> it = jar.entries(); it.hasMoreElements();) { JarEntry entry = it.nextElement(); @@ -189,6 +193,11 @@ public class GeneratePackageExports { int lastSlash = entry.getName().lastIndexOf('/'); String pkg = entry.getName().substring(0, lastSlash) .replace('/', '.'); + + if (startsWithNumber.matcher(pkg).find()) { + continue; + } + packages.add(pkg); } diff --git a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java index aace349392..0c09ae49c6 100644 --- a/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java +++ b/client/src/com/vaadin/client/ui/orderedlayout/AbstractOrderedLayoutConnector.java @@ -152,20 +152,7 @@ public abstract class AbstractOrderedLayoutConnector extends public void onElementResize(ElementResizeEvent e) { updateLayoutHeight(); if (needsExpand()) { - /* - * updateLayoutHeight causes calling of - * getLayoutManager().setNeedsMeasure(this) which informs this - * LayoutManager that the size of a component might have - * changed. Then a new layout phase is scheduled. So - * updateExpandCompensation must be delayed until layout phase - * will be completed. #12672 - */ - Scheduler.get().scheduleFinally(new ScheduledCommand() { - @Override - public void execute() { - getWidget().updateExpandCompensation(); - } - }); + getWidget().updateExpandCompensation(); } } }; diff --git a/server/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java b/server/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java index 257a958f3a..23a72ee1e5 100644 --- a/server/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java +++ b/server/src/com/vaadin/data/fieldgroup/BeanFieldGroup.java @@ -15,18 +15,20 @@ */ package com.vaadin.data.fieldgroup; +import java.beans.IntrospectionException; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; import com.vaadin.data.Item; import com.vaadin.data.util.BeanItem; +import com.vaadin.data.util.BeanUtil; import com.vaadin.data.validator.BeanValidator; import com.vaadin.ui.Field; public class BeanFieldGroup<T> extends FieldGroup { - private Class<T> beanType; + private final Class<T> beanType; private static Boolean beanValidationImplementationAvailable = null; private final Map<Field<?>, BeanValidator> defaultValidators; @@ -47,17 +49,20 @@ public class BeanFieldGroup<T> extends FieldGroup { * form "fieldName" or "fieldName.subField[.subField2]" but the * method declaration comes from parent. */ - java.lang.reflect.Field f; try { - f = getField(beanType, propertyId.toString()); - return f.getType(); - } catch (SecurityException e) { - throw new BindException("Cannot determine type of propertyId '" - + propertyId + "'.", e); - } catch (NoSuchFieldException e) { + Class<?> type = BeanUtil.getPropertyType(beanType, + propertyId.toString()); + if (type == null) { + throw new BindException( + "Cannot determine type of propertyId '" + + propertyId + + "'. The propertyId was not found in " + + beanType.getName()); + } + return type; + } catch (IntrospectionException e) { throw new BindException("Cannot determine type of propertyId '" - + propertyId + "'. The propertyId was not found in " - + beanType.getName(), e); + + propertyId + "'. Unable to introspect " + beanType, e); } } } @@ -79,32 +84,6 @@ public class BeanFieldGroup<T> extends FieldGroup { return null; } - private static java.lang.reflect.Field getField(Class<?> cls, - String propertyId) throws SecurityException, NoSuchFieldException { - if (propertyId.contains(".")) { - String[] parts = propertyId.split("\\.", 2); - // Get the type of the field in the "cls" class - java.lang.reflect.Field field1 = getField(cls, parts[0]); - // Find the rest from the sub type - return getField(field1.getType(), parts[1]); - } else { - try { - // Try to find the field directly in the given class - java.lang.reflect.Field field1 = cls - .getDeclaredField(propertyId); - return field1; - } catch (NoSuchFieldException e) { - // Try super classes until we reach Object - Class<?> superClass = cls.getSuperclass(); - if (superClass != null && superClass != Object.class) { - return getField(superClass, propertyId); - } else { - throw e; - } - } - } - } - private static String getFieldName(Class<?> cls, String propertyId) throws SecurityException, NoSuchFieldException { for (java.lang.reflect.Field field1 : cls.getDeclaredFields()) { diff --git a/server/src/com/vaadin/data/util/BeanItem.java b/server/src/com/vaadin/data/util/BeanItem.java index 64f30261c2..1be8b70f47 100644 --- a/server/src/com/vaadin/data/util/BeanItem.java +++ b/server/src/com/vaadin/data/util/BeanItem.java @@ -16,12 +16,8 @@ package com.vaadin.data.util; -import java.beans.BeanInfo; -import java.beans.IntrospectionException; -import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.lang.reflect.Method; -import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; @@ -189,7 +185,8 @@ public class BeanItem<BT> extends PropertysetItem { // Try to introspect, if it fails, we just have an empty Item try { - List<PropertyDescriptor> propertyDescriptors = getBeanPropertyDescriptor(beanClass); + List<PropertyDescriptor> propertyDescriptors = BeanUtil + .getBeanPropertyDescriptor(beanClass); // Add all the bean properties as MethodProperties to this Item // later entries on the list overwrite earlier ones @@ -210,106 +207,6 @@ public class BeanItem<BT> extends PropertysetItem { } /** - * Returns the property descriptors of a class or an interface. - * - * For an interface, superinterfaces are also iterated as Introspector does - * not take them into account (Oracle Java bug 4275879), but in that case, - * both the setter and the getter for a property must be in the same - * interface and should not be overridden in subinterfaces for the discovery - * to work correctly. - * - * For interfaces, the iteration is depth first and the properties of - * superinterfaces are returned before those of their subinterfaces. - * - * @param beanClass - * @return - * @throws IntrospectionException - */ - private static List<PropertyDescriptor> getBeanPropertyDescriptor( - final Class<?> beanClass) throws IntrospectionException { - // Oracle bug 4275879: Introspector does not consider superinterfaces of - // an interface - if (beanClass.isInterface()) { - List<PropertyDescriptor> propertyDescriptors = new ArrayList<PropertyDescriptor>(); - - for (Class<?> cls : beanClass.getInterfaces()) { - propertyDescriptors.addAll(getBeanPropertyDescriptor(cls)); - } - - BeanInfo info = Introspector.getBeanInfo(beanClass); - propertyDescriptors.addAll(getPropertyDescriptors(info)); - - return propertyDescriptors; - } else { - BeanInfo info = Introspector.getBeanInfo(beanClass); - return getPropertyDescriptors(info); - } - } - - // Workaround for Java6 bug JDK-6788525. Do nothing for JDK7+. - private static List<PropertyDescriptor> getPropertyDescriptors( - BeanInfo beanInfo) { - PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors(); - List<PropertyDescriptor> result = new ArrayList<PropertyDescriptor>( - descriptors.length); - for (PropertyDescriptor descriptor : descriptors) { - try { - Method readMethod = getMethodFromBridge(descriptor - .getReadMethod()); - if (readMethod != null) { - Method writeMethod = getMethodFromBridge( - descriptor.getWriteMethod(), - readMethod.getReturnType()); - if (writeMethod == null) { - writeMethod = descriptor.getWriteMethod(); - } - PropertyDescriptor descr = new PropertyDescriptor( - descriptor.getName(), readMethod, writeMethod); - result.add(descr); - } else { - result.add(descriptor); - } - } catch (SecurityException ignore) { - // handle next descriptor - } catch (IntrospectionException e) { - result.add(descriptor); - } - } - return result; - } - - /** - * Return not bridged method for bridge {@code bridgeMethod} method. If - * method {@code bridgeMethod} is not bridge method then return null. - */ - private static Method getMethodFromBridge(Method bridgeMethod) - throws SecurityException { - if (bridgeMethod == null) { - return null; - } - return getMethodFromBridge(bridgeMethod, - bridgeMethod.getParameterTypes()); - } - - /** - * Return not bridged method for bridge {@code bridgeMethod} method and - * declared {@code paramTypes}. If method {@code bridgeMethod} is not bridge - * method then return null. - */ - private static Method getMethodFromBridge(Method bridgeMethod, - Class<?>... paramTypes) throws SecurityException { - if (bridgeMethod == null || !bridgeMethod.isBridge()) { - return null; - } - try { - return bridgeMethod.getDeclaringClass().getMethod( - bridgeMethod.getName(), paramTypes); - } catch (NoSuchMethodException e) { - return null; - } - } - - /** * Expands nested bean properties by replacing a top-level property with * some or all of its sub-properties. The expansion is not recursive. * diff --git a/server/src/com/vaadin/data/util/BeanUtil.java b/server/src/com/vaadin/data/util/BeanUtil.java new file mode 100644 index 0000000000..e2f85a765c --- /dev/null +++ b/server/src/com/vaadin/data/util/BeanUtil.java @@ -0,0 +1,177 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.data.util; + +import java.beans.BeanInfo; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.io.Serializable; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.List; + +/** + * Utility class for Java Beans information access. + * + * @author Vaadin Ltd + */ +public final class BeanUtil implements Serializable { + // Prevent instantiation of util class + private BeanUtil() { + } + + /** + * Returns the property descriptors of a class or an interface. + * + * For an interface, superinterfaces are also iterated as Introspector does + * not take them into account (Oracle Java bug 4275879), but in that case, + * both the setter and the getter for a property must be in the same + * interface and should not be overridden in subinterfaces for the discovery + * to work correctly. + * + * NOTE : This utility method relies on introspection (and returns + * PropertyDescriptor) which is a part of java.beans package. The latter + * package could require bigger JDK in the future (with Java 9+). So it may + * be changed in the future. + * + * For interfaces, the iteration is depth first and the properties of + * superinterfaces are returned before those of their subinterfaces. + * + * @param beanClass + * @return + * @throws IntrospectionException + */ + public static List<PropertyDescriptor> getBeanPropertyDescriptor( + final Class<?> beanClass) throws IntrospectionException { + // Oracle bug 4275879: Introspector does not consider superinterfaces of + // an interface + if (beanClass.isInterface()) { + List<PropertyDescriptor> propertyDescriptors = new ArrayList<PropertyDescriptor>(); + + for (Class<?> cls : beanClass.getInterfaces()) { + propertyDescriptors.addAll(getBeanPropertyDescriptor(cls)); + } + + BeanInfo info = Introspector.getBeanInfo(beanClass); + propertyDescriptors.addAll(getPropertyDescriptors(info)); + + return propertyDescriptors; + } else { + BeanInfo info = Introspector.getBeanInfo(beanClass); + return getPropertyDescriptors(info); + } + } + + /** + * Returns {@code propertyId} class for property declared in {@code clazz}. + * Property could be of form "property.subProperty[.subProperty2]" i.e. + * refer to some nested property. + * + * @param clazz + * class where property is declared + * @param propertyId + * property of form "property" or + * "property.subProperty[.subProperty2]" + * @return class of the property + * @throws IntrospectionException + */ + public static Class<?> getPropertyType(Class<?> clazz, String propertyId) + throws IntrospectionException { + if (propertyId.contains(".")) { + String[] parts = propertyId.split("\\.", 2); + // Get the type of the field in the "cls" class + Class<?> propertyBean = getPropertyType(clazz, parts[0]); + // Find the rest from the sub type + return getPropertyType(propertyBean, parts[1]); + } else { + List<PropertyDescriptor> descriptors = getBeanPropertyDescriptor(clazz); + + for (PropertyDescriptor descriptor : descriptors) { + final Method getMethod = descriptor.getReadMethod(); + if (descriptor.getName().equals(propertyId) + && getMethod != null + && getMethod.getDeclaringClass() != Object.class) { + return descriptor.getPropertyType(); + } + } + return null; + } + } + + // Workaround for Java6 bug JDK-6788525. Do nothing for JDK7+. + private static List<PropertyDescriptor> getPropertyDescriptors( + BeanInfo beanInfo) { + PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors(); + List<PropertyDescriptor> result = new ArrayList<PropertyDescriptor>( + descriptors.length); + for (PropertyDescriptor descriptor : descriptors) { + try { + Method readMethod = getMethodFromBridge(descriptor + .getReadMethod()); + if (readMethod != null) { + Method writeMethod = getMethodFromBridge( + descriptor.getWriteMethod(), + readMethod.getReturnType()); + if (writeMethod == null) { + writeMethod = descriptor.getWriteMethod(); + } + PropertyDescriptor descr = new PropertyDescriptor( + descriptor.getName(), readMethod, writeMethod); + result.add(descr); + } else { + result.add(descriptor); + } + } catch (SecurityException ignore) { + // handle next descriptor + } catch (IntrospectionException e) { + result.add(descriptor); + } + } + return result; + } + + /** + * Return declared method for which {@code bridgeMethod} is generated. If + * {@code bridgeMethod} is not a bridge method then return null. + */ + private static Method getMethodFromBridge(Method bridgeMethod) + throws SecurityException { + if (bridgeMethod == null) { + return null; + } + return getMethodFromBridge(bridgeMethod, + bridgeMethod.getParameterTypes()); + } + + /** + * Return declared method for which {@code bridgeMethod} is generated using + * its {@code paramTypes}. If {@code bridgeMethod} is not a bridge method + * then return null. + */ + private static Method getMethodFromBridge(Method bridgeMethod, + Class<?>... paramTypes) throws SecurityException { + if (bridgeMethod == null || !bridgeMethod.isBridge()) { + return null; + } + try { + return bridgeMethod.getDeclaringClass().getMethod( + bridgeMethod.getName(), paramTypes); + } catch (NoSuchMethodException e) { + return null; + } + } +} diff --git a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java index 84dfe9b865..21a486a017 100644 --- a/server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java +++ b/server/src/com/vaadin/data/util/sqlcontainer/query/generator/DefaultSQLGenerator.java @@ -262,6 +262,12 @@ public class DefaultSQLGenerator implements SQLGenerator { count++; } if (versionColumn != null) { + if(!item.getItemPropertyIds().contains(versionColumn)) { + throw new IllegalArgumentException(String.format( + "Table '%s' does not contain version column '%s'.", + tableName, versionColumn)); + } + query.append(String.format(" AND %s = ?", QueryBuilder.quote(versionColumn))); sh.addParameterValue( diff --git a/server/src/com/vaadin/navigator/Navigator.java b/server/src/com/vaadin/navigator/Navigator.java index 80dad2244e..591f73dc75 100644 --- a/server/src/com/vaadin/navigator/Navigator.java +++ b/server/src/com/vaadin/navigator/Navigator.java @@ -371,6 +371,7 @@ public class Navigator implements Serializable { private View currentView = null; private List<ViewChangeListener> listeners = new LinkedList<ViewChangeListener>(); private List<ViewProvider> providers = new LinkedList<ViewProvider>(); + private String currentNavigationState = null; private ViewProvider errorProvider; /** @@ -551,6 +552,11 @@ public class Navigator implements Serializable { ViewChangeEvent event = new ViewChangeEvent(this, currentView, view, viewName, parameters); if (!fireBeforeViewChange(event)) { + // #10901. Revert URL to previous state if back-button navigation + // was canceled + if (currentNavigationState != null) { + getStateManager().setState(currentNavigationState); + } return; } @@ -561,6 +567,7 @@ public class Navigator implements Serializable { } if (!navigationState.equals(getStateManager().getState())) { getStateManager().setState(navigationState); + currentNavigationState = navigationState; } } diff --git a/server/src/com/vaadin/server/ClientConnector.java b/server/src/com/vaadin/server/ClientConnector.java index 50ce2754cb..b784aa5d35 100644 --- a/server/src/com/vaadin/server/ClientConnector.java +++ b/server/src/com/vaadin/server/ClientConnector.java @@ -26,6 +26,7 @@ import com.vaadin.shared.Connector; import com.vaadin.shared.communication.SharedState; import com.vaadin.ui.UI; import com.vaadin.util.ReflectTools; + import elemental.json.JsonObject; /** @@ -277,9 +278,8 @@ public interface ClientConnector extends Connector { * . * * @return a JSON object with the encoded connector state - * if the state can not be encoded */ - public JsonObject encodeState() ; + public JsonObject encodeState(); /** * Handle a request directed to this connector. This can be used by diff --git a/server/src/com/vaadin/server/VaadinService.java b/server/src/com/vaadin/server/VaadinService.java index fb93a44d37..36d6910a7a 100644 --- a/server/src/com/vaadin/server/VaadinService.java +++ b/server/src/com/vaadin/server/VaadinService.java @@ -703,12 +703,12 @@ public abstract class VaadinService implements Serializable { final boolean closeApplication = hasParameter(request, URL_PARAMETER_CLOSE_APPLICATION); - if (restartApplication) { - closeSession(session, request.getWrappedSession(false)); - return createAndRegisterSession(request); - } else if (closeApplication) { + if (closeApplication) { closeSession(session, request.getWrappedSession(false)); return null; + } else if (restartApplication) { + closeSession(session, request.getWrappedSession(false)); + return createAndRegisterSession(request); } else { return session; } diff --git a/server/src/com/vaadin/ui/ComboBox.java b/server/src/com/vaadin/ui/ComboBox.java index c2b80fae35..4af93113f9 100644 --- a/server/src/com/vaadin/ui/ComboBox.java +++ b/server/src/com/vaadin/ui/ComboBox.java @@ -622,7 +622,7 @@ public class ComboBox extends AbstractSelect implements if (caption == null || caption.equals("")) { continue; } else { - caption = caption.toLowerCase(); + caption = caption.toLowerCase(getLocale()); } switch (filteringMode) { case CONTAINS: @@ -682,7 +682,7 @@ public class ComboBox extends AbstractSelect implements currentPage = ((Integer) variables.get("page")).intValue(); filterstring = newFilter; if (filterstring != null) { - filterstring = filterstring.toLowerCase(); + filterstring = filterstring.toLowerCase(getLocale()); } requestRepaint(); } else if (isNewItemsAllowed()) { diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java index d5700c4b65..3d683f4902 100644 --- a/server/src/com/vaadin/ui/DateField.java +++ b/server/src/com/vaadin/ui/DateField.java @@ -319,7 +319,8 @@ public class DateField extends AbstractField<Date> implements // Create a defensive copy against issues when using java.sql.Date (and // also against mutable Date). - getState().rangeStart = new Date(startDate.getTime()); + getState().rangeStart = startDate != null ? new Date( + startDate.getTime()) : null; updateRangeValidator(); } @@ -439,7 +440,8 @@ public class DateField extends AbstractField<Date> implements // Create a defensive copy against issues when using java.sql.Date (and // also against mutable Date). - getState().rangeEnd = new Date(endDate.getTime()); + getState().rangeEnd = endDate != null ? new Date(endDate.getTime()) + : null; updateRangeValidator(); } diff --git a/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java b/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java index fbae0ee159..f82ba49c3e 100644 --- a/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java +++ b/server/tests/src/com/vaadin/data/util/sqlcontainer/SQLContainerTableQueryTest.java @@ -24,11 +24,15 @@ import com.vaadin.data.util.sqlcontainer.connection.SimpleJDBCConnectionPool; import com.vaadin.data.util.sqlcontainer.query.OrderBy; import com.vaadin.data.util.sqlcontainer.query.TableQuery; +import static org.junit.Assert.assertTrue; + public class SQLContainerTableQueryTest { private static final int offset = SQLTestsConstants.offset; private static final String createGarbage = SQLTestsConstants.createGarbage; private JDBCConnectionPool connectionPool; + private TableQuery peopleQuery; + private SQLContainer peopleContainer; @Before public void setUp() throws SQLException { @@ -43,6 +47,10 @@ public class SQLContainerTableQueryTest { } DataGenerator.addPeopleToDatabase(connectionPool); + + peopleQuery = new TableQuery("people", connectionPool, + SQLTestsConstants.sqlGen); + peopleContainer = new SQLContainer(peopleQuery); } @After @@ -53,6 +61,24 @@ public class SQLContainerTableQueryTest { } @Test + public void itemWithExistingVersionColumnIsRemoved() + throws SQLException { + peopleContainer.setAutoCommit(true); + peopleQuery.setVersionColumn("ID"); + + assertTrue(peopleContainer.removeItem(peopleContainer.lastItemId())); + } + + @Test(expected = IllegalArgumentException.class) + public void itemWithNonExistingVersionColumnCannotBeRemoved() throws SQLException { + peopleQuery.setVersionColumn("version"); + + peopleContainer.removeItem(peopleContainer.lastItemId()); + + peopleContainer.commit(); + } + + @Test public void constructor_withTableQuery_shouldSucceed() throws SQLException { new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); @@ -63,8 +89,8 @@ public class SQLContainerTableQueryTest { throws SQLException { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); - Assert.assertTrue(container.containsId(new RowId( - new Object[] { 1 + offset }))); + assertTrue(container.containsId(new RowId( + new Object[]{1 + offset}))); } @Test @@ -410,11 +436,11 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); if (SQLTestsConstants.db == DB.ORACLE) { - Assert.assertTrue(container.isFirstId(new RowId( - new Object[] { new BigDecimal(0 + offset) }))); + assertTrue(container.isFirstId(new RowId( + new Object[]{new BigDecimal(0 + offset)}))); } else { - Assert.assertTrue(container.isFirstId(new RowId( - new Object[] { 0 + offset }))); + assertTrue(container.isFirstId(new RowId( + new Object[]{0 + offset}))); } } @@ -449,11 +475,11 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); if (SQLTestsConstants.db == DB.ORACLE) { - Assert.assertTrue(container.isLastId(new RowId( - new Object[] { new BigDecimal(3 + offset) }))); + assertTrue(container.isLastId(new RowId( + new Object[]{new BigDecimal(3 + offset)}))); } else { - Assert.assertTrue(container.isLastId(new RowId( - new Object[] { 3 + offset }))); + assertTrue(container.isLastId(new RowId( + new Object[]{3 + offset}))); } } @@ -463,11 +489,11 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); if (SQLTestsConstants.db == DB.ORACLE) { - Assert.assertTrue(container.isLastId(new RowId( - new Object[] { new BigDecimal(4999 + offset) }))); + assertTrue(container.isLastId(new RowId( + new Object[]{new BigDecimal(4999 + offset)}))); } else { - Assert.assertTrue(container.isLastId(new RowId( - new Object[] { 4999 + offset }))); + assertTrue(container.isLastId(new RowId( + new Object[]{4999 + offset}))); } } @@ -478,7 +504,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); for (int i = 0; i < 5000; i++) { - Assert.assertTrue(container.containsId(container.getIdByIndex(i))); + assertTrue(container.containsId(container.getIdByIndex(i))); } } @@ -490,7 +516,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); container.setAutoCommit(true); for (int i = 0; i < 5000; i++) { - Assert.assertTrue(container.containsId(container.getIdByIndex(i))); + assertTrue(container.containsId(container.getIdByIndex(i))); } } @@ -523,7 +549,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); container.setAutoCommit(true); - Assert.assertTrue(container.isAutoCommit()); + assertTrue(container.isAutoCommit()); container.setAutoCommit(false); Assert.assertFalse(container.isAutoCommit()); } @@ -613,7 +639,7 @@ public class SQLContainerTableQueryTest { container.setAutoCommit(true); Object itemId = container.addItem(); Assert.assertNotNull(itemId); - Assert.assertTrue(itemId instanceof RowId); + assertTrue(itemId instanceof RowId); Assert.assertFalse(itemId instanceof TemporaryRowId); } @@ -696,7 +722,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.addItem(); - Assert.assertTrue(container.getItemIds().contains(id)); + assertTrue(container.getItemIds().contains(id)); } @Test @@ -717,7 +743,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.addItem(); - Assert.assertTrue(container.containsId(id)); + assertTrue(container.containsId(id)); } @Test @@ -747,7 +773,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("garbage", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.addItem(); - Assert.assertTrue(container.isFirstId(id)); + assertTrue(container.isFirstId(id)); } @Test @@ -756,7 +782,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.addItem(); - Assert.assertTrue(container.isLastId(id)); + assertTrue(container.isLastId(id)); } @Test @@ -766,7 +792,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); container.addItem(); Object id2 = container.addItem(); - Assert.assertTrue(container.isLastId(id2)); + assertTrue(container.isLastId(id2)); } @Test @@ -785,7 +811,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); int size = container.size(); Object id = container.firstItemId(); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.removeItem(id)); Assert.assertNotSame(id, container.firstItemId()); Assert.assertEquals(size - 1, container.size()); } @@ -795,7 +821,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.firstItemId(); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.removeItem(id)); Assert.assertFalse(container.containsId(id)); } @@ -806,7 +832,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); Object id = container.addItem(); int size = container.size(); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.removeItem(id)); Assert.assertFalse(container.containsId(id)); Assert.assertEquals(size - 1, container.size()); } @@ -816,7 +842,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.firstItemId(); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.removeItem(id)); Assert.assertNull(container.getItem(id)); } @@ -826,7 +852,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); Object id = container.addItem(); Assert.assertNotNull(container.getItem(id)); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.removeItem(id)); Assert.assertNull(container.getItem(id)); } @@ -836,8 +862,8 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.firstItemId(); - Assert.assertTrue(container.getItemIds().contains(id)); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.getItemIds().contains(id)); + assertTrue(container.removeItem(id)); Assert.assertFalse(container.getItemIds().contains(id)); } @@ -847,8 +873,8 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.addItem(); - Assert.assertTrue(container.getItemIds().contains(id)); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.getItemIds().contains(id)); + assertTrue(container.removeItem(id)); Assert.assertFalse(container.getItemIds().contains(id)); } @@ -857,8 +883,8 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.firstItemId(); - Assert.assertTrue(container.containsId(id)); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.containsId(id)); + assertTrue(container.removeItem(id)); Assert.assertFalse(container.containsId(id)); } @@ -869,8 +895,8 @@ public class SQLContainerTableQueryTest { SQLTestsConstants.sqlGen); SQLContainer container = new SQLContainer(query); Object id = container.addItem(); - Assert.assertTrue(container.containsId(id)); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.containsId(id)); + assertTrue(container.removeItem(id)); Assert.assertFalse(container.containsId(id)); } @@ -882,7 +908,7 @@ public class SQLContainerTableQueryTest { Object first = container.getIdByIndex(0); Object second = container.getIdByIndex(1); Object third = container.getIdByIndex(2); - Assert.assertTrue(container.removeItem(second)); + assertTrue(container.removeItem(second)); Assert.assertEquals(third, container.nextItemId(first)); } @@ -894,7 +920,7 @@ public class SQLContainerTableQueryTest { Object first = container.lastItemId(); Object second = container.addItem(); Object third = container.addItem(); - Assert.assertTrue(container.removeItem(second)); + assertTrue(container.removeItem(second)); Assert.assertEquals(third, container.nextItemId(first)); } @@ -906,7 +932,7 @@ public class SQLContainerTableQueryTest { Object first = container.getIdByIndex(0); Object second = container.getIdByIndex(1); Object third = container.getIdByIndex(2); - Assert.assertTrue(container.removeItem(second)); + assertTrue(container.removeItem(second)); Assert.assertEquals(first, container.prevItemId(third)); } @@ -918,7 +944,7 @@ public class SQLContainerTableQueryTest { Object first = container.lastItemId(); Object second = container.addItem(); Object third = container.addItem(); - Assert.assertTrue(container.removeItem(second)); + assertTrue(container.removeItem(second)); Assert.assertEquals(first, container.prevItemId(third)); } @@ -928,7 +954,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object first = container.firstItemId(); - Assert.assertTrue(container.removeItem(first)); + assertTrue(container.removeItem(first)); Assert.assertNotSame(first, container.firstItemId()); } @@ -941,7 +967,7 @@ public class SQLContainerTableQueryTest { Object first = container.addItem(); Object second = container.addItem(); Assert.assertSame(first, container.firstItemId()); - Assert.assertTrue(container.removeItem(first)); + assertTrue(container.removeItem(first)); Assert.assertSame(second, container.firstItemId()); } @@ -951,7 +977,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object last = container.lastItemId(); - Assert.assertTrue(container.removeItem(last)); + assertTrue(container.removeItem(last)); Assert.assertNotSame(last, container.lastItemId()); } @@ -962,7 +988,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); Object last = container.addItem(); Assert.assertSame(last, container.lastItemId()); - Assert.assertTrue(container.removeItem(last)); + assertTrue(container.removeItem(last)); Assert.assertNotSame(last, container.lastItemId()); } @@ -972,7 +998,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object first = container.firstItemId(); - Assert.assertTrue(container.removeItem(first)); + assertTrue(container.removeItem(first)); Assert.assertFalse(container.isFirstId(first)); } @@ -985,7 +1011,7 @@ public class SQLContainerTableQueryTest { Object first = container.addItem(); container.addItem(); Assert.assertSame(first, container.firstItemId()); - Assert.assertTrue(container.removeItem(first)); + assertTrue(container.removeItem(first)); Assert.assertFalse(container.isFirstId(first)); } @@ -995,7 +1021,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object last = container.lastItemId(); - Assert.assertTrue(container.removeItem(last)); + assertTrue(container.removeItem(last)); Assert.assertFalse(container.isLastId(last)); } @@ -1006,7 +1032,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); Object last = container.addItem(); Assert.assertSame(last, container.lastItemId()); - Assert.assertTrue(container.removeItem(last)); + assertTrue(container.removeItem(last)); Assert.assertFalse(container.isLastId(last)); } @@ -1015,7 +1041,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.getIdByIndex(2); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.removeItem(id)); Assert.assertEquals(-1, container.indexOfId(id)); } @@ -1025,8 +1051,8 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.addItem(); - Assert.assertTrue(container.indexOfId(id) != -1); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.indexOfId(id) != -1); + assertTrue(container.removeItem(id)); Assert.assertEquals(-1, container.indexOfId(id)); } @@ -1036,7 +1062,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Object id = container.getIdByIndex(2); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.removeItem(id)); Assert.assertNotSame(id, container.getIdByIndex(2)); } @@ -1048,7 +1074,7 @@ public class SQLContainerTableQueryTest { Object id = container.addItem(); container.addItem(); int index = container.indexOfId(id); - Assert.assertTrue(container.removeItem(id)); + assertTrue(container.removeItem(id)); Assert.assertNotSame(id, container.getIdByIndex(index)); } @@ -1056,7 +1082,7 @@ public class SQLContainerTableQueryTest { public void removeAllItems_table_shouldSucceed() throws SQLException { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); - Assert.assertTrue(container.removeAllItems()); + assertTrue(container.removeAllItems()); Assert.assertEquals(0, container.size()); } @@ -1067,7 +1093,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); container.addItem(); container.addItem(); - Assert.assertTrue(container.removeAllItems()); + assertTrue(container.removeAllItems()); Assert.assertEquals(0, container.size()); } @@ -1086,7 +1112,7 @@ public class SQLContainerTableQueryTest { } container.commit(); Assert.assertEquals(container.size(), itemNumber); - Assert.assertTrue(container.removeAllItems()); + assertTrue(container.removeAllItems()); container.commit(); Assert.assertEquals(container.size(), 0); } @@ -1098,7 +1124,7 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(query); Object id = container.addItem(); container.getContainerProperty(id, "NAME").setValue("New Name"); - Assert.assertTrue(id instanceof TemporaryRowId); + assertTrue(id instanceof TemporaryRowId); Assert.assertSame(id, container.lastItemId()); container.commit(); Assert.assertFalse(container.lastItemId() instanceof TemporaryRowId); @@ -1117,7 +1143,7 @@ public class SQLContainerTableQueryTest { Object id2 = container.addItem(); container.getContainerProperty(id, "NAME").setValue("Herbert"); container.getContainerProperty(id2, "NAME").setValue("Larry"); - Assert.assertTrue(id2 instanceof TemporaryRowId); + assertTrue(id2 instanceof TemporaryRowId); Assert.assertSame(id2, container.lastItemId()); container.commit(); Object nextToLast = container.getIdByIndex(container.size() - 2); @@ -1165,7 +1191,7 @@ public class SQLContainerTableQueryTest { Object key = container.firstItemId(); Item row = container.getItem(key); row.getItemProperty("NAME").setValue("Pekka"); - Assert.assertTrue(container.removeItem(key)); + assertTrue(container.removeItem(key)); container.commit(); Assert.assertEquals(size - 1, container.size()); } @@ -1217,7 +1243,7 @@ public class SQLContainerTableQueryTest { Assert.assertFalse(container.isModified()); RowItem last = (RowItem) container.getItem(container.lastItemId()); container.itemChangeNotification(last); - Assert.assertTrue(container.isModified()); + assertTrue(container.isModified()); } @Test @@ -1273,7 +1299,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); Assert.assertFalse(container.isModified()); container.removeItem(container.lastItemId()); - Assert.assertTrue(container.isModified()); + assertTrue(container.isModified()); } @Test @@ -1282,7 +1308,7 @@ public class SQLContainerTableQueryTest { connectionPool, SQLTestsConstants.sqlGen)); Assert.assertFalse(container.isModified()); container.addItem(); - Assert.assertTrue(container.isModified()); + assertTrue(container.isModified()); } @Test @@ -1292,7 +1318,7 @@ public class SQLContainerTableQueryTest { Assert.assertFalse(container.isModified()); container.getContainerProperty(container.lastItemId(), "NAME") .setValue("foo"); - Assert.assertTrue(container.isModified()); + assertTrue(container.isModified()); } @Test @@ -1301,9 +1327,9 @@ public class SQLContainerTableQueryTest { SQLContainer container = new SQLContainer(new TableQuery("people", connectionPool, SQLTestsConstants.sqlGen)); Collection<?> sortableIds = container.getSortableContainerPropertyIds(); - Assert.assertTrue(sortableIds.contains("ID")); - Assert.assertTrue(sortableIds.contains("NAME")); - Assert.assertTrue(sortableIds.contains("AGE")); + assertTrue(sortableIds.contains("ID")); + assertTrue(sortableIds.contains("NAME")); + assertTrue(sortableIds.contains("AGE")); Assert.assertEquals(3, sortableIds.size()); if (SQLTestsConstants.db == DB.MSSQL || SQLTestsConstants.db == DB.ORACLE) { diff --git a/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java b/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java new file mode 100644 index 0000000000..ff7faf1965 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocale.java @@ -0,0 +1,57 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.combobox; + +import java.util.Arrays; +import java.util.Locale; + +import com.vaadin.data.Property.ValueChangeEvent; +import com.vaadin.data.Property.ValueChangeListener; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.NativeSelect; + +public class FilteringTurkishLocale extends AbstractTestUI { + + @Override + protected void setup(VaadinRequest request) { + + final ComboBox comboBox = new ComboBox("Box", Arrays.asList( + "I without dot", "İ with dot")); + comboBox.setNullSelectionAllowed(false); + + NativeSelect localeSelect = new NativeSelect("Locale", Arrays.asList( + Locale.ENGLISH, new Locale("tr"))); + localeSelect.addValueChangeListener(new ValueChangeListener() { + @Override + public void valueChange(ValueChangeEvent event) { + comboBox.setLocale((Locale) event.getProperty().getValue()); + } + }); + localeSelect.setValue(Locale.ENGLISH); + + addComponents(localeSelect, comboBox); + } + + @Override + public String getDescription() { + return "When the Turkish locale is used," + + " filtering for 'i' should show the option with a dot" + + " while filtering for 'ı' should show the option witout a dot"; + } + +} diff --git a/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java b/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java new file mode 100644 index 0000000000..d7f8e233ec --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/combobox/FilteringTurkishLocaleTest.java @@ -0,0 +1,80 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.combobox; + +import java.util.List; + +import org.junit.Assert; +import org.junit.Test; + +import com.vaadin.testbench.By; +import com.vaadin.testbench.elements.ComboBoxElement; +import com.vaadin.testbench.elements.NativeSelectElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class FilteringTurkishLocaleTest extends MultiBrowserTest { + + @Test + public void testEnglishLocale() { + openTestURL(); + + setLocale("en"); + + List<String> suggestions = getFilterSuggestions("i"); + + Assert.assertEquals("Both suggestions should be present", 2, + suggestions.size()); + } + + @Test + public void testTurkishLocaleWithDot() { + openTestURL(); + + setLocale("tr"); + + List<String> suggestions = getFilterSuggestions("i"); + + Assert.assertEquals("There should be only one suggestion", 1, + suggestions.size()); + Assert.assertEquals("İ with dot", suggestions.get(0)); + } + + @Test + public void testTurkishLocaleWithoutDot() { + openTestURL(); + + setLocale("tr"); + + List<String> suggestions = getFilterSuggestions("ı"); + + Assert.assertEquals("There should be only one suggestion", 1, + suggestions.size()); + Assert.assertEquals("I without dot", suggestions.get(0)); + } + + private List<String> getFilterSuggestions(String string) { + ComboBoxElement comboBox = $(ComboBoxElement.class).first(); + comboBox.findElement(By.vaadin("#textbox")).sendKeys(string); + + return comboBox.getPopupSuggestions(); + } + + private void setLocale(String locale) { + NativeSelectElement selector = $(NativeSelectElement.class).first(); + selector.selectByText(locale); + } + +} diff --git a/uitest/src/com/vaadin/tests/components/table/DelayedColumnLayouting.java b/uitest/src/com/vaadin/tests/components/table/DelayedColumnLayouting.java new file mode 100644 index 0000000000..c327ddb6f3 --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/table/DelayedColumnLayouting.java @@ -0,0 +1,72 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.components.table; + +import com.vaadin.server.VaadinRequest; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Table; +import com.vaadin.ui.UI; +import com.vaadin.ui.VerticalLayout; + +/** + * For tables that are contained in a layout, a delayed column layouting should + * not be visible (because it makes the column jump around). + * + * #15189 + * + * @author Vaadin Ltd + */ +public class DelayedColumnLayouting extends UI { + + @Override + protected void init(VaadinRequest request) { + VerticalLayout verticalLayout = new VerticalLayout(); + verticalLayout.setSizeFull(); + final VerticalLayout layout = new VerticalLayout(); + layout.setSizeFull(); + layout.setSpacing(true); + + Button reset = new Button("Recreate layout with contained table"); + verticalLayout.addComponent(reset); + reset.addClickListener(new ClickListener() { + @Override + public void buttonClick(ClickEvent event) { + fillLayout(layout); + } + }); + + fillLayout(layout); + + verticalLayout.addComponent(layout); + verticalLayout.setExpandRatio(layout, 1f); + + setContent(verticalLayout); + } + + private void fillLayout(VerticalLayout layout) { + layout.removeAllComponents(); + + Table table = new Table(); + table.setSizeFull(); + table.addContainerProperty("First", String.class, ""); + table.addContainerProperty("This column jumps", String.class, ""); + + layout.addComponent(table); + layout.setExpandRatio(table, 1f); + } +}
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java b/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java new file mode 100644 index 0000000000..5c78a3f42a --- /dev/null +++ b/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonAction.java @@ -0,0 +1,128 @@ +package com.vaadin.tests.navigator; + +import com.vaadin.navigator.Navigator; +import com.vaadin.navigator.View; +import com.vaadin.navigator.ViewChangeListener; +import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Label; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.Window; + +public class NavigatorViewBlocksBackButtonAction extends AbstractTestUI { + + private Navigator navigator; + + protected static final String LABEL_MAINVIEW_ID = "LABEL_MAINVIEW_ID"; + protected static final String LABEL_PROMPTEDVIEW_ID = "LABEL_PROMPTEDVIEW_ID"; + + @Override + protected void setup(VaadinRequest request) { + navigator = new Navigator(this, this); + navigator.addView(MainView.NAME, new MainView()); + navigator.addView(ViewWithPromptedLeave.NAME, + new ViewWithPromptedLeave()); + navigator.navigateTo(MainView.NAME); + } + + class MainView extends VerticalLayout implements View { + + public static final String NAME = "mainview"; + + public MainView() { + Label label = new Label("MainView content"); + label.setId(LABEL_MAINVIEW_ID); + addComponent(label); + + Button buttonNavToAnotherView = new Button( + "Navigate to another view", new ClickListener() { + + @Override + public void buttonClick(ClickEvent event) { + navigator.navigateTo(ViewWithPromptedLeave.NAME); + } + }); + addComponent(buttonNavToAnotherView); + } + + @Override + public void enter(ViewChangeEvent event) { + } + + } + + class ViewWithPromptedLeave extends VerticalLayout implements View, + ViewChangeListener { + + public static final String NAME = "prompted"; + + protected boolean okToLeave; + + public ViewWithPromptedLeave() { + Label label = new Label("ViewWithPromptedLeave content"); + label.setId(LABEL_PROMPTEDVIEW_ID); + addComponent(label); + addComponent(new Label( + "Try to navigate back to first view with browser back button.")); + } + + @Override + public void enter(ViewChangeEvent event) { + event.getNavigator().addViewChangeListener(this); + } + + @Override + public boolean beforeViewChange(final ViewChangeEvent event) { + if (okToLeave) { + okToLeave = false; + return true; + } else { + final Window confirmationWindow = new Window("Confirm"); + confirmationWindow.setModal(true); + confirmationWindow.setClosable(true); + + VerticalLayout confirmationWindowLayout = new VerticalLayout(); + confirmationWindow.setContent(confirmationWindowLayout); + confirmationWindowLayout.setMargin(true); + confirmationWindowLayout.setSpacing(true); + confirmationWindowLayout.addComponent(new Label( + "Really exit this view?")); + confirmationWindowLayout.addComponent(new Button("Yeah, sure!", + new Button.ClickListener() { + + @Override + public void buttonClick(ClickEvent buttonEvent) { + okToLeave = true; + getUI().removeWindow(confirmationWindow); + event.getNavigator().navigateTo( + event.getViewName() + "/" + + event.getParameters()); + } + })); + getUI().addWindow(confirmationWindow); + return false; + } + } + + @Override + public void afterViewChange(ViewChangeEvent event) { + if (event.getNewView() != this) { + event.getNavigator().removeViewChangeListener(this); + } + } + } + + @Override + protected String getTestDescription() { + return "URL should not be changed when view blocks navigating away from view using the browser's Back-button"; + } + + @Override + protected Integer getTicketNumber() { + return 10901; + } +}
\ No newline at end of file diff --git a/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java b/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java new file mode 100644 index 0000000000..84abdca24b --- /dev/null +++ b/uitest/src/com/vaadin/tests/navigator/NavigatorViewBlocksBackButtonActionTest.java @@ -0,0 +1,95 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.navigator; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; + +import com.vaadin.testbench.elements.ButtonElement; +import com.vaadin.tests.tb3.MultiBrowserTest; + +public class NavigatorViewBlocksBackButtonActionTest extends MultiBrowserTest { + + @Test + public void testIfConfirmBack() { + openTestURL(); + + // keep URL of main view + final String initialUrl = driver.getCurrentUrl(); + + // do it 2 times to verify that login is not broken after first time + for (int i = 0; i < 2; i++) { + // go to prompted view + WebElement button = $(ButtonElement.class).first(); + button.click(); + + // click back button + driver.navigate().back(); + + // confirm "go back by clicking confirm button + WebElement buttonConfirmView = $(ButtonElement.class).first(); + buttonConfirmView.click(); + + // verify we are in main view and url is correct + waitForElementPresent(By + .id(NavigatorViewBlocksBackButtonAction.LABEL_MAINVIEW_ID)); + String currentUrl = driver.getCurrentUrl(); + assertEquals( + "Current URL should be equal to initial main view URL", + initialUrl, currentUrl); + } + } + + @Test + public void testIfCancelBack() { + openTestURL(); + + // go to prompted view + WebElement button = $(ButtonElement.class).first(); + button.click(); + + // keep URL of prompted view + final String initialPromptedUrl = driver.getCurrentUrl(); + + // click back button + driver.navigate().back(); + + // verify url is correct (is not changed) + waitForElementPresent(By + .id(NavigatorViewBlocksBackButtonAction.LABEL_PROMPTEDVIEW_ID)); + String currentUrl = driver.getCurrentUrl(); + assertEquals( + "Current URL should be equal to initial prompted view URL", + initialPromptedUrl, currentUrl); + + WebElement cancelButton = driver.findElement(By + .className("v-window-closebox")); + + // click cancel button + cancelButton.click(); + + // verify we leave in prompted view and url is correct + waitForElementPresent(By + .id(NavigatorViewBlocksBackButtonAction.LABEL_PROMPTEDVIEW_ID)); + currentUrl = driver.getCurrentUrl(); + assertEquals( + "Current URL should be equal to initial prompted view URL", + initialPromptedUrl, currentUrl); + } +} diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationLongPollingTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationLongPollingTest.java index a04d569e05..1d5ead7d98 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationLongPollingTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationLongPollingTest.java @@ -18,11 +18,7 @@ package com.vaadin.tests.push; import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; -import java.util.List; - import org.junit.Test; -import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.support.ui.Select; public class PushConfigurationLongPollingTest extends PushConfigurationTest { @@ -30,13 +26,13 @@ public class PushConfigurationLongPollingTest extends PushConfigurationTest { public void testLongPolling() throws InterruptedException { openDebugLogTab(); - new Select(getTransportSelect()).selectByVisibleText("LONG_POLLING"); + getTransportSelect().selectByText("Long polling"); assertThat(getStatusText(), containsString("fallbackTransport: long-polling")); assertThat(getStatusText(), containsString("transport: long-polling")); clearDebugMessages(); - new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); + getPushModeSelect().selectByText("Automatic"); waitForDebugMessage("Push connection established using long-polling", 10); waitForServerCounterToUpdate(); diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java index f5c015ad12..202db8d6b7 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationStreamingTest.java @@ -15,25 +15,24 @@ */ package com.vaadin.tests.push; -import org.junit.Test; -import org.openqa.selenium.support.ui.Select; - import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.MatcherAssert.assertThat; +import org.junit.Test; + public class PushConfigurationStreamingTest extends PushConfigurationTest { @Test public void testStreaming() throws InterruptedException { openDebugLogTab(); - new Select(getTransportSelect()).selectByVisibleText("STREAMING"); + getTransportSelect().selectByText("Streaming"); assertThat(getStatusText(), containsString("fallbackTransport: long-polling")); assertThat(getStatusText(), containsString("transport: streaming")); clearDebugMessages(); - new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); + getPushModeSelect().selectByText("Automatic"); waitForDebugMessage("Push connection established using streaming", 10); waitForServerCounterToUpdate(); diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java index bb5b420259..396160cc7d 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationTest.java @@ -20,8 +20,8 @@ import static org.junit.Assert.assertEquals; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedCondition; -import org.openqa.selenium.support.ui.Select; +import com.vaadin.testbench.elements.NativeSelectElement; import com.vaadin.tests.annotations.TestCategory; import com.vaadin.tests.tb3.MultiBrowserTest; @@ -49,7 +49,7 @@ abstract class PushConfigurationTest extends MultiBrowserTest { } protected void disablePush() throws InterruptedException { - new Select(getPushModeSelect()).selectByVisibleText("DISABLED"); + getPushModeSelect().selectByText("Disabled"); int counter = getServerCounter(); sleep(2000); @@ -57,12 +57,12 @@ abstract class PushConfigurationTest extends MultiBrowserTest { getServerCounter()); } - protected WebElement getPushModeSelect() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VVerticalLayout[0]/Slot[0]/VVerticalLayout[0]/Slot[0]/VNativeSelect[0]/domChild[0]"); + protected NativeSelectElement getPushModeSelect() { + return $(NativeSelectElement.class).caption("Push mode").first(); } - protected WebElement getTransportSelect() { - return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VVerticalLayout[0]/Slot[0]/VVerticalLayout[0]/Slot[1]/VNativeSelect[0]/domChild[0]"); + protected NativeSelectElement getTransportSelect() { + return $(NativeSelectElement.class).caption("Transport").first(); } protected int getServerCounter() { diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java b/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java index c9a813fac0..475fa2165f 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurationWebSocketTest.java @@ -23,7 +23,6 @@ import java.util.List; import org.junit.Test; import org.openqa.selenium.remote.DesiredCapabilities; -import org.openqa.selenium.support.ui.Select; public class PushConfigurationWebSocketTest extends PushConfigurationTest { @@ -40,8 +39,8 @@ public class PushConfigurationWebSocketTest extends PushConfigurationTest { @Test public void testWebsocket() throws InterruptedException { - new Select(getTransportSelect()).selectByVisibleText("WEBSOCKET"); - new Select(getPushModeSelect()).selectByVisibleText("AUTOMATIC"); + getTransportSelect().selectByText("Websocket"); + getPushModeSelect().selectByText("Automatic"); assertThat(getStatusText(), containsString("fallbackTransport: long-polling")); diff --git a/uitest/src/com/vaadin/tests/push/PushConfigurator.java b/uitest/src/com/vaadin/tests/push/PushConfigurator.java index 5a45ab7206..7da58af1da 100644 --- a/uitest/src/com/vaadin/tests/push/PushConfigurator.java +++ b/uitest/src/com/vaadin/tests/push/PushConfigurator.java @@ -87,11 +87,9 @@ public class PushConfigurator extends VerticalLayout { pushMode.addItem(PushMode.AUTOMATIC); for (Transport t : Transport.values()) { - transport.addItem(t.toString()); - fallbackTransport.addItem(t.toString()); + transport.addItem(t); + fallbackTransport.addItem(t); } - transport.addItem(""); - fallbackTransport.addItem(""); pushMode.setImmediate(true); transport.setImmediate(true); @@ -124,7 +122,7 @@ public class PushConfigurator extends VerticalLayout { transport.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { - Transport t = Transport.valueOf((String) transport.getValue()); + Transport t = (Transport) transport.getValue(); ui.getPushConfiguration().setTransport(t); refreshStatus(); } @@ -133,8 +131,7 @@ public class PushConfigurator extends VerticalLayout { fallbackTransport.addValueChangeListener(new ValueChangeListener() { @Override public void valueChange(ValueChangeEvent event) { - Transport t = Transport.valueOf((String) fallbackTransport - .getValue()); + Transport t = (Transport) fallbackTransport.getValue(); ui.getPushConfiguration().setFallbackTransport(t); refreshStatus(); } diff --git a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java index 76b851fd23..b5a345bd30 100644 --- a/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java @@ -32,7 +32,6 @@ import java.util.Collections; import java.util.List; import java.util.NoSuchElementException; -import com.vaadin.testbench.elements.TableElement; import org.apache.commons.io.IOUtils; import org.apache.http.HttpHost; import org.apache.http.HttpResponse; @@ -69,6 +68,7 @@ import com.vaadin.testbench.TestBenchDriverProxy; import com.vaadin.testbench.TestBenchElement; import com.vaadin.testbench.TestBenchTestCase; import com.vaadin.testbench.elements.LabelElement; +import com.vaadin.testbench.elements.TableElement; import com.vaadin.testbench.elements.VerticalLayoutElement; import com.vaadin.tests.components.AbstractTestUIWithLog; import com.vaadin.tests.tb3.MultiBrowserTest.Browser; @@ -257,7 +257,7 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { @Override public Object apply(WebDriver input) { try { - return table.getCell(row, 0) != null; + return table.getCell(row, 0) != null; } catch (NoSuchElementException e) { return false; } @@ -266,7 +266,8 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { } protected void scrollTable(TableElement table, int rows, int rowToWait) { - testBenchElement(table.findElement(By.className("v-scrollable"))).scroll(rows * 30); + testBenchElement(table.findElement(By.className("v-scrollable"))) + .scroll(rows * 30); waitUntilRowIsVisible(table, rowToWait); } @@ -430,6 +431,11 @@ public abstract class AbstractTB3Test extends TestBenchTestCase { @After public void tearDown() throws Exception { if (driver != null) { + try { + openTestURL("&closeApplication"); + } catch (Exception e) { + e.printStackTrace(); + } driver.quit(); } driver = null; |