[MGNLUI-5024] New detail sub-app implementation sets up IoC context improperly Created: 18/Feb/19  Updated: 02/Jul/19  Resolved: 01/Jul/19

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: 6.0
Fix Version/s: None

Type: Task Priority: Neutral
Reporter: Aleksandr Pchelintcev Assignee: Unassigned
Resolution: Obsolete Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
causality
is causing ECOMMERCE-136 TEST ONLY - Opening Details sub app Closed
relation
is related to MGNLUI-4997 Phase out ViewProvider and ViewContex... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: UI framework: forms, dialogs, content editing
Story Points: 8

 Description   

When closing the new impl of detail sub-app, the whole admincentral is prone to get corrupted since IoC context of the root sub-apps view isn't set up properly: the view is not created via framework utility (unlike browser sub-app case) and framework fails to determine the context reference of it, ending up falling back to the default (which is the whole admincentral scope) and possibly cleaning up the whole bean store, blowing up admincentral session.

Solution suggestion:

  • make sure that the root view of details sub-app is created with framework tools (e.g. view provider) and its context reference is allocated.
  • do a post-mortem, see how the situation could be mitigated (e.g. choose better defaults for the fallback IoC context)
  • consider providing base implementations of the sub-app that come with pre-set root views, configured properly IoC-wise. This is a good to do step, since framework users shouldn't care about things that the framework is able to provide out of the box.


 Comments   
Comment by Roman Kovařík [ 04/Jun/19 ]

The current state:

The detail can be opened multiple times but closing whole app afterwards causes 

java.lang.IllegalStateException: UI framework failed to resolved the current view context
 at info.magnolia.ui.framework.UiFrameworkView.getCurrentViewReference(UiFrameworkView.java:187) ~[magnolia-ui-framework-6.1-SNAPSHOT.jar:?]
 at info.magnolia.ui.framework.UiFrameworkView.destroy(UiFrameworkView.java:89) ~[magnolia-ui-framework-6.1-SNAPSHOT.jar:?]
 at info.magnolia.ui.contentapp.detail.ContentDetailSubApp.stop(ContentDetailSubApp.java:162) ~[magnolia-ui-framework-6.1-SNAPSHOT.jar:?]
 at

(Closing with X or cancel/commit action should have consistent behaviour and was not always the case)

Comment by Aleksandr Pchelintcev [ 01/Jul/19 ]

with the refactoring that came with the linked issue - this one seems to become obsolete

Comment by Nguyen Phung Chi [ 02/Jul/19 ]

Yes, agreed, it works fine now. Thank you.

Generated at Mon Feb 12 09:22:28 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.