diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-08-21 00:38:47 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-08-21 00:38:47 +0000 |
commit | 599c1172394e3377d8e3e28c06557a99a1a10d1e (patch) | |
tree | 78e277ddc4cd5af9c43f9b033d82afc071e3f1e8 /lib/ComponentUI | |
parent | 3671c9c3a3eb9640371d09a80ff88ae774d0a0b7 (diff) | |
download | reaction-599c1172394e3377d8e3e28c06557a99a1a10d1e.tar.gz reaction-599c1172394e3377d8e3e28c06557a99a1a10d1e.zip |
container support built into fields and an example of usage in ComponentUI
Diffstat (limited to 'lib/ComponentUI')
-rw-r--r-- | lib/ComponentUI/Controller/TestModel/Bar.pm | 4 | ||||
-rw-r--r-- | lib/ComponentUI/Controller/TestModel/Foo.pm | 33 |
2 files changed, 35 insertions, 2 deletions
diff --git a/lib/ComponentUI/Controller/TestModel/Bar.pm b/lib/ComponentUI/Controller/TestModel/Bar.pm index f7859b7..0839506 100644 --- a/lib/ComponentUI/Controller/TestModel/Bar.pm +++ b/lib/ComponentUI/Controller/TestModel/Bar.pm @@ -6,7 +6,9 @@ use Reaction::Class; __PACKAGE__->config( model_name => 'TestModel', collection_name => 'Bar', - action => { base => { Chained => '/base', PathPart => 'testmodel/bar' }}, + action => { + base => { Chained => '/base', PathPart => 'testmodel/bar' }, + }, ); 1; diff --git a/lib/ComponentUI/Controller/TestModel/Foo.pm b/lib/ComponentUI/Controller/TestModel/Foo.pm index cc821c5..b5dfe5b 100644 --- a/lib/ComponentUI/Controller/TestModel/Foo.pm +++ b/lib/ComponentUI/Controller/TestModel/Foo.pm @@ -6,7 +6,38 @@ use Reaction::Class; __PACKAGE__->config( model_name => 'TestModel', collection_name => 'Foo', - action => { base => { Chained => '/base', PathPart => 'testmodel/foo' } }, + action => { + base => { Chained => '/base', PathPart => 'testmodel/foo' }, + list => { + ViewPort => { + excluded_fields => [qw/id/], + }, + }, + view => { + ViewPort => { + excluded_fields => [qw/id/], + }, + }, + }, ); +for my $action (qw/view create update/){ + __PACKAGE__->config( + action => { + $action => { + ViewPort => { + container_layouts => [ + { name => 'primary', fields => [qw/first_name last_name/]}, + { + name => 'secondary', + label => 'Optional Label', + fields => [qw/bars bazes/], + }, + ], + }, + }, + } + ); +} + 1; |