[html-formfu] Getting "need a schema or context" loading config file
Dennis Daupert
ddaupert at gmail.com
Fri Apr 10 16:10:13 GMT 2009
I've only recently begun to use FormFu, and this is my first post, so let me
know if I need to supply more/different/less info.
I'm trying to configure and populate a Select widget in my Catalyst app, but
keep getting the "need a schema or context" error.
My ultimate goal is to initially show the Select populated with a list of
Projects from which the user makes selection; then a second Select displays
showing a list of available filesystem directories.
# Some specs:
Catalyst -- 5.7014
DBIx::Class -- 0.08012
HTML::FormFu -- 0.03007
# Table Class File:
package MyApp::Schema::Result::Projects;
<snip>
__PACKAGE__->load_components("InflateColumn::DateTime", "TimeStamp",
"Core");
__PACKAGE__->table("projects");
__PACKAGE__->add_columns(
"id", { data_type =3D> "INTEGER", is_nullable =3D> 0, size =3D> undef },
"rel_tag", { data_type =3D> "TEXT", is_nullable =3D> 0, size =3D> undef=
},
<snip>
# project_list_ff.yml
---
auto_fieldset:
legend: Select Project
indicator: submit
elements:
- type: Select
name: project
label: Select Project
model_config:
resultset: Projects
condition:
active: 1
filter: TrimEdges
filter: HTMLEscape
- type: Submit
name: submit
value: Submit
# Controller:
package MyApp::Controller::Projects;
<snip>
sub list : Local :FormConfig('projects/project_list_ff.yml') {
my ( $self, $c ) =3D @_;
my $form =3D $c->stash->{form};
<snip>
$c->stash->{template} =3D 'projects/list.tt2';
}
# EOF
I am not sure how to troubleshoot this, and would appreciate any help.
Thanks!
/dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20090410/b6=
0df8da/attachment.htm
More information about the HTML-FormFu
mailing list