Bugfix
Detail
#27533
Unnecessary execution of the "visibleButtonCount" control command
In a tl:ButtonComponent commands are hidden on client side if there is not enough space.
When the window is resized, the number of hidden buttons is calculated on the client side and sent lazy to the server. There the value is updated. When the tl:ButtonBarControl is drawn initially, the value is also recreated and sent to the server.
This happens even if the value has not changed at all.
Improvement
The value stored on the server is also sent to the client. If it is determined that nothing has changed when the value is calculated, no event is sent.
Test
JavaScript debugging!
- Breakpoint in services.viewport.updateServerState method (in viewport.js) in the line with "services.ajax.executeOrUpdateLazy".
- Viewing Technical Demo > Layout Framework #1 > Forms
- Change viewport so that the number of buttons does not change.
- Expectation: The control flow does not reach the breakpoint.
- Change viewport so that the number of buttons changes.
- Expectation: The control flow comes to the breakpoint.
- Change the value in an input field, exit the input field, press F5.
- Expectation: The control flow does not reach the breakpoint. (No change from server value.)
- Change the viewport so that the number of buttons changes.
- Press F5:
- Expectation: The control flow comes to the breakpoint. (The change is "lazy" and was not sent; the server still has the old value).