public interface UIAjaxContext extends UIComponentWriter
UIBodyWriter
The methods add(...)
and add_cr(...)
write
text into the body of the Ajax response output stream.
This text has no constraints (it can be a raw string, HTML, CSV, JSON, XML ...),
provided that the JavaScript function handleAjaxResponseSuccess(responseContent)
manages that kind of data format.
It is up to the caller to correctly handle the Ajax response generated by this component.
So it is strongly advised to use the EBX_AJAXResponseHandler
JavaScript prototype for handling the response.
UIJavaScriptWriter
The methods addJS(...)
and addJS_cr(...)
write
a piece of JavaScript code into the Ajax response output stream.
The entire JavaScript code will be executed once the function
handleAjaxResponseSuccess(responseContent)
has been executed.
UIAjaxComponent
,
UI Developer GuideModifier and Type | Method and Description |
---|---|
void |
addUserMessage(UserMessage aMessage)
Add a user message to the message box according to its severity.
|
Adaptation |
getCurrentAdaptation()
Returns the dataset or record currently selected in the session.
|
Adaptation |
getCurrentDataSet()
Returns the dataset currently selected in the session.
|
SchemaNode |
getCurrentDataSetNode()
Returns the dataset node currently selected in the session.
|
AdaptationHome |
getCurrentHome()
Returns the dataspace or snapshot currently selected in the session.
|
Adaptation |
getCurrentRecord()
Returns the record currently selected in the session.
|
SchemaNode |
getCurrentRecordNode()
Returns the record node currently selected in the session.
|
HierarchyNode |
getHierarchyNode()
Returns the current hierarchy node if the user interface is
in the context of a hierarchy.
|
String |
getOptionalRequestParameterValue(String aParameterName)
Returns the HTTP parameter value from the incoming request.
|
String[] |
getOptionalRequestParameterValues(String aParameterName)
Returns the HTTP parameter values from the incoming request.
|
ServiceContext |
getServiceContext()
Deprecated.
From release 6.0, this API is no longer supported. The new
UserService API should be used
instead. |
Object |
getValue(Path aPath)
Returns the value of the specified node.
|
boolean |
isCalledFromUIService()
Returns
true if the Ajax component is called from a user service. |
addButtonHelp, addButtonJavaScript, addButtonJavaScriptToggle, addUILabel, addUserAvatar, buildButtonPreview, buildButtonPreview, buildButtonPreview, endBorder, endExpandCollapseBlock, endFormGroup, endFormRow, endTableFormRow, newExpandCollapseBlock, newFormGroup, newFormRow, startBorder, startBorder, startBorder, startExpandCollapseBlock, startExpandCollapseBlock, startFormGroup, startFormGroup, startFormRow, startFormRow, startFormRow, startFormRow, startTableFormRow
add_cr, add_cr, add, add, add, addSafeAttribute, addSafeAttribute, addSafeInnerHTML, addSafeInnerHTML
addJS_addResizeWorkspaceListener, addJS_cr, addJS_cr, addJS_openPreviewImage, addJS_openPreviewImageFromVar, addJS_setButtonDisabled, addJS_setExpandCollapseBlockExpanded, addJS_setStateToToggleButton, addJS_switchToPerspective, addJS_switchToPerspectiveAction, addJS
createWebComponentForRootSession, createWebComponentForSubSession, getURLForAjaxComponent, getURLForAjaxComponent, getURLForPerspectiveSelection, getURLForPerspectiveSelection, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForRest, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForViewSelection
addJavaScriptDependency
getLocale, getSession
void addUserMessage(UserMessage aMessage)
boolean isCalledFromUIService()
Returns true
if the Ajax component is called from a user service.
It will always return false
if called from a UI bean whether
this UI bean is hosted or not by a user service.
String getOptionalRequestParameterValue(String aParameterName)
String[] getOptionalRequestParameterValues(String aParameterName)
HierarchyNode getHierarchyNode()
null
otherwise.Adaptation getCurrentAdaptation()
This method returns a dataset if the current Ajax component is called from:
This method returns a record if the current Ajax component is called from:
Returns null
if this Ajax component is called
in the context of a record creation or duplication.
IllegalStateException
- if the current Ajax component is called from a service on a dataspace or a
snapshot.getCurrentDataSet()
,
getCurrentRecord()
SchemaNode getCurrentDataSetNode()
null
if no dataset is selected.SchemaNode getCurrentRecordNode()
null
if no record is selected.Adaptation getCurrentRecord()
Returns null
if this Ajax component is called from:
IllegalStateException
- if the current Ajax component is called from a service on a dataspace or on a
snapshot.Adaptation getCurrentDataSet()
IllegalStateException
- if the current Ajax component is called from a service on a dataspace or a
snapshot.AdaptationHome getCurrentHome()
Object getValue(Path aPath)
null
if the value of the
node is undefined.
If this method is called on an Adaptation
, a lookup mechanism is used to retrieve the
value (see Inheritance and value resolution).
The access and mapping rules between XML Schema and Java are described in the chapter Mapping to Java.
aPath
- required, resolved in the context of the current record, or the current dataset if the current
record is null.PathAccessException
- aPath
does not refer to an existing node in the underlying
type tree structure,getCurrentRecord()
,
getCurrentDataSet()
ServiceContext getServiceContext()
UserService
API should be used
instead.ServiceContext
if this AJAX component is called from a UIService,
Returns null otherwise.isCalledFromUIService()