Reaction::UI::ViewPort::Object - Display an InterfaceModel::Object


  use aliased 'Reaction::UI::ViewPort::Object';

    model           => $person_interface_model_object,
    fields_order    => [qw( firstname lastname )],
    excluded_fields => [qw( password )],


Takes a Reaction::InterfaceModel::Object class and displays the configured fields.



Required Reaction::InterfaceModel::Object.


Initialised via "_build_fields"


Hash reference keyed by field names. Values are hash references containing arguments to the field builder method of the attribute.


Array reference of strings defining the order of all fields (including the ones that might be excluded).


Hash reference containing resolved builder method names per field. Utilised by "_build_fields"


Array reference of strings naming fields to exclude from the interface.


List of field names to include. If both included_fields and excluded_fields are specified the result is those fields which are in included_fields and not in excluded_fields.


Array reference of strings Initialised by the "_computed_field_order" method. Contains the fields to show in the correct order.


Array reference populated by "_build_containers".


Array reference containing container layout specifications.


These methods, although stable, are subject to change without notice. These are meant to be used only by developers. End users should refrain from using these methods to avoid potential breakages.


Takes the value of the Field constructor argument, if true, and sets it as the new "field_args" hash reference.


Takes an attribute object as argument and returns a string containing the name of the method that builds the fields for this attribute.

If the viewport implements it, _build_fields_for_name_${attr_name} will be used.

If that is not available, it will take the isa information of the type constraint and see if it is a loaded class implementing meta. If it is, every class in its class_precedence_list will be taken and used to try to find a _build_fields_for_type_${mangled_class_name} method on the viewport.

"mangled" means here that every :* will be replaced with _. For example: Foo::Bar would become Foo_Bar.

If the isa information was not obtainable or no fitting method was found, it will try the type name in a method named _build_fields_for_type_${mangled_type_name}.

If could be found on this constraint, it will make the same attempts to find a method on its parent type constraint.

This method will die if it can't locate a method to build a field for this attribute.


Uses "container_layouts" to build a list of Reaction::UI::ViewPort::Field::Container objects.


Takes the "model"s parameter_attributes to build fields via "get_builder_for". They will be ordered as specified in "computed_field_order".


Takes the names of the "model"s parameter_attributes' reader methods and assumes them as field names. Then it uses "field_order" and "excluded_fields" to calculate the order of all included fields and returns those names.


    attribute => $attribute_object,
    class     => $field_class,

Takes an attribute meta object, a field class (a Reaction::UI::ViewPort::Field subclass) and an additional set of arguments to pass to the field constructor and returns the new field. Field classes themselves are Reaction::UI::ViewPort subclasses.













Text, Number, Integer, Boolean, String, DateTime, RelatedObject, Array, Collection, File, Container


See Reaction::Class for authors.


See Reaction::Class for the license.