#use aliased 'Reaction::UI::ViewPort::InterfaceModel::Field::Mutable::File';
#use aliased 'Reaction::UI::ViewPort::InterfaceModel::Field::Mutable::TimeRange';
-class ActionForm is 'Reaction::UI::ViewPort', which {
+class Action is 'Reaction::UI::ViewPort::Object', which {
has '+model' => (isa => 'Reaction::InterfaceModel::Action');
has next_action => (is => 'rw', isa => 'ArrayRef');
=head1 SYNOPSIS
- use aliased 'Reaction::UI::ViewPort::ActionForm';
+ use aliased 'Reaction::UI::ViewPort::Action';
$self->push_viewport(Action,
layout => 'register',
+++ /dev/null
-package Reaction::UI::ViewPort::ActionForm;
-
-use Reaction::Class;
-
-use aliased 'Reaction::UI::ViewPort::Field::Text';
-use aliased 'Reaction::UI::ViewPort::Field::Number';
-use aliased 'Reaction::UI::ViewPort::Field::Boolean';
-use aliased 'Reaction::UI::ViewPort::Field::File';
-use aliased 'Reaction::UI::ViewPort::Field::String';
-use aliased 'Reaction::UI::ViewPort::Field::Password';
-use aliased 'Reaction::UI::ViewPort::Field::DateTime';
-use aliased 'Reaction::UI::ViewPort::Field::ChooseOne';
-use aliased 'Reaction::UI::ViewPort::Field::ChooseMany';
-use aliased 'Reaction::UI::ViewPort::Field::HiddenArray';
-use aliased 'Reaction::UI::ViewPort::Field::TimeRange';
-
-class ActionForm is 'Reaction::UI::ViewPort', which {
- has action => (
- isa => 'Reaction::InterfaceModel::Action', is => 'ro', required => 1
- );
-
- has ordered_fields => (is => 'rw', isa => 'ArrayRef', lazy_build => 1);
-
- has _field_map => (
- isa => 'HashRef', is => 'rw', init_arg => 'fields', lazy_build => 1,
- );
-
- has changed => (
- isa => 'Int', is => 'rw', reader => 'is_changed', default => sub { 0 }
- );
-
- has next_action => (
- isa => 'ArrayRef', is => 'rw', required => 0, predicate => 'has_next_action'
- );
-
- has on_apply_callback => (
- isa => 'CodeRef', is => 'rw', required => 0,
- predicate => 'has_on_apply_callback'
- );
-
- has ok_label => (
- isa => 'Str', is => 'rw', required => 1, default => sub { 'ok' }
- );
-
- has apply_label => (
- isa => 'Str', is => 'rw', required => 1, default => sub { 'apply' }
- );
-
- has close_label => (isa => 'Str', is => 'rw', lazy_fail => 1);
-
- has close_label_close => (
- isa => 'Str', is => 'rw', required => 1, default => sub { 'close' }
- );
-
- has close_label_cancel => (
- isa => 'Str', is => 'rw', required => 1, default => sub { 'cancel' }
- );
-
- sub fields { shift->_field_map }
-
- implements BUILD => as {
- my ($self, $args) = @_;
- unless ($self->_has_field_map) {
- my @field_map;
- my $action = $self->action;
- foreach my $attr ($action->parameter_attributes) {
- push(@field_map, $self->_build_fields_for($attr => $args));
- }
- $self->_field_map({ @field_map });
- }
- $self->close_label($self->close_label_close);
- };
-
- implements _build_fields_for => as {
- my ($self, $attr, $args) = @_;
- my $attr_name = $attr->name;
- #TODO: DOCUMENT ME!!!!!!!!!!!!!!!!!
- my $builder = "_build_fields_for_name_${attr_name}";
- my @fields;
- if ($self->can($builder)) {
- @fields = $self->$builder($attr, $args); # re-use coderef from can()
- } elsif ($attr->has_type_constraint) {
- my $constraint = $attr->type_constraint;
- my $base_name = $constraint->name;
- my $tried_isa = 0;
- CONSTRAINT: while (defined($constraint)) {
- my $name = $constraint->name;
- $name = $attr->_isa_metadata if($name eq '__ANON__');
- if (eval { $name->can('meta') } && !$tried_isa++) {
- foreach my $class ($name->meta->class_precedence_list) {
- my $mangled_name = $class;
- $mangled_name =~ s/:+/_/g;
- my $builder = "_build_fields_for_type_${mangled_name}";
- if ($self->can($builder)) {
- @fields = $self->$builder($attr, $args);
- last CONSTRAINT;
- }
- }
- }
- if (defined($name)) {
- unless (defined($base_name)) {
- $base_name = "(anon subtype of ${name})";
- }
- my $mangled_name = $name;
- $mangled_name =~ s/:+/_/g;
- my $builder = "_build_fields_for_type_${mangled_name}";
- if ($self->can($builder)) {
- @fields = $self->$builder($attr, $args);
- last CONSTRAINT;
- }
- }
- $constraint = $constraint->parent;
- }
- if (!defined($constraint)) {
- confess "Can't build field ${attr_name} of type ${base_name} without $builder method or _build_fields_for_type_<type> method for type or any supertype";
- }
- } else {
- confess "Can't build field ${attr} without $builder method or type constraint";
- }
- return @fields;
- };
-
- implements _build_field_map => as {
- confess "Lazy field map building not supported by default";
- };
-
- implements _build_ordered_fields => as {
- my $self = shift;
- my $ordered = $self->sort_by_spec($self->column_order, [keys %{$self->_field_map}]);
- return [@{$self->_field_map}{@$ordered}];
- };
-
- implements can_apply => as {
- my ($self) = @_;
- foreach my $field ( @{ $self->ordered_fields } ) {
- return 0 if $field->needs_sync;
- # if e.g. a datetime field has an invalid value that can't be re-assembled
- # into a datetime object, the action may be in a consistent state but
- # not synchronized from the fields; in this case, we must not apply
- }
- return $self->action->can_apply;
- };
-
- implements do_apply => as {
- my $self = shift;
- return $self->action->do_apply;
- };
-
- implements ok => as {
- my $self = shift;
- if ($self->apply(@_)) {
- $self->close(@_);
- }
- };
-
- implements apply => as {
- my $self = shift;
- if ($self->can_apply && (my $result = $self->do_apply)) {
- $self->changed(0);
- $self->close_label($self->close_label_close);
- $self->on_apply_callback->($self => $result) if $self->has_on_apply_callback;
- return 1;
- } else {
- $self->changed(1);
- $self->close_label($self->close_label_cancel);
- return 0;
- }
- };
-
- implements close => as {
- my $self = shift;
- my ($controller, $name, @args) = @{$self->next_action};
- $controller->pop_viewport;
- $controller->$name($self->action->ctx, @args);
- };
-
- sub can_close { 1 }
-
- override accept_events => sub {
- (($_[0]->has_next_action ? ('ok', 'close') : ()), 'apply', super());
- }; # can't do a close-type operation if there's nowhere to go afterwards
-
- override child_event_sinks => sub {
- my ($self) = @_;
- return ((grep { ref($_) =~ 'Hidden' } values %{$self->_field_map}),
- (grep { ref($_) !~ 'Hidden' } values %{$self->_field_map}),
- super());
- };
-
- after apply_child_events => sub {
- # interrupt here because fields will have been updated
- my ($self) = @_;
- $self->sync_action_from_fields;
- };
-
- implements sync_action_from_fields => as {
- my ($self) = @_;
- my $field_map = $self->_field_map;
- my @fields = values %{$field_map};
- foreach my $field (@fields) {
- $field->sync_to_action; # get the field to populate the $action if possible
- }
- $self->action->sync_all;
- foreach my $field (@fields) {
- $field->sync_from_action; # get errors from $action if applicable
- }
- };
-
- implements _build_simple_field => as {
- my ($self, $class, $attr, $args) = @_;
- my $attr_name = $attr->name;
- my %extra;
- if (my $config = $args->{Field}{$attr_name}) {
- %extra = %$config;
- }
- my $field = $class->new(
- action => $self->action,
- attribute => $attr,
- name => $attr->name,
- location => join('-', $self->location, 'field', $attr->name),
- ctx => $self->ctx,
- %extra
- );
- return ($attr_name => $field);
- };
-
- implements _build_fields_for_type_Num => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(Number, $attr, $args);
- };
-
- implements _build_fields_for_type_Int => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(Number, $attr, $args);
- };
-
- implements _build_fields_for_type_Bool => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(Boolean, $attr, $args);
- };
-
- implements _build_fields_for_type_File => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(File, $attr, $args);
- };
-
- implements _build_fields_for_type_Str => as {
- my ($self, $attr, $args) = @_;
- if ($attr->has_valid_values) { # There's probably a better way to do this
- return $self->_build_simple_field(ChooseOne, $attr, $args);
- }
- return $self->_build_simple_field(Text, $attr, $args);
- };
-
- implements _build_fields_for_type_SimpleStr => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(String, $attr, $args);
- };
-
- implements _build_fields_for_type_Password => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(Password, $attr, $args);
- };
-
- implements _build_fields_for_type_DateTime => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(DateTime, $attr, $args);
- };
-
- implements _build_fields_for_type_Enum => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(ChooseOne, $attr, $args);
- };
-
- #implements build_fields_for_type_Reaction_InterfaceModel_Object => as {
- implements _build_fields_for_type_DBIx_Class_Row => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(ChooseOne, $attr, $args);
- };
-
- implements _build_fields_for_type_ArrayRef => as {
- my ($self, $attr, $args) = @_;
- if ($attr->has_valid_values) {
- return $self->_build_simple_field(ChooseMany, $attr, $args)
- } else {
- return $self->_build_simple_field(HiddenArray, $attr, $args)
- }
- };
-
- implements _build_fields_for_type_DateTime_Spanset => as {
- my ($self, $attr, $args) = @_;
- return $self->_build_simple_field(TimeRange, $attr, $args);
- };
-
- no Moose;
-
- no strict 'refs';
- delete ${__PACKAGE__ . '::'}{inner};
-
-};
-
- 1;
-
-=head1 NAME
-
-Reaction::UI::ViewPort::ActionForm
-
-=head1 SYNOPSIS
-
- use aliased 'Reaction::UI::ViewPort::ActionForm';
-
- $self->push_viewport(ActionForm,
- layout => 'register',
- action => $action,
- next_action => [ $self, 'redirect_to', 'accounts', $c->req->captures ],
- ctx => $c,
- column_order => [
- qw / contact_title company_name email address1 address2 address3
- city country post_code telephone mobile fax/ ],
- );
-
-=head1 DESCRIPTION
-
-This subclass of viewport is used for rendering a collection of
-L<Reaction::UI::ViewPort::Field> objects for user editing.
-
-=head1 ATTRIBUTES
-
-=head2 action
-
-L<Reaction::InterfaceModel::Action>
-
-=head2 ok_label
-
-Default: 'ok'
-
-=head2 apply_label
-
-Default: 'apply'
-
-=head2 close_label_close
-
-Default: 'close'
-
-=head2 close_label_cancel
-
-This label is only shown when C<changed> is true.
-
-Default: 'cancel'
-
-=head2 fields
-
-=head2 can_apply
-
-=head2 can_close
-
-=head2 changed
-
-Returns true if a field has been edited.
-
-=head2 next_action
-
-=head2 on_apply_callback
-
-CodeRef.
-
-=head1 METHODS
-
-=head2 ok
-
-Calls C<apply>, and then C<close> if successful.
-
-=head2 close
-
-Pop viewport and proceed to C<next_action>.
-
-=head2 apply
-
-Attempt to save changes and update C<changed> attribute if required.
-
-=head1 SEE ALSO
-
-L<Reaction::UI::ViewPort>
-
-L<Reaction::InterfaceModel::Action>
-
-=head1 AUTHORS
-
-See L<Reaction::Class> for authors.
-
-=head1 LICENSE
-
-See L<Reaction::Class> for the license.
-
-=cut
-package Reaction::UI::Widget::ActionForm;
+package Reaction::UI::Widget::Action;
use Reaction::UI::WidgetClass;
-class ActionForm, which {
+class Action is 'Reaction::UI::Widget::Object', which {
- #implements fragment widget {
+ #before fragment widget {
# arg form_id => $_{viewport}->location;
#};
- implements fragment field_list {
- render field => over $_{viewport}->ordered_fields;
- };
+ #implements fragment field_list {
+ # render field => over $_{viewport}->ordered_fields;
+ #};
- implements fragment field {
- render 'viewport';
- };
+ #implements fragment field {
+ # render 'viewport';
+ #};
implements fragment ok_button_fragment {
if (grep { $_ eq 'ok' } $_{viewport}->accept_events) {
=head1 NAME
-Reaction::UI::Widget::ActionForm
+Reaction::UI::Widget::Action
=head1 DESCRIPTION
=head2 widget
-Additional variables available in topic hash: "viewport".
-
Renders "header", "field_list", "buttons" and "footer"
=head2 field_list
-package Reaction::UI::Widget::GridView::Action;
+package Reaction::UI::Widget::Action::Link;
use Reaction::UI::WidgetClass;
-class Action, which {
+#I want to change this at some point.
+class Link, which {
before fragment widget {
arg uri => $_{viewport}->uri;
--- /dev/null
+package Reaction::UI::Widget::Collection;
+
+use Reaction::UI::WidgetClass;
+
+class Collection, which {
+
+ implements fragment members {
+ render member => over $_{viewport}->members;
+ };
+
+ implements fragment member {
+ render 'viewport';
+ };
+
+};
+
+1;
+
+__END__;
-package Reaction::UI::Widget::GridView;
+package Reaction::UI::Widget::Collection::Grid;
use Reaction::UI::WidgetClass;
-class GridView, which {
+class Grid is 'Reaction::UI::Widget::Collection', which {
implements fragment header_cells {
arg 'labels' => $_{viewport}->field_labels;
render header_cell => over $_{viewport}->field_order;
};
- implements fragment body_rows {
- render body_row => over $_{viewport}->entities;
- };
-
- implements fragment body_row {
- render 'viewport';
- };
-
implements fragment header_cell {
arg label => $_{labels}->{$_};
};
-package Reaction::UI::Widget::DisplayField::String;
+package Reaction::UI::Widget::Collection::Grid::Member;
use Reaction::UI::WidgetClass;
-class String is 'Reaction::UI::Widget::DisplayField', which {
+class Member is 'Reaction::UI::Widget::Object', which {
+
};
__END__;
+
=head1 NAME
-Reaction::UI::Widget::DisplayField::String
+Reaction::UI::Widget::Collection::Grid::Member
=head1 DESCRIPTION
-See L<Reaction::UI::Widget::DisplayField>
+=head1 FRAGMENTS
=head1 AUTHORS
-package Reaction::UI::Widget::GridView::Entity::WithActions;
+package Reaction::UI::Widget::Collection::Grid::Member::WithActions;
use Reaction::UI::WidgetClass;
-class WithActions, is 'Reaction::UI::Widget::GridView::Entity', which {
+class WithActions, is 'Reaction::UI::Widget::Collection::Grid::Member', which {
implements fragment actions {
render action => over $_{viewport}->actions;
};
-
+
implements fragment action {
render 'viewport';
};
+++ /dev/null
-package Reaction::UI::Widget::DisplayField;
-
-use Reaction::UI::WidgetClass;
-
-class DisplayField, which {
-
- before fragment widget {
- arg label => $_{viewport}->label;
- arg value => $_{viewport}->value_string;
- };
-
-};
-
-1;
-
-__END__;
-
-=head1 NAME
-
-Reaction::UI::Widget::DisplayField
-
-=head1 DESCRIPTION
-
-=head1 FRAGMENTS
-
-=head2 widget
-
-Additional variables available in topic hash: "viewport".
-
-Renders "label" and "field"
-
-=head2 field
-
- C<content> will contain the value, if any, of the field.
-
-=head2 label
-
- C<content> will contain the label, if any, of the field.
-
-=head1 AUTHORS
-
-See L<Reaction::Class> for authors.
-
-=head1 LICENSE
-
-See L<Reaction::Class> for the license.
-
-=cut
+++ /dev/null
-package Reaction::UI::Widget::DisplayField::Boolean;
-
-use Reaction::UI::WidgetClass;
-
-class Boolean is 'Reaction::UI::Widget::DisplayField', which {
-
-};
-
-1;
-
-__END__;
-
-=head1 NAME
-
-Reaction::UI::Widget::DisplayField::Boolean
-
-=head1 DESCRIPTION
-
-See L<Reaction::UI::Widget::DisplayField>
-
-=head1 FRAGMENTS
-
-=head2 value
-
-C<content> contains the viewport's value_string
-
-=head1 AUTHORS
-
-See L<Reaction::Class> for authors.
-
-=head1 LICENSE
-
-See L<Reaction::Class> for the license.
-
-=cut
+++ /dev/null
-package Reaction::UI::Widget::DisplayField::DateTime;
-
-use Reaction::UI::WidgetClass;
-
-class DateTime is 'Reaction::UI::Widget::DisplayField', which {
-
-};
-
-1;
-
-__END__;
-
-=head1 NAME
-
-Reaction::UI::Widget::DisplayField::DateTime
-
-=head1 DESCRIPTION
-
-See L<Reaction::UI::Widget::DisplayField>
-
-=head1 FRAGMENTS
-
-=head2 value
-
-C<content> contains the viewport's value_string
-
-=head1 AUTHORS
-
-See L<Reaction::Class> for authors.
-
-=head1 LICENSE
-
-See L<Reaction::Class> for the license.
-
-=cut
+++ /dev/null
-package Reaction::UI::Widget::DisplayField::Number;
-
-use Reaction::UI::WidgetClass;
-
-class Number is 'Reaction::UI::Widget::DisplayField', which {
-
-};
-
-1;
-
-__END__;
-
-=head1 NAME
-
-Reaction::UI::Widget::DisplayField::Numberx
-
-=head1 DESCRIPTION
-
-See L<Reaction::UI::Widget::DisplayField>
-
-=head1 AUTHORS
-
-See L<Reaction::Class> for authors.
-
-=head1 LICENSE
-
-See L<Reaction::Class> for the license.
-
-=cut
class Field, which {
before fragment widget {
- arg 'field_id' => event_id 'value';
- arg 'field_name' => event_id 'value';
- arg 'field_type' => 'text';
if ($_{viewport}->can('value_string')) {
arg 'field_value' => $_{viewport}->value_string;
- }
- };
-
- implements fragment message_fragment {
- if (my $message = $_{viewport}->message) {
- arg message => $message;
- render 'message';
+ } else {
+ arg 'field_value' => $_{viewport}->value;
}
};
class Boolean is 'Reaction::UI::Widget::Field', which {
- implements fragment is_checked {
- if ($_{viewport}->value) {
- render 'is_checked_yes';
- } else {
- render 'is_checked_no';
- }
- };
-
};
1;
See L<Reaction::UI::Widget::Field>
+=head1 FRAGMENTS
+
+=head2 value
+
+C<content> contains the viewport's value_string
+
=head1 AUTHORS
See L<Reaction::Class> for authors.
-package Reaction::UI::Widget::DisplayField::Collection;
+package Reaction::UI::Widget::Field::Collection;
use Reaction::UI::WidgetClass;
=head1 NAME
-Reaction::UI::Widget::DisplayField::Collection
+Reaction::UI::Widget::Field::Collection
=head1 DESCRIPTION
=head1 FRAGMENTS
-=head2 field
+=head2 value
-C<content> contains viewport's C<value_string>
+C<content> contains the viewport's value_string
=head1 AUTHORS
-package Reaction::UI::Widget::DisplayField::List;
+package Reaction::UI::Widget::Field::List;
use Reaction::UI::WidgetClass;
class List, which {
- fragment widget [ qw/label list item/ ];
- fragment label [ string { $_{viewport}->label } ];
- fragment list [ item => over func('viewport', 'value_names') ];
- fragment item [ string { $_ } ];
+
+ before fragment widget {
+ arg 'label' => $_{viewport}->label;
+ };
+
+ implements fragment list {
+ render 'item' => over $_{viewport}->value_names;
+ };
+
+ implements fragment item {
+ arg 'name' => $_;
+ };
+
};
1;
--- /dev/null
+package Reaction::UI::Widget::Field::Mutable;
+
+use Reaction::UI::WidgetClass;
+
+class Field is 'Reaction::UI::Widget::Field', which {
+
+ before fragment widget {
+ arg 'field_id' => event_id 'value';
+ arg 'field_name' => event_id 'value';
+ arg 'field_type' => 'text';
+ };
+
+ implements fragment message_fragment {
+ if (my $message = $_{viewport}->message) {
+ arg message => $message;
+ render 'message';
+ }
+ };
+
+};
+
+1;
+
+__END__;
--- /dev/null
+package Reaction::UI::Widget::Field::Mutable::Boolean;
+
+use Reaction::UI::WidgetClass;
+
+class Boolean is 'Reaction::UI::Widget::Field::Mutable', which {
+
+ implements fragment is_checked {
+ if ($_{viewport}->value) {
+ render 'is_checked_yes';
+ } else {
+ render 'is_checked_no';
+ }
+ };
+
+};
+
+1;
+
+__END__;
+
+=head1 NAME
+
+Reaction::UI::Widget::Field::Boolean
+
+=head1 DESCRIPTION
+
+See L<Reaction::UI::Widget::Field>
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
+
+=cut
-package Reaction::UI::Widget::Field::ChooseMany;
+package Reaction::UI::Widget::Field::Mutable::ChooseMany;
use Reaction::UI::WidgetClass;
-class ChooseMany is 'Reaction::UI::Widget::Field', which {
+class ChooseMany is 'Reaction::UI::Widget::Field::Mutable', which {
implements fragment action_buttons {
foreach my $event (
-package Reaction::UI::Widget::Field::ChooseOne;
+package Reaction::UI::Widget::Field::Mutable::ChooseOne;
use Reaction::UI::WidgetClass;
-class ChooseOne is 'Reaction::UI::Widget::Field', which {
+class ChooseOne is 'Reaction::UI::Widget::Field::Mutable', which {
implements fragment option_is_required {
if ($_{viewport}->attribute->is_required) {
--- /dev/null
+package Reaction::UI::Widget::Field::Mutable::DateTime;
+
+use Reaction::UI::WidgetClass;
+
+class DateTime is 'Reaction::UI::Widget::Field::Mutable', which {
+
+};
+
+1;
+
+__END__;
+
+=head1 NAME
+
+Reaction::UI::Widget::Field::DateTime
+
+=head1 DESCRIPTION
+
+See L<Reaction::UI::Widget::Field>
+
+=head1 FRAGMENTS
+
+=head2 field
+
+C<content> contains viewport's C<value_string>
+
+=head1 AUTHORS
+
+See L<Reaction::Class> for authors.
+
+=head1 LICENSE
+
+See L<Reaction::Class> for the license.
+
+=cut
-package Reaction::UI::Widget::Field::File;
+package Reaction::UI::Widget::Field::Mutable::File;
use Reaction::UI::WidgetClass;
-class File is 'Reaction::UI::Widget::Field', which {
+class File is 'Reaction::UI::Widget::Field::Mutable', which {
after fragment widget {
arg field_type => 'file';
-package Reaction::UI::Widget::Field::HiddenArray;
+package Reaction::UI::Widget::Field::Mutable::HiddenArray;
use Reaction::UI::WidgetClass;
-class HiddenArray is 'Reaction::UI::Widget::Field', which {
+#move this to a normal list and let the hidden part be decided by the template..
+class HiddenArray is 'Reaction::UI::Widget::Field::Mutable', which {
implements fragment hidden_list {
render hidden_field => over $_{viewport}->value;
-package Reaction::UI::Widget::Field::TimeRange;
+package Reaction::UI::Widget::Field::Mutable::Number;
use Reaction::UI::WidgetClass;
-class TimeRange is 'Reaction::UI::Widget::Field', which {
+class Number is 'Reaction::UI::Widget::Field::Mutable', which {
};
=head1 NAME
-Reaction::UI::Widget::Field::TimeRange
+Reaction::UI::Widget::Field::Number
=head1 DESCRIPTION
-Warning: INCOMPLETE CLASS
-
See L<Reaction::UI::Widget::Field>
=head1 AUTHORS
-package Reaction::UI::Widget::Field::Password;
+package Reaction::UI::Widget::Field::Mutable::Password;
use Reaction::UI::WidgetClass;
-class Password is 'Reaction::UI::Widget::Field', which {
+class Password is 'Reaction::UI::Widget::Field::Mutable', which {
around fragment widget {
call_next;
-package Reaction::UI::Widget::Field::TimeRange;
+package Reaction::UI::Widget::Field::Mutable::String;
use Reaction::UI::WidgetClass;
-class TimeRange is 'Reaction::UI::Widget::Field', which {
+class String is 'Reaction::UI::Widget::Field::Mutable', which {
};
=head1 NAME
-Reaction::UI::Widget::Field::TimeRange
+Reaction::UI::Widget::Field::String
=head1 DESCRIPTION
-Warning: INCOMPLETE CLASS
-
See L<Reaction::UI::Widget::Field>
=head1 AUTHORS
-package Reaction::UI::Widget::DisplayField::Text;
+package Reaction::UI::Widget::Field::Mutable::Text;
use Reaction::UI::WidgetClass;
-class Text is 'Reaction::UI::Widget::DisplayField', which {
+class Text is 'Reaction::UI::Widget::Field::Mutable', which {
};
=head1 NAME
-Reaction::UI::Widget::DisplayField::Text
+Reaction::UI::Widget::Field::Text
=head1 DESCRIPTION
-See L<Reaction::UI::Widget::DisplayField>
+See L<Reaction::UI::Widget::Field>
=head1 AUTHORS
-package Reaction::UI::Widget::Field::TimeRange;
+package Reaction::UI::Widget::Field::Mutable::TimeRange;
use Reaction::UI::WidgetClass;
-class TimeRange is 'Reaction::UI::Widget::Field', which {
+class TimeRange is 'Reaction::UI::Widget::Field::Mutable', which {
};
=head1 NAME
-Reaction::UI::Widget::Field::Number
+Reaction::UI::Widget::DisplayField::Numberx
=head1 DESCRIPTION
-See L<Reaction::UI::Widget::Field>
+See L<Reaction::UI::Widget::DisplayField>
=head1 AUTHORS
-package Reaction::UI::Widget::DisplayField::RelatedObject;
+package Reaction::UI::Widget::Field::RelatedObject;
use Reaction::UI::WidgetClass;
-class RelatedObject is 'Reaction::UI::Widget::DisplayField', which {
+class RelatedObject is 'Reaction::UI::Widget::Field', which {
};
=head1 NAME
-Reaction::UI::Widget::Field::String
+Reaction::UI::Widget::DisplayField::String
=head1 DESCRIPTION
-See L<Reaction::UI::Widget::Field>
+See L<Reaction::UI::Widget::DisplayField>
=head1 AUTHORS
+++ /dev/null
-package Reaction::UI::Widget::GridView::Entity;
-
-use Reaction::UI::WidgetClass;
-
-class Entity, which {
-
- implements fragment field_list {
- render 'field' => over $_{viewport}->fields;
- };
-
- implements fragment field {
- render 'viewport';
- };
-
-};
-
-1;
-
-__END__;
-
-
-=head1 NAME
-
-Reaction::UI::Widget::GridView::Entity
-
-=head1 DESCRIPTION
-
-=head1 FRAGMENTS
-
-=head2 widget
-
-Additional variables available in topic hash: "viewport".
-
-Renders "field_list"
-
-=head2 field_list
-
-Sequentially renders the C<fields> of the viewport as "field"
-
-=head2 field
-
-renders the cell value
-
-=head1 AUTHORS
-
-See L<Reaction::Class> for authors.
-
-=head1 LICENSE
-
-See L<Reaction::Class> for the license.
-
-=cut
-package Reaction::UI::Widget::ObjectView;
+package Reaction::UI::Widget::Object;
use Reaction::UI::WidgetClass;
-class ObjectView, which {
+class Object, which {
implements fragment field_list {
render field => over $_{viewport}->ordered_fields;
=head1 NAME
-Reaction::UI::Widget::ObjectView
+Reaction::UI::Widget::Object
=head1 DESCRIPTION
=head2 widget
-Additional variables available in topic hash: "viewport".
-
-Renders "field_list"
+Renders C<field_list>
=head2 field_list
-Sequentially renders the C<ordered_fields> of the viewport
+Sequentially renders the C<ordered_fields> of the viewport.
=head1 AUTHORS