info.magnolia.sample.app.editor
Class SampleEditorSubApp

java.lang.Object
  extended by info.magnolia.ui.framework.app.BaseSubApp
      extended by info.magnolia.sample.app.editor.SampleEditorSubApp
All Implemented Interfaces:
SampleEditorView.Listener, SubApp

public class SampleEditorSubApp
extends BaseSubApp
implements SampleEditorView.Listener

SubApp for editor tabs in sample app.


Constructor Summary
SampleEditorSubApp(SubAppContext subAppContext, SampleEditorView view, info.magnolia.event.EventBus subAppEventBus, info.magnolia.i18nsystem.SimpleTranslator i18n)
           
 
Method Summary
 String getCaption()
          This method will try to determine the current sub app caption, the one usually displayed in the tab where the subapp opens.
 View start(Location location)
           
 boolean supportsLocation(Location location)
          Overwrite supportsLocation to implement custom handling of subApp opening.
 
Methods inherited from class info.magnolia.ui.framework.app.BaseSubApp
getAppContext, getCurrentLocation, getSubAppContext, getSubAppId, getView, isCloseable, locationChanged, onSubAppStart, onSubAppStop, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SampleEditorSubApp

@Inject
public SampleEditorSubApp(SubAppContext subAppContext,
                                 SampleEditorView view,
                                 @Named(value="subapp")
                                 info.magnolia.event.EventBus subAppEventBus,
                                 info.magnolia.i18nsystem.SimpleTranslator i18n)
Method Detail

getCaption

public String getCaption()
Description copied from class: BaseSubApp
This method will try to determine the current sub app caption, the one usually displayed in the tab where the subapp opens.

Specified by:
getCaption in interface SubApp
Overrides:
getCaption in class BaseSubApp
Returns:
the configured label for this subapp. If no label is found in the subapp configuration, it will try to use the label from the parent app. If the latter is missing too, it will return an empty string.

start

public View start(Location location)
Specified by:
start in interface SubApp
Overrides:
start in class BaseSubApp

supportsLocation

public boolean supportsLocation(Location location)
Overwrite supportsLocation to implement custom handling of subApp opening. Will take care of the location change in case the current view name equals the new view name.

Specified by:
supportsLocation in interface SubApp
Overrides:
supportsLocation in class BaseSubApp
Parameters:
location - the new location
Returns:
true if current SubApp should handle the location update


Copyright © 2013 Magnolia International Ltd.. All Rights Reserved.