...
The flickr-simple-browser
module is an example of how to build a custom content app. The module installs an app that allows you to browse photos on Flickr. We use a String
as ItemId, which is easy to implement but has the disadvantage that we cannot tell the difference between photos and albums. This example also shows how to use an external Web service as the data source. The list view and the thumbnail view use the same Container coupled to a
Javadoc resource link |
---|
rangeHigherVersion | 5.65 |
---|
className | info.magnolia.ui.vaadin.integration.contentconnector.ContentConnector |
---|
renderType | asynchronous |
---|
|
. See also
Content app with an Object ItemId and different containers for an example of a hierarchical container.
...
flickr-simple-browser
| required App |
subapps
| required
|
browser
| required Subapp |
class
| required Javadoc resource link |
---|
0 | info.magnolia.ui.contentapp.browser.BrowserSubAppDescriptor |
---|
rangeHigherVersion | 5.65 |
---|
className | info.magnolia.ui.contentapp.browser.BrowserSubAppDescriptor |
---|
renderType | asynchronous |
---|
|
|
subAppClass
| required Javadoc resource link |
---|
0 | info.magnolia.ui.contentapp.browser.BrowserSubApp |
---|
rangeHigherVersion | 5.65 |
---|
className | info.magnolia.ui.contentapp.browser.BrowserSubApp |
---|
renderType | asynchronous |
---|
|
|
appClass
| required Must be Javadoc resource link |
---|
0 | info.magnolia.ui.contentapp.ContentApp |
---|
rangeHigherVersion | 5.65 |
---|
className | info.magnolia.ui.contentapp.ContentApp |
---|
renderType | asynchronous |
---|
|
or a subclass. |
...
An Item
has properties and every property is identified by its property ID. Define the properties in an interface. In this module we define the interface
Javadoc resource link |
---|
0 | info.magnolia.flickr.simplebrowser.app.item.SimpleFlickrItem |
---|
rangeHigherVersion | 51.61 |
---|
className | info.magnolia.flickr.simplebrowser.app.item.SimpleFlickrItem |
---|
renderType | asynchronous |
---|
|
.
...
Every subapp must configure its own content connector. The
Javadoc resource link |
---|
0 | info.magnolia.flickr.simplebrowser.app.contentconnector.ConfiguredSimpleFlickrBrowserContentConnectorDefinition |
---|
rangeHigherVersion | 1.1 |
---|
className | info.magnolia.flickr.simplebrowser.app.contentconnector.ConfiguredSimpleFlickrBrowserContentConnectorDefinition |
---|
renderType | asynchronous |
---|
|
class extends Javadoc resource link |
---|
0 | info.magnolia.ui.vaadin.integration.contentconnector.ConfiguredContentConnectorDefinition |
---|
rangeHigherVersion | 5.65 |
---|
className | info.magnolia.ui.vaadin.integration.contentconnector.ConfiguredContentConnectorDefinition |
---|
renderType | asynchronous |
---|
|
and sets the implementation class Javadoc |
---|
0 | info.magnolia.flickr.simplebrowser.app.contentconnector.SimpleFlickrBrowserContentConnectorImpl |
---|
|
....
Javadoc resource link |
---|
0 | info.magnolia.ui.contentapp.contentconnector.ContentConnectorProvider |
---|
rangeHigherVersion | 5.65 |
---|
className | info.magnolia.ui.contentapp.contentconnector.ContentConnectorProvider |
---|
renderType | asynchronous |
---|
|
creates and provides only one instance of SimpleFlickrBrowserContentConnector
in our subapp. The content connector can be injected into any class used within the subapp. You can cast it to your own type if required....
We use the same container for the tree view and the thumbnail view. In this case it would be sufficient to implement just the base interface Container. However, we also implement
Javadoc resource link |
---|
0 | info.magnolia.ui.workbench.container.Refreshable |
---|
rangeHigherVersion | 5.65 |
---|
className | info.magnolia.ui.workbench.container.Refreshable |
---|
renderType | asynchronous |
---|
|
so we can use the refresh mechanism in the Magnolia workbench. We also need the
Container.Indexed
subinterface for lazy loading.
...
In the presenter class, extend
Javadoc resource link |
---|
0 | info.magnolia.ui.workbench.thumbnail.ThumbnailPresenter |
---|
rangeHigherVersion | 5.65 |
---|
className | info.magnolia.ui.workbench.thumbnail.ThumbnailPresenter |
---|
renderType | asynchronous |
---|
|
and initialize the container:
...