Package com.storedobject.ui
Class HTMLView
java.lang.Object
com.storedobject.vaadin.View
com.storedobject.vaadin.Viewer
com.storedobject.ui.HTMLView
- All Implemented Interfaces:
ClickHandler,CloseableView,ExecutableView,ValueChangeHandler,com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.component.ClickEvent<? extends com.vaadin.flow.component.Component>>,com.vaadin.flow.component.HasValue.ValueChangeListener,Serializable,Runnable,EventListener
- Direct Known Subclasses:
HomeHTMLView
Create a
View from some HTML content. The HTML may contain
references to media content using ${media} variable where media is the name of the media to set.
(MediaFiles can be stored in the DB). If the HTML is a full-fledged one (if it
starts with a html tag), an IFrame will be created as the component of the View. Otherwise,
a TemplateLayout is created.- Author:
- Syam
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.storedobject.vaadin.ClickHandler
ClickHandler.ModifiedClickEvent<C extends com.vaadin.flow.component.Component> -
Constructor Summary
ConstructorsConstructorDescriptionHTMLView(TextContent textContent) Constructor.HTMLView(TextContent textContent, boolean windowMode) Constructor.HTMLView(Application application) Constructor.HTMLView(Application application, boolean windowMode) Constructor.Constructor.Constructor.Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.component.ComponentGet the component that is used internally to render the HTML.booleanCheck if this view is a "Home View" or not.static booleanprotected booleanWhether to show a header with caption or not even in non-window mode.Methods inherited from class com.storedobject.vaadin.Viewer
createWindow, createWindowDecorator, decorateComponent, getViewHeight, getViewWidthMethods inherited from class com.storedobject.vaadin.View
abort, aborted, addClosedListener, addOpenedListener, clean, close, createCloseableView, execute, execute, execute, executing, focus, focus, focusAny, getApplication, getCaption, getComponent, getContent, getCreatedBy, getEmbeddedView, getMenuItem, getMenuItem, getView, initUI, invoke, isFullScreen, isScrollable, isWindowMode, select, setCaption, setComponent, setCreatedBy, setDefaultPadding, setEmbeddedView, setFirstFocus, setFullScreen, setScrollable, setWindowMode, skipFirstFocusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.storedobject.vaadin.ClickHandler
clicked, doubleClicked, onComponentEvent, rightClickedMethods inherited from interface com.storedobject.vaadin.ExecutableView
clearAlerts, clicked, createMenuItem, error, getMenuIconName, getView, isCloseable, log, log, message, returnedFrom, run, setClickable, speak, trackValueChange, tray, valueChanged, warningMethods inherited from interface com.storedobject.vaadin.ValueChangeHandler
valueChanged
-
Constructor Details
-
HTMLView
Constructor. Currently, running logic title will be used as the "text content name".- Parameters:
application- Application instance.
-
HTMLView
Constructor.- Parameters:
textContentName- Name of the text content to set.
-
HTMLView
Constructor. The running logic title will be used as the "text content name".- Parameters:
application- Application instance.windowMode- Whether to show it in a window or not.
-
HTMLView
Constructor.- Parameters:
textContentName- Name of the text content to set.windowMode- Whether to show it in a window or not.
-
HTMLView
Constructor.- Parameters:
textContent- Text content to set.
-
HTMLView
Constructor.- Parameters:
textContent- Text content to set.windowMode- Whether to show it in a window or not.
-
HTMLView
Constructor.- Parameters:
htmlContent- HTML content.windowMode- Whether to show it in a window or not.
-
HTMLView
-
-
Method Details
-
showHeader
protected boolean showHeader()Whether to show a header with caption or not even in non-window mode. (Default implementation returns true) unless it's aHomeView.- Returns:
- True/false.
-
isHomeView
public boolean isHomeView()Description copied from interface:ExecutableViewCheck if this view is a "Home View" or not. A "Home View" will not show any menu when it gets executed. Typically, views that show background images or some sort of dashboards can be defined as "Home Views" so that they will always appear on the content portion of theApplication.- Returns:
- True if this view is a "Home View". By default, if a view implements
HomeViewor its internal component (View.getComponent()) implementsHomeView, this method returntrue.
-
isHTML
-
getViewerComponent
public com.vaadin.flow.component.Component getViewerComponent()Get the component that is used internally to render the HTML.- Returns:
- The viewer component.
-