public class MiniAppControl extends DatasrcInstance
Modifier and Type | Class and Description |
---|---|
class |
MiniAppControl.ClientEvent |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLIENT_EVENT_TARGET_EVENT_NAME
Event handler (ie, method) in this Class that will respond to push to
client events
|
static MXLogger |
log |
amIinitialize, DATASOURCE, INPUTMODE, labelOverride, ONDATACAHNGE, PARAM_APP, PARAM_APPTABTYPE, PARAM_DESIGNMODE, PARAM_LIGHTNING, PARAM_MOBILE, PARAM_MODULE, PARAM_PAGE, PARAM_PARENTCOMPONENT, PARAM_PARENTCONTROL, PARAM_PRESENTATION, PARAM_SCREENREADER, PARAM_SKINNAME, PARAM_TAB, PARAM_TABGROUP, PARAM_TABGROUP_MAIN, PARAM_TABLE, PARAM_USERINFO, PARAM_VERTICALLABEL, RERENDER_PROPERTY
EXCEPTION_ERROR, EXCEPTION_INFO, EXCEPTION_NONE, EXCEPTION_REQUIREDFIELD, EXCEPTION_SMARTFILL, EXCEPTION_WARNING, EXCEPTION_YESNOCANCEL, FORCE_WARNING_HANDLING, NO_PROMPT_WITH_WARNING, presentationTags, PROMPT_WHEN_WARNING_EXIST
Constructor and Description |
---|
MiniAppControl() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createDOMId(java.lang.String appId,
java.lang.String mainClass)
Create a unique DOM id for this app instance
|
void |
currentTabOp() |
int |
event_callbean()
Alias for fetch.
|
int |
event_fetch()
This event handles XHR event to call MXEvent events against the
underlying databean.
|
int |
event_show_message() |
int |
event_yes_no_cancel() |
java.util.List<MiniAppControl.ClientEvent> |
getClientEvents()
This will return a COPY of the list of the client events that need to
sent to the client.
|
Tab |
getCurrentTab() |
com.ibm.json.java.JSONObject |
getLastWebClientEventInstance()
Get last known WebClientEvent Details as a JSONObject
|
java.lang.String |
getMiniAppRootDir(java.lang.String servletPath,
java.lang.String miniAppId) |
java.lang.String |
getMiniAppsDir() |
com.ibm.json.java.JSONObject |
getPresentationOptions()
Returns the "options" json configuration from the presentation element at
the time the control was created.
|
java.lang.String |
getSizeToParentId() |
java.lang.String |
getSizeToParentIdForJS() |
boolean |
hasClientEvents()
Returns true if there are pending client events that need to be pushed to
the browser.
|
void |
initialize()
should be extended to do any setup required by the instance.
|
void |
instantiatedatasrc()
this method will set up the datasource on the control.
|
static boolean |
isInDevelopment()
Returns true if the MiniApps are in development mode
|
boolean |
isMiniAppVisible() |
boolean |
isSizedToParent()
Returns true is this control is supposed to be sized to match another dom
element
|
java.lang.String |
loadCSS() |
void |
loadDesigner(java.lang.String id) |
java.lang.String |
loadMiniAppConfig() |
java.lang.String |
loadMiniAppResource(java.lang.String path)
Give a "path" relative to the miniapp's root directory, then return that
resource as a string.
|
static WebClientEvent |
pushClientEvent(WebClientSession clientSession,
java.lang.String controlId,
java.lang.String eventName,
java.lang.String eventArgs)
Convenience methof for creating and pushing a client event to a mini app.
|
int |
pushMiniAppClientEventHandler()
means for the server code to dispatch
MiniAppControl.ClientEvent instances to the browser miniapp. |
int |
render()
Render this control's components
|
java.util.List<WebResource> |
resolveExtraPaths(java.lang.String servletBaseUrl,
java.lang.String miniappBaseUrl) |
static WebClientEvent |
sendClientEvent(WebClientSession clientSession,
java.lang.String controlId,
java.lang.String eventName,
java.lang.String eventArgs)
Convenience shortcut method to handleEvent(WebClientSession, WebClientEvent) to a mini app.
|
void |
sendEventToTreeGrid(java.lang.String eventId,
java.lang.String eventArg)
Will push a Dojo topic with the given eventId as the topic and eventArg
as the event message
|
void |
setWebClientSession(WebClientSession wcs) |
void |
treeGridVisibility(Tab currentTab) |
broadcastEvent, cleanup, getDataBean, instantiatedatasrcdesign
addChild, addComponent, canInsert, canInsert, canRemove, childHasError, childHasErrorFocus, clearComponent, clearErrors, copy, createRenderId, errorLevelChanged, eventCheck, findComponentByDescriptorId, findDesignerProperty, findProperty, findUseForLablledByComponent, getAdaptorInstance, getBoundComponent, getComponent, getComponents, getConditonallyChanged, getDataSource, getDescriptorControl, getDesignerProperty, getDesignerSelected, getDesignerSelectedControl, getElement, getErrorLevel, getGeneratedControl, getOriginalControl, getOriginalProperty, getProperties, getProperty, getProperty, getPropertyIgnoreFlags, getPropertyOriginator, getPropertyUncle, getRecordHover, getSkipPreRender, getTableControl, getTakesValueComponent, handleEvent, hasChanged, hasChangedConditionally, hasChildElements, hasMaskedChanged, hasRecordHover, hasVisibleChildren, isDesignerEditedProperty, isDisabled, isFocusable, isGenerated, isHiddenByLicense, isIncluded, isLastChild, isMainrecActionMenu, isMasked, isOnTableFilterRow, isOnTableTitleRow, isPersistentProperty, isReInitialize, isSelected, isToBeDisplayedOnCurrentTab, isToBeDisplayedOnTab, isVisible, launchexternal, moveChild, needsRender, parseParamvalues, preRender, preRenderChecks, quickinsert, registerDesignerEditedProperty, reInitialize, removeChild, renderChildren, resetDataSource, resolveParam, resolveParams, setAttributeError, setBoundComponent, setChangedFlag, setChangedFlag, setDesignerSelected, setDisabled, setElement, setErrorFocusOnControl, setFocus, setFocus, setFocusable, setFocusTable, setGenerated, setGeneratedControl, setIncluded, setIncluded, setNeedsRender, setOnTableFilterRow, setOnTableRow, setOnTableTitleRow, setOriginalControl, setPropertyOriginator, setPropertyUncle, setReInitialize, setReRenderFlags, setSelected, setSkipPreRender, setTableControl, setVisibility, stopRender, walkForId, walkForId
addChild, addChild, addRefreshListener, clearChildren, clearProperties, clone, clone, getBoolean, getChildCount, getChildIndex, getChildren, getConsiderInDesigner, getDescriptor, getId, getIdExtension, getInt, getLocalizedType, getPage, getParent, getParentInstance, getPropertyNames, getRefreshListeners, getRenderId, getRowNum, getSafeId, getString, getType, getWebClientSession, handleEvent, hasAnyPropertyChanged, hasLocalProperty, hasPropertyChanged, initProperty, isDynamicContainer, isOnTable, isOnTableRow, maintainControlId, removeProperty, setConsiderInDesigner, setDescriptor, setDynamicContainer, setOnTable, setParent, setProperty, setProperty, setRenderId, setType, toString
public static final MXLogger log
public static final java.lang.String CLIENT_EVENT_TARGET_EVENT_NAME
public void loadDesigner(java.lang.String id)
public java.lang.String loadMiniAppResource(java.lang.String path)
path
- public java.lang.String loadCSS()
public java.lang.String loadMiniAppConfig()
public com.ibm.json.java.JSONObject getPresentationOptions()
public java.util.List<WebResource> resolveExtraPaths(java.lang.String servletBaseUrl, java.lang.String miniappBaseUrl)
public int event_fetch() throws MXException
MXException
public int event_callbean() throws MXException
MXException
public int event_show_message() throws MXException
MXException
public int event_yes_no_cancel() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public void initialize()
BaseInstance
initialize
in class ControlInstance
public void setWebClientSession(WebClientSession wcs)
setWebClientSession
in class BaseInstance
public int pushMiniAppClientEventHandler()
MiniAppControl.ClientEvent
instances to the browser miniapp.
MiniAppControl.ClientEvent
instances are sent using dojo's topic subscription modelpublic boolean hasClientEvents()
public java.util.List<MiniAppControl.ClientEvent> getClientEvents()
public static WebClientEvent pushClientEvent(WebClientSession clientSession, java.lang.String controlId, java.lang.String eventName, java.lang.String eventArgs)
clientSession
- current WebClientSessioncontrolId
- control id (ie, miniapp control id to handle the event)eventName
- dojo event name the client will have subscribed toeventArgs
- an option string contain some data to pass along in the eventpublic static WebClientEvent sendClientEvent(WebClientSession clientSession, java.lang.String controlId, java.lang.String eventName, java.lang.String eventArgs)
clientSession
- current WebClientSessioncontrolId
- control id (ie, miniapp control id to handle the event)eventName
- dojo event name the client will have subscribed toeventArgs
- an option string contain some data to pass along in the eventhandleEvent(WebClientSession, WebClientEvent)
public void instantiatedatasrc()
DatasrcInstance
instantiatedatasrc
in class DatasrcInstance
public java.lang.String createDOMId(java.lang.String appId, java.lang.String mainClass)
appId
- mainClass
- public boolean isSizedToParent()
public java.lang.String getSizeToParentId()
public java.lang.String getSizeToParentIdForJS()
public java.lang.String getMiniAppRootDir(java.lang.String servletPath, java.lang.String miniAppId)
public java.lang.String getMiniAppsDir()
public com.ibm.json.java.JSONObject getLastWebClientEventInstance()
public static boolean isInDevelopment()
public int render() throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
ControlInstance
render
in class DatasrcInstance
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public void currentTabOp()
public void treeGridVisibility(Tab currentTab)
public void sendEventToTreeGrid(java.lang.String eventId, java.lang.String eventArg)
eventId
- eventArg
- public boolean isMiniAppVisible()
public Tab getCurrentTab()