com.sap.portal.adminstudio.workunitfwapipublic interface IEditorContext extends IBasicEditingContext
IEditorContext parameter in key methods of the
editor framework.
IStorable
interface that is located in the admin utilities PAR file.
editorContext.setProperty("prop1",new Integer(1));
List list=new ArrayList();
list.add("element1");
editorContext.setProperty("prop2",list);
editorContext.setTemporaryProperty
("prop3",new MyObject());
Integer val=
(Integer)editorContext.getProperty("prop1");
List listVal=
(List)editorContext.getProperty("prop2");
MyObject myObj=(MyObject) editorContext.getProperty("prop3");
requireLoadData
flag. This flag indicates to the
editor framework whether the data was already loaded from server. Usually,
this flag is
false
when the editor is first launched. After
loading the data, the flag changes to
true
. To reset the data, the flag is set to
false
. In a regular refresh event this is performed transparently by the editor framework.
editorContext.setLoadDataRequired (true);
Map parameters = (Map) editorContext.getInitialParameters();
String objId= editorContext.getObjectId();
Read-only Handling: A state when the editor data cannot be
edited. This situation occurs, for example, if the data could not be locked,
or if the user does not have permission to edit the data. The editor
framework is responsible for disabling the generic buttons, and
enabling the Edit Mode button. The editor framework maintains a flag that
indicates whether the current state is read-only. If lock handling
fails, the editor context is automatically flagged as read-only.
boolean myReadOnly = ;
if (myReadOnly) editorContext.setReadOnly();
editorContext.setDirty(true);
editorContext.getEditorResponse().
setBeforeSaveQuestion();
EditorMessageType class. The editor framework
collects the messages and presents them ordered by severity. NLS formatting
is performed just before sending the response to the client.
context.getEditorResponse().addMessageKey
(EditorMessageType.ERROR,
"MSG_X_KEY",
new Object[] {"param1"});
IEditorResponse interface is used to retrieve the
properties from the client side.
editorContext.getEditorResponse().setClientProperty
("key","data");
| Modifier and Type | Method and Description |
|---|---|
IEditorResponse |
getEditorResponse()
Deprecated.
Gets the editor response object for the current context.
|
com.sapportals.htmlb.event.Event |
getEvent()
Deprecated.
Gets the event object that was sent by an HTMLB control.
|
Map |
getInitialParameters()
Deprecated.
Gets a map of the request parameters passed to the editor.
|
Object |
getProperty(String key)
Deprecated.
Gets a property object specified by a key.
|
IPortalComponentRequest |
getRequest()
Deprecated.
Gets the request from which the context was constructed.
|
com.sapportals.util.session.util.StoreableMap |
getSubtreeAsMap(String subtreeRoot)
Deprecated.
Gets an object that represents a subtree of properties.
|
boolean |
isDirty()
Deprecated.
Indicates whether the editor state was changed and a save is required
when the editor is closed.
|
boolean |
isEmbeddedEditor()
Deprecated.
Indicates whether an editor was opened as an embedded editor.
|
boolean |
isHoldLock()
Deprecated.
Indicates whether the current context holds a lock.
|
boolean |
isReadOnly()
Deprecated.
Indicates whether the editor is read-only.
|
void |
removeProperty(String key)
Deprecated.
Removes a property specified by a key.
|
void |
removeSubtree(String subtreeRoot)
Deprecated.
Removes a property and all of its subproperties.
|
void |
setDirty(boolean isDirty)
Deprecated.
Sets whether the editor state changed.
|
void |
setLoadDataRequired(boolean requireLoadData)
Deprecated.
Sets whether the editor data must be loaded.
|
void |
setProperty(String key,
Object value)
Deprecated.
Sets a value for a property specified by a key.
|
void |
setReadOnly()
Deprecated.
Sets the editor context as read-only.
|
void |
setTemporaryProperty(String key,
Object value)
Deprecated.
Sets a temporary property specified by a key.
|
void setLoadDataRequired(boolean requireLoadData)
requireLoadData - true if the data must be loaded,
false if the data should not be loadedvoid setDirty(boolean isDirty)
isDirty - - true if a save is required, false if no save is requiredboolean isDirty()
false.
When true, the data persists until saving.
Map getInitialParameters()
getInitialParameters in interface IBasicEditingContextIEditorResponse getEditorResponse()
IEditorResponseboolean isEmbeddedEditor()
com.sap.portal.editorMode=embedded
com.sapportals.htmlb.event.Event getEvent()
boolean isHoldLock()
void setProperty(String key, Object value)
setProperty in interface IBasicEditingContextkey - a property keyvalue - a value for the propertyObject getProperty(String key)
getProperty in interface IBasicEditingContextkey - a property keyvoid setReadOnly()
boolean isReadOnly()
com.sapportals.util.session.util.StoreableMap getSubtreeAsMap(String subtreeRoot)
getSubtreeAsMap in interface IBasicEditingContextsubtreeRoot - a property that is the root of the subtreevoid setTemporaryProperty(String key, Object value)
setTemporaryProperty in interface IBasicEditingContextkey - a property keyvalue - a value for the propertyvoid removeProperty(String key)
removeProperty in interface IBasicEditingContextkey - a property keyvoid removeSubtree(String subtreeRoot)
removeSubtree in interface IBasicEditingContextsubtreeRoot - the property that is the root of the subtree to
removeIPortalComponentRequest getRequest()
getRequest in interface IBasicEditingContext| Access Rights |
|---|
| SC | DC | Public Part | ACH |
|---|---|---|---|
[sap.com] EP-RUNTIME
|
[sap.com] tc/ep/admin/api
|
api
|
EP-PIN
|
Copyright 2021 SAP SE Complete Copyright Notice