dojox/grid/enhanced/plugins/_StoreLayer._ServerSideLayer (version 1.10)

Summary

The most abstract class for all server side store layers.

Usage

var foo = new _StoreLayer._ServerSideLayer(args);
dojox/grid/enhanced/plugins/_StoreLayer
Parameter Type Description
args undefined

Property Summary

Method Summary

  • _fetch(userRequest) Implementation of _StoreLayer._fetch
  • _unwrap(nextLayer) Do the actual unwrapping to the store.
  • _wrap(store,funcName,layerFuncName,nextLayer) Do the actual wrapping (or 'hacking' if you like) to the store.
  • command(cmdName,cmdContent) get/set a command (a name-value pair)
  • enabled(toEnable) Overrided from _StoreLayer.enabled
  • initialize(store)
  • invalidate()
  • name() Get the name of this store layer.
  • originFetch()
  • uninitialize(store)
  • useCommands(toUse) If you only want to modify the user request, instead of sending a separate command to server before fetch, just call: this.useCommand(false);

Event Summary

  • onCommandError(error) handle errors when sending commands.
  • onCommandLoad(response,userRequest) When the server gives back response for the commands, you can do something here.

Properties

__enabled

To control whether this layer is valid.

_originFetch

The original fetch function of the store.

_store

The wrapped store.

_url

The url of the server

layerFuncName

Methods

_fetch(userRequest)

Implementation of _StoreLayer._fetch

Parameter Type Description
userRequest keywordArgs
Returns:keywordArgs
_unwrap(nextLayer)

Do the actual unwrapping to the store.

Parameter Type Description
nextLayer undefined
_wrap(store,funcName,layerFuncName,nextLayer)

Do the actual wrapping (or 'hacking' if you like) to the store.

Parameter Type Description
store undefined

The store to be unwrapped.

funcName undefined
layerFuncName undefined
nextLayer undefined
command(cmdName,cmdContent)

get/set a command (a name-value pair)

Parameter Type Description
cmdName string

The name of the command

cmdContent anything
Optional

The content of the command

Returns:any | undefined

The content of the command if cmdContent is undefined

enabled(toEnable)

Overrided from _StoreLayer.enabled

Parameter Type Description
toEnable bool
Optional
Returns:undefined
initialize(store)
Parameter Type Description
store undefined
invalidate()
name()

Get the name of this store layer. The default name retrieved from class name, which should have a pattern of "{name}Layer". If this pattern does not exist, the whole class name will be this layer's name. It's better to override this method if your class name is too complicated.

Returns:any | undefined

The name of this layer.

originFetch()
Returns:undefined
uninitialize(store)
Parameter Type Description
store undefined
useCommands(toUse)

If you only want to modify the user request, instead of sending a separate command to server before fetch, just call:

this.useCommand(false);
Parameter Type Description
toUse Boolean
Optional

If provided, it's a setter, otherwise, it's a getter

Returns:boolean

Events

onCommandError(error)

handle errors when sending commands.

Parameter Type Description
error Error
onCommandLoad(response,userRequest)

When the server gives back response for the commands, you can do something here.

Parameter Type Description
response string

server response

userRequest dojo/data/api/Request

The request object for fetch. You can modify this object according to the response so as to change the behavior of fetch

Error in the documentation? Can’t find what you are looking for? Let us know!