public class ComponentInstance extends BaseInstance
Type | Property and Description |
---|---|
boolean |
hiddenBy
Allows hiding components via the registry without coding, by using property value comparison
Ex: @{label}==null
Ex2: @{cssclass}!=null
Can have two conditions or more
Ex3: @{label}!=null and @{cssclass}!=null
Ex4: @{label}!=null or @{cssclass}!=null
|
Modifier and Type | Field and Description |
---|---|
static int |
CLICKABLE_OFF |
static int |
CLICKABLE_ON |
static java.lang.String |
CONTAINER_ERROR |
static java.lang.String |
CONTAINER_ERROR_IMAGE |
static java.lang.String |
CONTAINER_WARNING |
static java.lang.String |
CONTAINER_WARNING_IMAGE |
static Category |
LOG_CATEGORY |
static int |
NOT_CLICKABLE |
com.ibm.json.java.JSONObject |
popDefinition |
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 |
---|
ComponentInstance() |
Modifier and Type | Method and Description |
---|---|
int |
action()
Action ToolbarCombobox
|
int |
broadcastEvent(WebClientEvent event)
Method will call handle event on this component and all of it's child components.
|
boolean |
canChangeRowFocus()
Clicking on this component should also change the focus on the table row.
|
void |
cleanup() |
void |
clearChangedFlag()
Clears the generic changed flag.
|
void |
clearUIUpdates()
Clears all update attributes and styles for this component.
|
int |
click()
Handles a click event.
|
void |
controlPropertyChanged(java.lang.String property) |
int |
fetchtooltip()
Allows us to place an extended custom tooltip on components.
|
ComponentInstance |
findComponentByDescriptorId(java.lang.String id)
This method searches the child component list of this component for the component whose
descriptor id matches passed in id.
|
java.lang.String |
findProperty(java.lang.String key) |
java.lang.String |
formatLabel(java.lang.String label)
This method formats the label used by a control.
|
java.lang.String |
formatLabel(java.lang.String settingKey,
java.lang.String label)
This method formats the label used by a control.
|
java.lang.String |
getApplink() |
boolean |
getChildrenDesignOnly() |
int |
getClickState()
Returns whether or not this item is clickable.
|
java.lang.String |
getComponentContainerId() |
ControlInstance |
getControl()
Get the control in which this component resides
|
java.lang.String |
getCssClass() |
static ComponentInstance |
getCurrent(javax.servlet.ServletRequest request)
Gets the current component instance from the request or session
|
java.lang.String |
getCurrentUpdates()
Get entire update object as a JSON string (this includes styles and attributes)
|
DataBean |
getDataBean()
Return the databean that is defined by the component's control's datasrc property.
|
boolean |
getDesignerSelected()
Is this component selected in the app designer
|
ContainerErrorInfo |
getErrorInfo()
Returns an error information object for container controls.
|
java.lang.String |
getFocusRenderId() |
java.lang.String |
getId() |
java.lang.String |
getId(boolean useRow) |
java.lang.String |
getIdWithoutRow() |
java.lang.String |
getLabelForRenderId()
Returns the render id of the component set in the labelfor property of the component.
|
java.lang.String |
getLabelledByRenderId()
Returns the render id of the component set in the labelby property of the component.
|
ComponentInstance |
getLinkedComponentInstance()
Returns the linked component instance if the linkedcomponent property for the component is set.
|
java.lang.String |
getLookupName() |
java.lang.String |
getMenuType() |
java.lang.String |
getOriginalProperty(java.lang.String key)
Deprecated.
|
java.lang.String |
getProperty(java.lang.String key) |
java.lang.String |
getRenderId() |
com.ibm.json.java.JSONArray |
getUpdatedAttributes()
Return and clear the currently updated list of html attributes and their values
|
com.ibm.json.java.JSONArray |
getUpdatedStyles()
Return and clear the currently updated list of html styles and their values
|
boolean |
hasChanged()
Has something changed requiring this component to get a render?
|
boolean |
hasChildren() |
boolean |
hasComponents() |
boolean |
hasLocalProperty(java.lang.String key) |
boolean |
hasMaskedChanged() |
boolean |
hasUnappliedUIUpdates()
Does this component have unapplied style or attribute changes that must be processed?
|
boolean |
hiddenByProp(java.lang.String hideWhen) |
boolean |
hiddenByProperty()
Allows hiding components via the registry without coding, by using property value comparison
Ex: @{label}==null
Ex2: @{cssclass}!=null
Can have two conditions or more
Ex3: @{label}!=null and @{cssclass}!=null
Ex4: @{label}!=null or @{cssclass}!=null
|
void |
initialize()
should be extended to do any setup required by the instance.
|
boolean |
isAsyncEnabled()
Returns whether or not async is allowed on this component.
|
boolean |
isChild(org.w3c.dom.Element child) |
boolean |
isComponent(org.w3c.dom.Element component) |
boolean |
isDefaultRender() |
boolean |
isDisabled() |
boolean |
isHoversActive() |
boolean |
isIncluded() |
boolean |
isMasked() |
boolean |
isOnTableFilterRow() |
boolean |
isOnTableRow() |
boolean |
isOnTableTitleRow() |
boolean |
isVisible()
Return whether or not the instance is visible or not (Whether or not it should be shown)
Each control or component will handle visibility in it's own way.
|
boolean |
needsRender()
Returns true if it's control needs render, false if it is a refresh
|
int |
query()
Query ToolbarCombobox
|
int |
render()
Renders the component.
|
void |
renderChildComponents()
Walk through all child components and call render on them in the correct order
|
void |
renderChildrenControls()
Call renderChildren() on the control
|
boolean |
rerendering()
Returns true if it's control needs render and it's controls parent does not
|
void |
setChangedFlag()
Sets the generic changed flag to force hasChanged() to return true
|
void |
setChangedFlag(boolean flag)
Sets the generic changed flag.
|
void |
setComponentContainerId(java.lang.String id) |
void |
setControl(ControlInstance control) |
void |
setFocus()
Allows programmatic setting of focus item.
|
void |
setIsHoversActive(boolean aBool) |
void |
setLabelFormat(java.lang.String settingKey) |
int |
showMenu() |
int |
showMenubarMenu()
For menu bar menus
|
void |
signout()
Handles signout mxevent
|
boolean |
skipRender()
Used to prevent refresh evaluation of the components of a page or a dialog to improve performance
|
void |
updateAttribute(java.lang.String attribute,
java.lang.String value)
Add attribute and value to list to be updated on refresh
|
void |
updateStyle(java.lang.String style)
Add attribute and value to list of styles to be updated on refresh
|
void |
updateStyle(java.lang.String attribute,
java.lang.String value)
Add style and value to list of styles to be updated on refresh
|
addChild, addChild, addRefreshListener, clearChildren, clearProperties, clone, clone, getBoolean, getChildCount, getChildIndex, getChildren, getConsiderInDesigner, getDescriptor, getIdExtension, getInt, getLocalizedType, getPage, getParent, getParentInstance, getPropertyNames, getRefreshListeners, getRowNum, getSafeId, getString, getType, getWebClientSession, handleEvent, handleEvent, hasAnyPropertyChanged, hasPropertyChanged, initProperty, isDynamicContainer, isOnTable, maintainControlId, removeProperty, setConsiderInDesigner, setDescriptor, setDynamicContainer, setOnTable, setParent, setProperty, setProperty, setRenderId, setType, setWebClientSession, toString
public static final int NOT_CLICKABLE
public static final int CLICKABLE_OFF
public static final int CLICKABLE_ON
public static final java.lang.String CONTAINER_WARNING_IMAGE
public static final java.lang.String CONTAINER_ERROR_IMAGE
public static final java.lang.String CONTAINER_WARNING
public static final java.lang.String CONTAINER_ERROR
public static final Category LOG_CATEGORY
public com.ibm.json.java.JSONObject popDefinition
public void setControl(ControlInstance control)
public boolean hiddenByProperty()
public void initialize()
initialize
in class BaseInstance
public boolean hiddenByProp(java.lang.String hideWhen)
public static ComponentInstance getCurrent(javax.servlet.ServletRequest request)
request
- the current ServletRequest object, typically comes from the jsppublic int render() throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
If a component is marked with a rendercomponent, it will be set to the control so that the children can check to see if their renderid matches. If it does, they will render.
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public boolean isHoversActive()
public void setIsHoversActive(boolean aBool)
public ControlInstance getControl()
public void renderChildrenControls() throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public void renderChildComponents() throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public boolean isChild(org.w3c.dom.Element child)
public boolean isComponent(org.w3c.dom.Element component)
public boolean hasChildren()
public boolean hasComponents()
public boolean getChildrenDesignOnly()
public boolean hasChanged()
public boolean rerendering()
public boolean needsRender()
public int broadcastEvent(WebClientEvent event) throws java.lang.NoSuchMethodException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodException
- @deprecated This method should not throw this exception, just return EVENT_CONTINUE //TODO remove in the next major releasejava.lang.IllegalAccessException
- @deprecated This method should not throw this exception, just return EVENT_CONTINUE //TODO remove in the next major releasejava.lang.reflect.InvocationTargetException
- @deprecated This method should not throw this exception, just return EVENT_CONTINUE //TODO remove in the next major releasepublic int action()
public int query()
public int showMenubarMenu()
public void signout() throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public int showMenu()
public int click() throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public boolean canChangeRowFocus()
public java.lang.String formatLabel(java.lang.String settingKey, java.lang.String label)
settingKey
- the key in setting.properties that contains the format to use with the labellabel
- the label o be formattedFormat.format(Object obj)
public java.lang.String formatLabel(java.lang.String label)
label
- the label to be formattedFormat.format(Object obj)
public void setLabelFormat(java.lang.String settingKey)
public void setChangedFlag()
public void setChangedFlag(boolean flag)
public void clearChangedFlag()
public void setFocus() throws MXException
MXException
public int getClickState()
@TraceDisabled public java.lang.String getProperty(java.lang.String key)
getProperty
in class BaseInstance
public java.lang.String getOriginalProperty(java.lang.String key)
findProperty(String)
@TraceDisabled public java.lang.String findProperty(java.lang.String key)
public ComponentInstance getLinkedComponentInstance()
public java.lang.String getMenuType()
public java.lang.String getLookupName()
public java.lang.String getApplink()
public boolean isOnTableRow()
isOnTableRow
in class BaseInstance
public boolean isOnTableFilterRow()
public boolean isOnTableTitleRow()
public void setComponentContainerId(java.lang.String id)
public java.lang.String getComponentContainerId()
public void cleanup()
cleanup
in class BaseInstance
public void controlPropertyChanged(java.lang.String property)
public boolean isVisible()
BaseInstance
isVisible
in class BaseInstance
public boolean hasLocalProperty(java.lang.String key)
hasLocalProperty
in class BaseInstance
public java.lang.String getCssClass()
public boolean isDefaultRender()
public boolean isDisabled()
public boolean isMasked()
public boolean hasMaskedChanged()
public boolean getDesignerSelected()
public boolean skipRender()
public java.lang.String getRenderId()
getRenderId
in class BaseInstance
public java.lang.String getId()
getId
in class BaseInstance
public java.lang.String getIdWithoutRow()
public java.lang.String getId(boolean useRow)
public DataBean getDataBean()
public boolean isIncluded()
public boolean isAsyncEnabled()
public void updateStyle(java.lang.String attribute, java.lang.String value)
attribute
- Attribute namevalue
- Attribute valuepublic void updateStyle(java.lang.String style)
style
- Attribute style (style:value)public void updateAttribute(java.lang.String attribute, java.lang.String value)
attribute
- Attribute namevalue
- Attribute valuepublic com.ibm.json.java.JSONArray getUpdatedStyles()
public com.ibm.json.java.JSONArray getUpdatedAttributes()
public java.lang.String getCurrentUpdates()
public boolean hasUnappliedUIUpdates()
public void clearUIUpdates()
public ContainerErrorInfo getErrorInfo()
public java.lang.String getLabelledByRenderId()
public java.lang.String getLabelForRenderId()
public ComponentInstance findComponentByDescriptorId(java.lang.String id)
public int fetchtooltip() throws MXException, java.rmi.RemoteException
MXException
java.rmi.RemoteException
public java.lang.String getFocusRenderId()