Reaction::UI::Widget::Field::Container - A field containing multiple values


Reaction documentation Contained in the Reaction distribution.

Index


Code Index:

NAME

Top

Reaction::UI::Widget::Field::Container - A field containing multiple values

DESCRIPTION

Top

This widget implements a field containing multiple value viewports found in the current viewport's fields attribute.

FRAGMENTS

Top

widget

Sets the name argument to the viewport's name attribute.

maybe_label

Sets the label argument to the viewport's label attribute value and renders the label fragment when the viewport has a label defined.

field_list

Sequentially renders the fields of the viewport;

field

Renders the field viewport passed by field_list

LAYOUT SETS

Top

base

  share/skin/base/layout/field/container.tt

The following layouts are provided:

widget

Renders a fieldset element containing the maybe_label and field_list fragments.

label

Renders a legend element for the fieldset containing the label argument.

field

Wraps the next field fragment in a span element.

AUTHORS

Top

See Reaction::Class for authors.

LICENSE

Top

See Reaction::Class for the license.


Reaction documentation Contained in the Reaction distribution.

package Reaction::UI::Widget::Field::Container;

use Reaction::UI::WidgetClass;

use namespace::clean -except => [ qw(meta) ];

before fragment widget {
  arg name  => $_{viewport}->name;
};

implements fragment maybe_label {
  return unless $_{viewport}->has_label;
  arg label => $_{viewport}->label;
  render 'label';
};

implements fragment field_list {
  render field => over $_{viewport}->fields;
};

implements fragment field {
  render 'viewport';
};

__PACKAGE__->meta->make_immutable;

1;

__END__;