| Reaction documentation | Contained in the Reaction distribution. |
Reaction::UI::Widget::Value::Collection
This widget provides an additional label argument for the widget
fragment containing the localised value of the viewports label attribute.
It also implements the fragments list and item.
This will set the label argument to the return value of the label method
on the viewport. The base layout will then render the list fragment.
This will render the item fragment once for every entry in the viewports
value_names. The base layout will surround the rendered output with a unordered
list.
This will set the argument name to the localised value of the current iteration
(stored in $_). The base layout will render a list item with the value as
html escaped content of the item.
share/skin/base/layout/value/collection.tt share/skin/base/layout/value/list.tt
See Reaction::Class for authors.
See Reaction::Class for the license.
| Reaction documentation | Contained in the Reaction distribution. |
package Reaction::UI::Widget::Value::Collection; use Reaction::UI::WidgetClass; use namespace::clean -except => [ qw(meta) ]; before fragment widget { arg 'label' => localized $_{viewport}->label; }; implements fragment list { render 'item' => over $_{viewport}->value_names; }; implements fragment item { arg 'name' => localized $_; }; __PACKAGE__->meta->make_immutable; 1; __END__;