Class AbstractRecordEditPanel
- java.lang.Object
- 
- org.apache.wicket.Component
- 
- org.apache.wicket.MarkupContainer
- 
- org.apache.wicket.markup.html.WebMarkupContainer
- 
- org.apache.wicket.markup.html.panel.Panel
- 
- com.inductiveautomation.ignition.gateway.web.components.ConfigPanel
- 
- com.inductiveautomation.ignition.gateway.web.components.AbstractRecordEditPanel
 
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.io.Serializable,- java.lang.Iterable<org.apache.wicket.Component>,- 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:
- RecordEditForm,- RecordEditWizard
 
 public abstract class AbstractRecordEditPanel extends ConfigPanel This class is the base for RecordEditForm and RecordEditWizard- See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected IConfigPageconfigPageprotected ConfigPaneldestinationPanelprotected static org.apache.log4j.Loggerlogprotected org.apache.wicket.model.IModel<java.lang.String>titleModel- 
Fields inherited from class com.inductiveautomation.ignition.gateway.web.components.ConfigPanelfeedback, returnPanel
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractRecordEditPanel(IConfigPage configPage, ConfigPanel destinationPanel, org.apache.wicket.model.IModel<java.lang.String> titleModel, org.apache.wicket.model.IModel<? extends java.util.List<? extends SRecordInstance>> records)Creates a new record edit component.AbstractRecordEditPanel(IConfigPage configPage, ConfigPanel destinationPanel, org.apache.wicket.model.IModel<java.lang.String> titleModel, SRecordInstance... records)Creates a new record edit component.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcommitRecords(GatewayContext context, RecordEditMode editMode, java.util.List<SRecordInstance> records)Called by onSubmit() to commit the altered records.protected java.lang.StringcreateErrorMessage(GatewayContext context, java.lang.String noun, java.lang.String name)protected org.apache.wicket.markup.html.WebMarkupContainercreateFooterComponent(java.lang.String id)Creates a component to use as a form footer.org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String>getMenuLocation()RecordEditModegetMode()protected RecordEditModegetMode(java.util.List<SRecordInstance> recs)protected java.util.List<SRecordInstance>getModelObjectAsRecordList()java.lang.StringgetRecordTypeNoun()Gets the name of the first record type.org.apache.wicket.model.IModel<java.lang.String>getTitleModel()protected voidnotifyListeners(GatewayContext context, RecordEditMode editMode, java.util.List<SRecordInstance> records)Called by onSubmit() if commitRecords() doesn't throw an error.protected voidonAfterCommit(java.util.List<SRecordInstance> records)protected voidonBeforeCommit(PersistenceSession session, java.util.List<SRecordInstance> records)protected voidonError()Called when the wicket form calls onError().protected voidonRecordEdited(SRecordInstance record)Called after the record is successfully edited and saved to the databaseprotected voidonSubmit()protected voidonSubmit(RecordEditMode mode, java.util.List<SRecordInstance> records)- 
Methods inherited from class com.inductiveautomation.ignition.gateway.web.components.ConfigPanelgetHelpResourceKey, getHelpTopicId, getMenuPath, getTipLabelKey, getTipLabelModel, getTitleKey, initTitleArea, isEscapeHtmlInTipLabel, isFeedbackEnabled, isTitleVisible, log, renderHead
 - 
Methods inherited from class org.apache.wicket.markup.html.WebMarkupContainergetWebApplication, getWebPage, getWebRequest, getWebResponse, getWebSession
 - 
Methods inherited from class org.apache.wicket.MarkupContaineradd, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupType, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, onRender, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, toString, visitChildren, visitChildren, visitChildren, visitChildren
 - 
Methods inherited from class org.apache.wicket.Componentadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, detachModels, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, 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, internalOnModelChanged, internalPrepareForRender, internalRenderComponent, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, onAfterRender, onBeforeRender, onComponentTag, onConfigure, onDetach, onEvent, onInitialize, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrap
 
- 
 
- 
- 
- 
Field Detail- 
logprotected static org.apache.log4j.Logger log 
 - 
configPageprotected IConfigPage configPage 
 - 
destinationPanelprotected ConfigPanel destinationPanel 
 - 
titleModelprotected org.apache.wicket.model.IModel<java.lang.String> titleModel 
 
- 
 - 
Constructor Detail- 
AbstractRecordEditPanelpublic AbstractRecordEditPanel(IConfigPage configPage, ConfigPanel destinationPanel, org.apache.wicket.model.IModel<java.lang.String> titleModel, SRecordInstance... records) Creates a new record edit component. The model must resolve to either a single SRecordInstance or a List containing one or more SRecordInstances
 - 
AbstractRecordEditPanelpublic AbstractRecordEditPanel(IConfigPage configPage, ConfigPanel destinationPanel, org.apache.wicket.model.IModel<java.lang.String> titleModel, org.apache.wicket.model.IModel<? extends java.util.List<? extends SRecordInstance>> records) Creates a new record edit component. The model must resolve to either a single SRecordInstance or a List containing one or more SRecordInstances
 
- 
 - 
Method Detail- 
getMenuLocationpublic org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.String> getMenuLocation() - Overrides:
- getMenuLocationin class- ConfigPanel
- Returns:
- Pair of strings representing categoryId (matching ConfigCategory.getName()) and item id (matchingINamedTab.getTabName()) which lets the menu know where in the config menu should be highlighted when this config page is visible.
 
 - 
getTitleModelpublic org.apache.wicket.model.IModel<java.lang.String> getTitleModel() - Overrides:
- getTitleModelin class- ConfigPanel
 
 - 
getModeprotected RecordEditMode getMode(java.util.List<SRecordInstance> recs) 
 - 
getRecordTypeNounpublic java.lang.String getRecordTypeNoun() Gets the name of the first record type. Public so the property resolver can see it
 - 
getModelObjectAsRecordListprotected java.util.List<SRecordInstance> getModelObjectAsRecordList() 
 - 
getModepublic RecordEditMode getMode() 
 - 
onSubmitprotected void onSubmit() 
 - 
onBeforeCommitprotected void onBeforeCommit(PersistenceSession session, java.util.List<SRecordInstance> records) throws java.lang.Exception - Throws:
- java.lang.Exception
 
 - 
onAfterCommitprotected void onAfterCommit(java.util.List<SRecordInstance> records) 
 - 
onSubmitprotected void onSubmit(RecordEditMode mode, java.util.List<SRecordInstance> records) 
 - 
notifyListenersprotected void notifyListeners(GatewayContext context, RecordEditMode editMode, java.util.List<SRecordInstance> records) throws java.lang.Exception Called by onSubmit() if commitRecords() doesn't throw an error. Notifies record listeners of add/update, and then calls onRecordEdited()- Throws:
- java.lang.Exception
 
 - 
commitRecordsprotected void commitRecords(GatewayContext context, RecordEditMode editMode, java.util.List<SRecordInstance> records) throws java.lang.Exception Called by onSubmit() to commit the altered records. Calls onBeforCommit() before committing (and detatching) the dataset, calls onAfterCommit() afterwards- Throws:
- java.lang.Exception
 
 - 
onRecordEditedprotected void onRecordEdited(SRecordInstance record) throws java.lang.Exception Called after the record is successfully edited and saved to the database- Throws:
- java.lang.Exception
 
 - 
createErrorMessageprotected java.lang.String createErrorMessage(GatewayContext context, java.lang.String noun, java.lang.String name) 
 - 
onErrorprotected void onError() Called when the wicket form calls onError(). Default implementation is no-op.
 - 
createFooterComponentprotected org.apache.wicket.markup.html.WebMarkupContainer createFooterComponent(java.lang.String id) Creates a component to use as a form footer. Default implementation creates an InvisibleContainer.
 
- 
 
-