Permalink
Browse files

(7) - configured various CRUD options

  • Loading branch information...
vanstyn committed Sep 12, 2013
1 parent 203c84d commit bc1ec9df25d5fe60971e64cd2c87b3ea9b30702b
Showing with 36 additions and 1 deletion.
  1. BIN chinook.db
  2. +6 −0 cmd_history.sh
  3. +30 −1 lib/RA/ChinookDemo.pm
BIN +0 Bytes (100%) chinook.db
Binary file not shown.
@@ -217,3 +217,9 @@ script/ra_chinookdemo_server.pl
# Set certain Sources to be dropdowns
vim lib/RA/ChinookDemo.pm
Commit '(6) - set auto_editor_type (combo) + column TableSpecs'
# Start the test server:
script/ra_chinookdemo_server.pl
#
# Set custom CRUD options
vim lib/RA/ChinookDemo.pm
Commit '(7) - configured various CRUD options'
@@ -35,6 +35,13 @@ __PACKAGE__->config(
Album => {
include_colspec => ['*','artistid.name']
},
Genre => {
# Leave persist_immediately on without the add form
# (inserts blank/default rows immediately):
use_add_form => 0,
# No delete confirmations:
confirm_on_destroy => 0
},
Invoice => {
# Delete invoice_lines with invoice (cascade):
destroyable_relspec => ['*','invoice_lines']
@@ -47,8 +54,30 @@ __PACKAGE__->config(
'invoiceid.billing*'
],
},
MediaType => {
# Use the grid itself to set new row values:
use_add_form => 0, #<-- also disables autoload_added_record
persist_immediately => {
create => 0,
update => 1,
destroy => 1
},
# No delete confirmations:
confirm_on_destroy => 0
},
Track => {
include_colspec => ['*','albumid.artistid.*']
include_colspec => ['*','albumid.artistid.*'],
# Don't persist anything immediately:
persist_immediately => {
# 'create => 0' changes these defaults:
# use_add_form => '0' (normally 'tab')
# autoload_added_record => 0 (normally '1')
create => 0,
update => 0,
destroy => 0
},
# Use the add form in a window:
use_add_form => 'window'
},
}, # (grid_params)
TableSpecs => {

0 comments on commit bc1ec9d

Please sign in to comment.