ZPT-JS reference - Configuration - dictionaryActions

Syntax

dictionaryActions ::= [ dictionaryActionsItem+ ]
dictionaryActionsItem ::= updateArray || deleteArray || createArray || updateObject || deleteObject
updateArray ::= {
    id: identifier,
    search: searchObject,
    action: 'updateArray',
    index: number,
    currentElement: number || String || object
    newElement: number || String || object
}
deleteArray ::= {
    id: identifier,
    search: searchObject,
    action: 'deleteArray',
    index: number,
    currentElement: number || String || object
}
createArray ::= {
    id: identifier,
    search: searchObject,
    action: 'createArray',
    index: number,
    newElement: number || String || object
}
updateObject ::= {
    id: identifier,
    search: searchObject,
    action: 'updateObject',
    property: identifier,
    newElement: number || String || object
}
deleteObject ::= {
    id: identifier,
    search: searchObject,
    action: 'deleteObject',
    property: identifier
}
searchObject ::= [ searchObjectItem+ ]
searchObjectItem ::= number || String || object
                

Some properties can not be set at once:

Description

The dictionaryActions object is used to declare one or more actions to update the dictionary. It is a javascript object. ZPT-JS will also update HTML!

Important! This configuration option must be used beside update command. It the command is not update it will be ignored.

Nowadays there are 5 types of dictionary actions:

To set the object to update we can use:

The list of available properties of a dictionary actions is:

Examples

Go to tutorial to see some examples.