Class finesse.restservices.MediaPropertiesLayout
JavaScript representation of a MediaPropertiesLayout object. Also exposes
methods to operate on the object against the server.
Defined in: MediaPropertiesLayout.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
get()
Retrieve the media properties layout
|
|
getData()
Gets the data for this object.
|
|
Empty/template version of getData().
|
|
setLayout(layout, handlers)
Set the layout of this MediaPropertiesLayout.
|
Class Detail
finesse.restservices.MediaPropertiesLayout(options)
- Parameters:
- {Object} options
- An object with the following properties:
- id: The id of the object being constructed
- onLoad(this): (optional) when the object is successfully loaded from the server
- onChange(this): (optional) when an update notification of the object is received
- onAdd(this): (optional) when a notification that the object is created is received
- onDelete(this): (optional) when a notification that the object is deleted is received
- onError(rsp): (optional) if loading of the object fails, invoked with the error response object:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- parentObj: (optional) The parent object
Method Detail
Retrieve the media properties layout
- Returns:
- {finesse.restservices.MediaPropertiesLayout} This MediaPropertiesLayout object to allow cascading
getData()
Gets the data for this object.
Performs safe conversion from raw API data to ensure that the returned layout object
always has a header with correct entry fields, and exactly two columns with lists of entries.
- Returns:
- Object which are contained in data
getEmptyData()
Empty/template version of getData().
Used by getData(), and by callers of getData() in error cases.
{finesse.restservices.MediaPropertiesLayout}
setLayout(layout, handlers)
Set the layout of this MediaPropertiesLayout.
- Parameters:
- {String} layout
- The layout you are setting
- {Object} handlers
- An object containing the following (optional) handlers for the request:
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response
- A error callback function for an unsuccessful request to be invoked with the
error response object as its only parameter:
- status: {Number} The HTTP status code returned
- content: {String} Raw string of response
- object: {Object} Parsed object of response (HTTP errors)
- error: {Object} Wrapped exception that was caught:
- errorType: {String} Type of error that was caught
- errorMessage: {String} Message associated with error
- success(rsp): A callback function for a successful request to be invoked with the following
response object as its only parameter:
- Returns:
- {finesse.restservices.MediaPropertiesLayout} This MediaPropertiesLayout object to allow cascading