-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
None
-
None
Update Java code and context on https://docs.magnolia-cms.com/product-docs/6.2/Apps/Developing-an-app/Programming-an-app.html.
Original Description by Michiel: The example uses deprecated constructor
public class HelloWorldApp extends BaseApp { @Inject public HelloWorldApp(AppContext appContext, AppView view) { super(appContext, view); } ...
The used constructor
/** * since 6.2 use {@link #BaseApp(AppContext, AppView, SimpleTranslator)} instead */ @Deprecated protected BaseApp(AppContext appContext, AppView view) { this(appContext, view, Components.getComponent(SimpleTranslator.class)); }
Is deprecated. This is silly.
The way to go would be this version of the constructor:
@Inject public HelloWorldApp(AppContext appContext, AppView view, SimpleTranslator i18n) { super(appContext, view, i18n); }
############################################
A second topic on this page merged from DOCU-2293:
I think it would be really helpful as the last step of this documentation to explain how to use this app. One customer complained that they didn't understand it and I think it's because the last step of the app definition is missing.
../resources/<your-module-name>/apps/hello-world-app.yaml (maven)
<your-light-module-name>/apps/hello-world-app.yaml (light-module)
label: Helloworld name: helloworld appClass: info.magnolia.ui.app.helloworld.HelloWorldApp icon: icon-items class: info.magnolia.ui.api.app.AppDescriptor subApps: main: label: Helloworld subAppClass: info.magnolia.ui.app.helloworld.main.HelloWorldMainSubApp class: info.magnolia.ui.api.app.registry.ConfiguredSubAppDescriptor greeter: subAppClass: info.magnolia.ui.app.helloworld.greeter.HelloWorldGreeterSubApp class: info.magnolia.ui.api.app.registry.ConfiguredSubAppDescriptor
- relates to
-
MGNLUI-6888 DEV DOC: Content app example for M6 UI
- Closed