NAME
Myco::Entity::Meta::UI
SYNOPSIS
DESCRIPTION
Container for metadata describing appropriate user interface behavior for an entity class.
COMMON ENTITY INTERFACE
Constructor, accessors, and other methods -- as inherited from Class::Tangram
ATTRIBUTES
Attributes may be initially set during object construction (with new()
) but otherwise are accessed solely through accessor methods. Typical usage:
Set attribute value
$obj->set_attribute($value);
Check functions (see Class::Tangram) perform data validation. If there is any concern that the set method might be called with invalid data then the call should be wrapped in an
eval
block to catch exceptions that would result.Get attribute value
$value = $obj->get_attribute;
A listing of available attributes follows:
attribute_options
type: hash ref
displayname
type: string or coderef
sort
type: array ref
my $sort = [ 'last_name',
{first_name => 1},
];
List of attributes to use in sorting list of objects of same (or polymorphic) type. Default order is ascending; optional boolean flag indicates 'descending' order.
list
type: hash ref
Reference to ..::Meta::UI::List object. set_list()
automatically constructs such an object (a new one).
view
type: hash ref
Reference to ..::Meta::UI::View object. set_view()
automatically constructs such an object (a new one).
sort_objs
my @sorted_objs = $ui_metadata->sort_objs(@unsorted_objs);
Returns a code ref for use in perl-style sorting, utilizing class metadata.
LICENSE AND COPYRIGHT
Copyright (c) 2006 the myco project. All rights reserved. This software is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Myco::Entity::Meta::UI::Test, Myco::Entity, Myco, Tangram, Class::Tangram, myco-mkentity