John Ahlroos [Wed, 30 Jul 2014 11:29:33 +0000 (14:29 +0300)]
Removed ColumnGroup implementation from client side Grid #13334
The ColumnGroup concept was depracated in favour of directly
manipulating the header/footer cell colspans. This changeset removes the
old dead code no longer in use.
Client-side Grid header/footer rewrite: add default header support (#13334)
Currently supported:
* Adding and removal of header and footer rows
* Header is single-row by default
* Footer is zero-row by default
* Text captions
* Showing and hiding the whole header or footer
* Default header rows for sorting UI
TODO:
* Column spanning
* HTML content
* Widget content
* Component content
* Server side API
* Shared state handling
Grid header/footer rewrite: add partial shared state support (#13334)
Currently supported:
* Adding and removal of header and footer rows
* Header is single-row by default
* Footer is zero-row by default
* Text captions
* Showing and hiding the whole header or footer
* Passing captions and visibility in shared state
TODO:
* Column spanning
* HTML content
* Widget content
* Component content
* Sorting/Indicators
* Server side API
* Rest of shared state handling
Currently supported:
* Adding and removal of header and footer rows
* Header is single-row by default
* Footer is zero-row by default
* Text captions
* Showing and hiding the whole header or footer
TODO:
* Column spanning
* HTML content
* Widget content
* Component content
* Sorting/Indicators
* Server side API
* Shared state handling
Fabian Lange [Fri, 11 Jul 2014 22:00:41 +0000 (00:00 +0200)]
Improves performance of VaadinService.requestEnd(). (#14218)
Doing two times session.accessSynchronously is unnecessary effort in
multiple aspects:
* The session will be locked twice.
* CurrentInstances are set twice.
* CurrentInstances are restored twice.
* VaadinSession being checked for being the current via
VaadinService.verifyNoOtherSessionLocked(this);
When we leave requestEnd we unset all CurrentInstances. There is no need
to just restore them before doing so.
When we are in requestEnd, VaadinSession is set to "current" by
PushHandler.callWithUi() or VaadinService.handleRequest().
Also, the cleanupSession code does not need any of these thread locals,
so not having them set would also not hurt.
having an extra accessSynchronously call for just setting the duration
does not make a lot of sense. While it somehow wants to make the previous
accessSynchronously call to be counted completely into the duration it
invests an the same time that would have been left out additionally.
VaadinService removeClosedUIs is a cleanup which also locks and sets
CurrentInstances just to figure out that the UI it is checking is not
closing. This change moves that check out of ui.accessSynchronously.
In the end, the resulting code is a tiny bit less robust, however it
eliminates over 50% response time on trivial push request/responses.
Client-side Grid header/footer rewrite: add simple footer support (#13334)
Currently supported:
* A single-row hard-coded header
* A zero-row hard-coded footer
* Text captions
TODO:
* 0..n headers and footers
* Column spanning
* HTML content
* Widget content
* Component content
* Sorting/Indicators
* Server side API
* Shared state handling
Start rewrite of client-side Grid header/footer API (#13334)
The old API is marked as deprecated and does not work anymore.
Currently supported:
* A single hard-coded header
* Text captions
TODO:
* Footers
* 0..n headers and footers
* Column spanning
* HTML content
* Widget content
* Component content
* Sorting/Indicators
* Server side API
* Shared state handling
Fabian Lange [Sat, 12 Jul 2014 19:44:09 +0000 (21:44 +0200)]
Optimizes initial sizes of frequently used Collections. (#14223)
There are a few places in frequently used core classes which could
initialize collection classes with the correct (or slightly oversized)
length.
Maps are initialized with 2x the size due to its load factor.
Fabian Lange [Sat, 12 Jul 2014 19:09:32 +0000 (21:09 +0200)]
Optimize CurrentInstance.set(UI) and .set(VaadinSession). (#14220)
This change reduces the amount of intermediate steps taken to initialize
the thread locals for a given ui or vaadin session.
It mainly takes advantage of reusing the old values from the map in set()
instead of creating new ones to put into the "old" map which is returned.
Fabian Lange [Fri, 11 Jul 2014 21:43:03 +0000 (23:43 +0200)]
removes extra VaadinSession.setCurrent() from PushHandler. (#14222)
The setCurrent call on VaadinSession is not needed. the one extra call
can be saved because service.findVaadinSession will already set it.
Added a comment like it is done for UI (service.findUI will also set the
UI).
Generate type data for AbstractRendererConnector.createRenderer (#13334)
The declared return type of the most-derived getRenderer method is stored
to make the default createRenderer implementation work. This is identical
to the way AbstractComponentConnector getWidget and createWidget work.
Fabian Lange [Wed, 9 Jul 2014 14:23:43 +0000 (16:23 +0200)]
Fix overwrite mechanism for web.xml atmosphere init params (#14196).
Non obvious problem before. "config" is a property of AtmosphereFramework
which also has getInitParameter(String) method. So it compiles but does
not do what is intended: to check against the user defined web.xml
servlet init-prams.
(the variableName servletConfig has the same problem :-))
Box and unbox long values in state fields (#14176)
We actually want to pass around the primitive long values emulated by
GWT even though JavaScript code can't do anything with the values.
Skipping the unboxing caused long fields to always be 0 since that's how
JavaScript converts an object into a number.
This patch also makes the test assert that the expected state values are
received and updates those values to actually make sense in some
situations.
Return a value on __gwtStatsEvent in Profiler (#11709)
Calling GWT RPC throw an exception when __gwtStatsEvent doesn't return
a boolean. This was in the Profiler.ensureNoLogger where the function
assigned was empty.
Fabian Lange [Thu, 3 Jul 2014 21:52:05 +0000 (23:52 +0200)]
Avoid object creation in getAllChildrenIterable in most cases. (#14142)
API change from:
public static Iterable<ClientConnector> getAllChildrenIterable(final ClientConnector connector)
to
public static Iterable<? extends ClientConnector> getAllChildrenIterable(final ClientConnector connector)
avoids creating wrappers in case the component has either no subcomponents
or no extensions. This covers the vast majority of components.