diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-07-11 22:59:02 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2009-07-11 22:59:02 +0000 |
commit | 4ad1eed3fe0f8a90080c63ec474e4634376f0f95 (patch) | |
tree | 16415e2857b59d155b63b1c6b7ff8ba39be7a7da /lib/ComponentUI | |
parent | b5a45848e42a559b828c46167f98c507a3ac8fc3 (diff) | |
download | reaction-4ad1eed3fe0f8a90080c63ec474e4634376f0f95.tar.gz reaction-4ad1eed3fe0f8a90080c63ec474e4634376f0f95.zip |
wire layout_args, which was somehow never connected to the mix
Diffstat (limited to 'lib/ComponentUI')
-rw-r--r-- | lib/ComponentUI/Controller/Root.pm | 11 | ||||
-rw-r--r-- | lib/ComponentUI/UI/Widget/Index.pm | 15 |
2 files changed, 25 insertions, 1 deletions
diff --git a/lib/ComponentUI/Controller/Root.pm b/lib/ComponentUI/Controller/Root.pm index e0935d9..9a2017f 100644 --- a/lib/ComponentUI/Controller/Root.pm +++ b/lib/ComponentUI/Controller/Root.pm @@ -33,7 +33,16 @@ sub base :Chained('/') :PathPart('') :CaptureArgs(0) { sub root :Chained('base') :PathPart('') :Args(0) { my ($self, $c) = @_; - $self->push_viewport(ViewPort, layout => 'index'); + $self->push_viewport( + ViewPort, ( + layout => 'index', + layout_args => { + user_agent => $c->request->user_agent, + message_to_layout => 'I hate programming.', + }, + ), + ); + $c->log->debug('remote', $c->request->remote_user ); } sub bye :Chained('base') :PathPart('bye') :Args(0) { diff --git a/lib/ComponentUI/UI/Widget/Index.pm b/lib/ComponentUI/UI/Widget/Index.pm new file mode 100644 index 0000000..5421d7d --- /dev/null +++ b/lib/ComponentUI/UI/Widget/Index.pm @@ -0,0 +1,15 @@ +package ComponentUI::UI::Widget::Index; + +use Reaction::UI::WidgetClass; +use namespace::clean -except => [ qw(meta) ]; + +after fragment widget { + $_{viewport}->ctx->log->debug('widget'); + arg message_to_layout => $_{layout_message}; +}; + +__PACKAGE__->meta->make_immutable; + +1; + +__END__ |