Class ReactComponent
- java.lang.Object
-
- org.apache.wicket.Component
-
- org.apache.wicket.markup.html.WebComponent
-
- com.inductiveautomation.ignition.gateway.web.components.react.ReactComponent
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.wicket.event.IEventSink
,org.apache.wicket.event.IEventSource
,org.apache.wicket.IConverterLocator
,org.apache.wicket.markup.html.IHeaderContributor
,org.apache.wicket.request.component.IRequestableComponent
,org.apache.wicket.util.IHierarchical<org.apache.wicket.Component>
,org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
GatewayBreadCrumb
,TrialBar
public class ReactComponent extends org.apache.wicket.markup.html.WebComponent
Created by carlg on 2/8/2016.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ReactComponent(java.lang.String id, java.lang.String jsUrl, java.lang.String libraryName)
ReactComponent(java.lang.String id, java.lang.String jsUrl, java.lang.String libraryName, boolean useWicketId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
getElementScript()
protected boolean
isLoadDynamic()
Override this to return false if you want to try and load the component's js file statically.void
onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream, org.apache.wicket.markup.ComponentTag openTag)
void
renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
-
Methods inherited from class org.apache.wicket.Component
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, get, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getId, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getSizeInBytes, getStatelessHint, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalInitialize, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onAfterRender, onAfterRenderChildren, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModel, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, toString, toString, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
-
-
-
-
Constructor Detail
-
ReactComponent
public ReactComponent(java.lang.String id, java.lang.String jsUrl, java.lang.String libraryName)
- Parameters:
id
- The wicket ID this react component binds to in the wicket markup hierarchyjsUrl
- The javascript file that contains the React view component(s)libraryName
- The name of the library exposed by webpack. (webpack.config.js -> config.output.library)
-
ReactComponent
public ReactComponent(java.lang.String id, java.lang.String jsUrl, java.lang.String libraryName, boolean useWicketId)
- Parameters:
id
- The wicket or element ID this React component binds tojsUrl
- The javascript file that contains the React view component(s)libraryName
- The name of the library exposed by webpack. (webpack.config.js -> config.output.library)useWicketId
- Whether the provided ID is a wicket ID or an element ID
-
-
Method Detail
-
isLoadDynamic
protected boolean isLoadDynamic()
Override this to return false if you want to try and load the component's js file statically. Will fail if your component is loaded as part of an ajax call.
-
onComponentTagBody
public void onComponentTagBody(org.apache.wicket.markup.MarkupStream markupStream, org.apache.wicket.markup.ComponentTag openTag)
- Overrides:
onComponentTagBody
in classorg.apache.wicket.Component
-
renderHead
public void renderHead(org.apache.wicket.markup.head.IHeaderResponse response)
- Specified by:
renderHead
in interfaceorg.apache.wicket.markup.html.IHeaderContributor
- Overrides:
renderHead
in classorg.apache.wicket.Component
-
getElementScript
protected java.lang.String getElementScript()
-
-