[MGNLUI-4269] SearchContentToolPresenter & View: Opening multiple apps seem always to operate on the search presenter & view of the first instantiated app. Created: 14/Aug/17 Updated: 21/Aug/17 Resolved: 21/Aug/17 |
|
| Status: | Closed |
| Project: | Magnolia UI |
| Component/s: | app framework, content app |
| Affects Version/s: | 5.4.13, 5.5.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Christian Ringele | Assignee: | Unassigned |
| Resolution: | Not an issue | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||
| Issue Links: |
|
||||
| Template: |
|
||||
| Acceptance criteria: |
Empty
|
||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||
| Date of First Response: | |||||
| Description |
|
I tried to implement for this support ticket SUPPORT-7792 following: This lead to a very strange behavior: Reproduce with any of the patches:
I created 5 patches so you can look at it easily: I also ran to code agains 5.4.13, same behavior (suspected Guice changes of possible cause) |
| Comments |
| Comment by Aleksandr Pchelintcev [ 21/Aug/17 ] |
|
Hi, cringele As Vaadin forum thread suggests, in order to get the shortcuts to work in a more predictable way, you have to fallback to the "wrap-the-view-in-panel" workaround. I don't see the references to attempting that approach in the issue description. However, I see that the second patch tries to utilise it, but incorrectly (see arrow comments in the snippet):
searchField = buildSearchField();
+ Panel panel = new Panel();
+ panel.setContent(searchField); <----- Field is attached to the panel!!
+ panel.focus();
+ System.out.println("=====================");
+ System.out.println("Iinitialization start");
+ System.out.println("view id init: " + this.hashCode());
+ System.out.println("searchField id init: " + searchField.hashCode());
+ System.out.println("=====================");
+
setVisible(true);
addComponent(searchField); <- Field is re-attached to the root layout (removed from panel)!!
addComponent(clearSearchBoxButton);
In order to arrange it right, it is the wrapper panel what should've been attached to the root layout, so that it becomes a part of component hierarchy. |
| Comment by Christian Ringele [ 21/Aug/17 ] |
|
Attached the fully working patch 'SearchContentToolViewImpl-FullyWorking.patch'.
|