I have had a great day practicing Jspresso. I am however stuck alittle. Why is my master detail actionMap not appearing? below is my view and model SJS
View:
// Implement your views here using the SJS DSL.
form 'Company.pane',
parent:'decoratedView',
labelsPosition:'ABOVE',
columnCount:2,
fields:['name','contact.address','contact.city','contact.phone','contact.email'],
widths:[name:2],
description:'Company details'
form 'Traceable.pane',
model:'Traceable',
labelsPosition:'ABOVE',
columnCount:2,
fields:['createdTimestamp','lastUpdatedTimestamp'],
description:'Tracing infomartion'
tabs 'Company.tab.pane',
views:['Company.pane','Traceable.pane']
table 'Company-departments.table',
parent:'decoratedView'
split_vertical 'Company.organization.view',
model:'Company',
top:'Company.tab.pane',
bottom:'Company-departments.table'
tabs 'Company.departments.table',
views:['Company.pane','Traceable.pane'],
actionMap:'masterDetail'
bean 'testView', parent:'Company.organization.view'
Model:
// Implement your domain here using the SJS DSL.
Interface('Nameable'){
string_64 'name', mandatory:true ;
}
Interface('Traceable', interceptors:'TraceableLifecycleInterceptor'
, uncloned:['createdTimestamp', 'lastUpdatedTimestamp'],
icon:'traceable.png'){
date_time 'createdTimestamp', readOnly:true
date_time 'lastUpdatedTimestamp', readOnly:true
}
Entity ('City', extend:'Nameable'){
string_10 'zip'
}
Component('ContactInfo'){
string_256 'address'
string_32 'phone'
string_128 'email', regex:'[\\w\\-\\.]*@[\\w\\-\\.]*', regexSample:'contact [at] demo [dot] com'
reference 'city', ref:'City'
}
Entity('Event' , extend:'Traceable'){
html 'text', maxLength:2048 , id:'Event_text'
}
Entity('Employee', extend:['Traceable', 'Nameable']){
string_32 'firstName', mandatory:true, processors:'FirstNameProcessor'
string_10 'ssn', regex:"[\\d]{10}", regexSample:'0123456789', unicityScope:'empSsn'
date 'birthDate', processors:'BirthDateProcessor'
date 'hireDate'
enumeration 'gender', enumName:'GENDER', mandatory:true, valuesAndIcons:[
'M':'male-48x48.png',
'F':'female-48x48.png']
color 'preferredColor'
bool 'married'
decimal 'salary', minValue:0
binary 'photo', maxLength:1048576, id:'Employee-photo',fileFilter:['images':['.jpg','.bmp']]
password 'password', maxLength:32
list 'events', composition:true, ref:'Event'
reference 'contact', ref:'ContactInfo', id:'contact'
reference 'company', ref:'Company', reverse:'Company-employees', mandatory:true
reference 'managedOu', ref:'OrganizationalUnit', reverse:'organizationalUnit-manager'
set 'teams', ref:'Team', reverse:'Team-teamMembers'
services:[EmployeeService:'EmployeeServiceDelegate']
}
Entity('Company', extend:['Nameable','Traceable'],icon:'company.png'){
reference 'contact', ref:'ContactInfo'
set 'departments', composition:true, ref:'Department'
set 'employees', ref:'Employee', composition:true
}
Entity('OrganizationalUnit',
extend:['Nameable', 'Traceable'],
purelyAbstract:true) {
string_6 'ouId', regex:"[A-Z]{2}-[\\d]{3}", regexSample:'AB-123', mandatory:true
reference 'contact', ref:'ContactInfo'
reference 'manager', id:'organizationalUnit-manager', ref:'Employee', mandatory:true
}
Entity('Department',
extend:'OrganizationalUnit'){
reference 'company' , ref:'Company', reverse:'Company-departments' , mandatory:true
set 'teams', composition:true, ref:'Team'
}
Entity('Team',
extend:['OrganizationalUnit']){
reference 'department' , ref:'Department', reverse:'Department-teams', mandatory:true
set 'teamMembers', ref:'Employee'
}
regards.
Josh

.