E
Eduardo
Hello, I want to have a subclass of Class:BI which can manage its
own HTML editing form.
I would create an instance from this class and have it yield its form
with default values. This is probably a mess among data
storage/presentation, which is the proper way to go about it?
The examples in FormBuilder's docs always show the values coming from
queries, or from other objects (typically an $sth result), but I want
something like:
my $t = MyApp::MyTable->retrieve(something); # a Class:BI
descendant
my $form = $t->form;
print $form->render(values => $t);
However, the values() method as applied by render() seems to require
'a hashref or an object'. I am evidently getting something wrong on
the object side, as I need to access the blessed data inside $t
instead of $t proper. This seems rather quirky. Should I be getting
the values hashref from $t before the call to render? How? I've seen
an ACME:amn module, is this pure nonsense? What's the recommended
approach?
Thanks in advance!
--Very confused
own HTML editing form.
I would create an instance from this class and have it yield its form
with default values. This is probably a mess among data
storage/presentation, which is the proper way to go about it?
The examples in FormBuilder's docs always show the values coming from
queries, or from other objects (typically an $sth result), but I want
something like:
my $t = MyApp::MyTable->retrieve(something); # a Class:BI
descendant
my $form = $t->form;
print $form->render(values => $t);
However, the values() method as applied by render() seems to require
'a hashref or an object'. I am evidently getting something wrong on
the object side, as I need to access the blessed data inside $t
instead of $t proper. This seems rather quirky. Should I be getting
the values hashref from $t before the call to render? How? I've seen
an ACME:amn module, is this pure nonsense? What's the recommended
approach?
Thanks in advance!
--Very confused