|
SAP NetWeaver 7.30 SP01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
com.sap.portal.adminstudio.workunitfwapi
public interface IEditorContext
The interface that represents the current state of the editor and the data
model.
The data model holds the data currently being edited in a session. The data
model is provided by the wizard framework to make it easier to handle
and store the data that administrators enter into the editor. The data model
is a set of key-value pairs that is available via the editor context, which
is exposed as an IEditorContext parameter in key methods of the
editor framework.
The following are the main services provided:
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();
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");
| Method Summary | |
|---|---|
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. |
| Method Detail |
|---|
void setLoadDataRequired(boolean requireLoadData)
true, the editor loads the data from the
server in the next request cycle.
requireLoadData - true if the data must be loaded,
false if the data should not be loadedvoid setDirty(boolean isDirty)
false. When set to true,
the data persists until saving.
isDirty - true if a save is required, false
if no save is requiredboolean isDirty()
false.
When true, the data persists until saving.
true if a save is required, false
if no save is requiredMap getInitialParameters()
getInitialParameters in interface IBasicEditingContextIEditorResponse getEditorResponse()
IEditorResponseboolean isEmbeddedEditor()
false.
The value is set to true when the main editor
passes the following parameter in the request:
com.sap.portal.editorMode=embedded
true if the editor is an embedded editor,
false if notcom.sapportals.htmlb.event.Event getEvent()
boolean isHoldLock()
true if the current context holds the lock,
false if not
void setProperty(String key,
Object value)
setProperty in interface IBasicEditingContextkey - a property keyvalue - a value for the propertyObject getProperty(String key)
getProperty in interface IBasicEditingContextvoid setReadOnly()
boolean isReadOnly()
true if read-only, false
if read-writecom.sapportals.util.session.util.StoreableMap getSubtreeAsMap(String subtreeRoot)
getSubtreeAsMap in interface IBasicEditingContextsubtreeRoot - a property that is the root of the subtree
void 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
|
|
SAP NetWeaver 7.30 SP01 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||