--- trunk/lib/Frey/Web/Design.pm 2008/07/16 23:17:59 152 +++ trunk/lib/Frey/Web/Design.pm 2008/07/16 23:21:19 153 @@ -2,6 +2,7 @@ use Moose; extends 'Frey::Web::Item'; with 'Frey::Web::Button'; +with 'Frey::Storage'; =head1 NAME @@ -14,9 +15,14 @@ has 'labels' => ( is => 'rw', isa => 'HashRef[Str]', - default => sub { {} }, + lazy_build => 1, ); +sub _build_labels { + my $self = shift; + $self->load( 'var/design/' . $self->fey_class . '-labels' ) || {} +}; + has 'label_order' => ( is => 'rw', isa => 'HashRef[Int]', @@ -59,6 +65,7 @@ # XXX we really need this since we are in continutation and have old value! $caller->value( $val ); warn "## saved $val new labels = ",dump( $self->labels, $caller->value ); + $self->store( 'var/design/' . $self->fey_class . '-labels', $self->labels ); } ); }