Hello,
i'm starting learning JSpresso, and after getting through the 10mn tutorial, i'm now trying to experience some stuffs with the UI.
I tried to manage some actions on a tree's nodes, but couldn't add a deleting functionality. I'm a bit confused with JSpresso's built in actions... Here is the SJS code i'm using (based on tutorial).
//-------------------------------------------------
// Tree nodes definition
//-------------------------------------------------
treeNode 'Department-teams.treeNode',
rendered:'ouId',
actionMap:'masterDetailActionMap'
treeNode 'Department-employees.treeNode',
rendered:'name',
actionMap:'masterDetailActionMap'
treeNode 'Company-employees.treeNode',
rendered:'name',
actionMap:'masterDetailActionMap'
treeNode 'Company-departments.treeNode',
rendered:'ouId',
actionMap:'masterDetailActionMap'
treeNode 'Team-teamMembers.treeNode',
rendered:'name',
actionMap:'localActionMap'
//-------------------------------------------------
// Tree definition
//-------------------------------------------------
tree('Company.tree',
rendered:'name',
preferredWidth:200,
preferredHeight:200,
icon:'structure-48x48.png') {
subTree('Company-employees.treeNode')
subTree('Company-departments.treeNode')
{
subTree('Department-teams.treeNode')
{
subTree('Team-teamMembers.treeNode')
}
}
}
//-------------------------------------------------
// Actions definition
//-------------------------------------------------
actionMap('localActionMap') {
parentActionMaps:'masterDetailActionMap'
actionList('EDIT_LOCAL') {
action(parent:'lovAction',
custom:[
autoquery:true,
entityDescriptor_ref:'Employee',
initializationMapping:['company':'company'],
okAction_ref:'addFromList'
]
)
action(ref:'removeFromList')
}
}
action('removeFromList', parent:'removeEntityCollectionFromMasterFrontAction')
I just don't know what to use instead of the red action...
And i don't even know if selecting a node in the tree really does select the entity behind.
Thx in advance for any suggestion.
