Reaction::UI::Widget::Field::Mutable::HiddenArray - Reaction::UI::Widget::Field::Mutable::HiddenArray documentation


Reaction documentation Contained in the Reaction distribution.

Index


Code Index:

NAME

Top

Reaction::UI::Widget::Field::Mutable::HiddenArray

DESCRIPTION

Top

See Reaction::UI::Widget::Field::Mutable. This renders a list of values as a series of hidden fields to transport them across forms.

FRAGMENTS

Top

hidden_list

Renders hidden_field over the array reference stored in the viewpoint's value.

hidden_field

Sets the field_value argument to the current topic argument _.

field

renders fragment item over the values of 'value' arrayref

item

content is $_{_} / $_ (current item in the 'value' array)

LAYOUT SETS

Top

base

  share/skin/base/layout/field/mutable/hidden_array.tt

Provides a hidden_field layout that renders a hidden input 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::Mutable::HiddenArray;

use Reaction::UI::WidgetClass;

#move this to a normal list and let the hidden part be decided by the template..
use namespace::clean -except => [ qw(meta) ];
extends 'Reaction::UI::Widget::Field::Mutable';

implements fragment hidden_list {
  render hidden_field => over $_{viewport}->value;
};

implements fragment hidden_field {
  # this needs to go here in order to override the field_name from
  # Widget::Field::Mutable::Simple which defaults to value_string and does not
  # make sense for HiddenArray
  arg field_name => event_id 'value';
  arg field_value => $_;
};

__PACKAGE__->meta->make_immutable;


1;

__END__;