diff options
author | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2007-11-15 21:12:16 +0000 |
---|---|---|
committer | matthewt <matthewt@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2007-11-15 21:12:16 +0000 |
commit | 097e844260b8b3443cd44d8295c941f1086845bc (patch) | |
tree | d6d80e9e396e3087f8d54cc8528cc3c944a7675b /lib/Reaction/UI/Widget/Field.pm | |
parent | d193faa5cf46694286c7db654510240db46c9bf5 (diff) | |
download | reaction-097e844260b8b3443cd44d8295c941f1086845bc.tar.gz reaction-097e844260b8b3443cd44d8295c941f1086845bc.zip |
move viewport to being %_ arg only, not widget attribute, cache widget construction
Diffstat (limited to 'lib/Reaction/UI/Widget/Field.pm')
-rw-r--r-- | lib/Reaction/UI/Widget/Field.pm | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Reaction/UI/Widget/Field.pm b/lib/Reaction/UI/Widget/Field.pm index 13276c2..40ca595 100644 --- a/lib/Reaction/UI/Widget/Field.pm +++ b/lib/Reaction/UI/Widget/Field.pm @@ -4,15 +4,9 @@ use Reaction::UI::WidgetClass; class Field, which { - has id => (isa => 'Str', is => 'ro', lazy_build => 1); - has name => (isa => 'Str', is => 'ro', lazy_build => 1); - - implements _build_id => as { shift->viewport->event_id_for('value'); }; - implements _build_name => as { shift->viewport->event_id_for('value'); }; - fragment widget [qw/label field message/ - => { id => func('self', 'id'), - name => func('self', 'name'), } + => { id => sub { $_{viewport}->event_id_for('value') }, + name => sub { $_{viewport}->event_id_for('value') }, ]; fragment field [ string { $_{viewport}->value }, ]; |