ItemSubApp: create new AbstractSubApp class to handle editing of items (MGNLUI-138)

[MGNLUI-153] ItemSubApp: create action to open subapp instead of dialog Created: 08/Nov/12  Updated: 11/Feb/13  Resolved: 27/Nov/12

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

Type: Sub-task Priority: Neutral
Reporter: Espen Jervidalo Assignee: Espen Jervidalo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLUI-230 Simplify SubAppViews Closed
Template:
Date of First Response:

 Description   

use location change to trigger subapp launch.
Before:
we got the dialog name from the actionDefinition.
DialogPresenter created. dialogPresenter launched itself into the shell "openDialog"
New:
get appId, subAppId from actionDefinition
pass the node as paramater
workbenchDefinition has new configurable parameter "formName" to launch the right "form"builder.



 Comments   
Comment by Jan Haderka [ 27/Nov/12 ]
  • AbstractItemSubApp, ItemLocation, EditItemAction, ItemPresenter, ItemViewImpl and LOTS of others
    • class level javadoc
    • It seems you have set a template to generate class level javadoc like that to avoid having failures from checkstyle. This is wrong. We use checkstyle to make sure that our code is well documented not to play hide and seek and check who can better fool the tool.
  • ItemPresenter.initContentView()
    • lot's of commented out code - should be removed completely if it is not used
  • FormDialogPresenterImpl
    -        shell.openDialog(this);
    +        //shell.openDialog(this);
    
    • do not leave in commented out code. Either it is useless and should be removed or it is a temporary workaround and should be documented and removed when ticket is solved.
  • ItemWorkbenchPresenter
            //bindHandlers();
    108         return view;
    109     }
    110
    111     @Override
    112     public void onViewTypeChanged(final ItemView.ViewType viewType) {
    113         //subAppEventBus.fireEvent(new ViewTypeChangedEvent(viewType));
    114     }
    
    • do not leave in commented out code. Either it is useless and should be removed or it is a temporary workaround and should be documented and removed when ticket is solved.
  • ItemWorkbenchViewImpl
    @Override
    130     public ContentView getSelectedView() {
    131         return null;
    132     }
    
    • this seems wrong ... if there is a reason for returning null, it should be explain in javadoc or in inline comment
  • config.modules.ui-admincentral.workbenchActionRegistry.xml
    • metadata needs to go
  • EditItemAction
       @Override
    61     public void execute() throws ActionExecutionException {
    67  ...
    68         } catch (RepositoryException e) {
    69             e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
    70         }
    71
    72
    73     }
    
    • do not print stack trace like this ... ever. Since you have AEE in the signature you should rethrow RepoEx as AEE
  • EditItemActionDefinition, ContactsItemView
    • completely empty interface ... why? Javadoc is necessary to explain it
Comment by Espen Jervidalo [ 27/Nov/12 ]

see MGNLUI-230

Generated at Mon Feb 12 08:34:06 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.