I'm using M:FB:M:Plain, so you know it's not a problem with the TT
templates. One thing you have to do (I think) in your driver is
explicitly "use" all of your model classes at the top of your driver.
Then you also have to do:
__PACKAGE__->config->model("Maypole::FormBuilder::Model::Plain");
__PACKAGE__->setup([qw/Model1 Model2 etc/]);
And in my CDBI base class, I have:
use base qw(Class::DBI::mysql Maypole::FormBuilder::Model::Plain);
use Class::DBI::FormBuilder;
use Class::DBI::Plugin::Type;
use Class::DBI::Plugin::AbstractCount;
__PACKAGE__->connection('dsn', 'user', 'pass', { AutoCommit => 1});
__PACKAGE__->autoupdate(1);
But it sounds like your problem may be in Formserver.. what is that
exactly?
On Wed, 2005-10-12 at 17:07 -0700, John Krystynak wrote:
> Is anyone using M::FB:M::Plain?
>
> I'm trying to do that and having trouble adding the additional_data
> method Ron suggests. I get:
>
> Available tables are: ad,category,contact,channel
> at /usr/local/lib/perl5/site_perl/5.8.5/Maypole.pm line 144.
> Use of uninitialized value in bless
> at /home/johnk/IAG/formserver/Formserver.pm line 41.
> Explicit blessing to '' (assuming package main)
> at /home/johnk/IAG/formserver/Formserver.pm line 41.
> file error - favicon.ico: not found
> at /usr/local/lib/perl5/site_perl/5.8.5/Maypole.pm line 123
>
> and all the templates other than frontpage show empty results.
>
> I have to confess I don't really understand what to do with my old
> Formserver::DBI or Formserver::Config classes when using
> FormBuilder::Model::Plain...
>
> Any examples out there?
>
> Thanks,
> johnk
>
>
> On 10/12/05, John Krystynak <[EMAIL PROTECTED]> wrote:
> Works! Thanks.
>
>
> On 10/12/05, Ron McClain <[EMAIL PROTECTED]> wrote:
> I'm doing this in my driver:
>
> __PACKAGE__->config->{view_options}{EVAL_PERL} = 1;
>
> On Wed, 2005-10-12 at 14:54 -0700, John Krystynak
> wrote:
> > Ron,
> >
> >
> > How can I enable Template Toolkit to process [% PERL
> %] statements in
> > Maypole using FormBuilder?
> >
> > I can see templates that don't eval perl in
> them. But if there's an
> > eval perl
> > I get:
> >
> > perl error - EVAL_PERL not set
> >
> > In my httpd.conf I have the following, but it
> doesn't seem to help:
> >
> > PerlModule Apache::Template
> > TT2EvalPerl On
> >
> >
> > Thanks,
> > johnk
> >
> > On 10/6/05, Ron McClain <[EMAIL PROTECTED]>
> wrote:
> > You'll need to add something like this in
> your driver:
> >
> > Sub additional_data {
> > My $r = shift;
> > $r->{template_args}{mclass} = bless {},
> $r->model_class;
> > }
> >
> > The reason being, the templates call moniker
> and
> > plural_moniker on the
> > model class, but if you say [% USE mclass =
> > Class(request.model_class )
> > %], mclass will be wrapped in a proxy class,
> and moniker and
> > plural_moniker will return "proxy".
> >
> >
> > -----Original Message-----
> > From:
> [EMAIL PROTECTED]
> >
> [mailto:[EMAIL PROTECTED] On
> Behalf
> > Of David
> > Baird
> > Sent: Thursday, October 06, 2005 3:54 AM
> > To: [email protected]
> > Subject: Re: [Maypole] FormBuilder and TT
> templates.
> >
> > On 10/6/05, Kieren Diment
> <[EMAIL PROTECTED]> wrote:
> > > Are there any generic TT templates
> available for
> > FormBuilder?
> > > Fishing through the mailing list, it looks
> like Ron McClain
> > made some
> > > at one point, but for now these 404.
> > >
> >
> > There's a set included in the distro. They
> don't get installed
> > anywhere, so you need to fish them out of
> the build directory.
> > Or just
> > download and unpack the distro. They're in
> the templates-tt
> > subdir,
> > and were donated by Ron McClain. They were
> updated quite
> > recently.
> >
> > d.
> >
> >
> >
> -------------------------------------------------------
> > This SF.Net email is sponsored by:
> > Power Architecture Resource Center: Free
> content, downloads,
> > discussions,
> > and more.
> http://solutions.newsforge.com/ibmarch.tmpl
> >
> _______________________________________________
> > Maypole-users mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/maypole-users
> >
> >
> >
> >
> -------------------------------------------------------
> > This SF.Net email is sponsored by:
> > Power Architecture Resource Center: Free
> content, downloads,
> > discussions,
> > and more.
> http://solutions.newsforge.com/ibmarch.tmpl
> >
> _______________________________________________
> > Maypole-users mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/maypole-users
> >
> >
> >
> > --
> > eBay vs Amazon Shopping Comparison - Try it!
> > http://aytozon.com
>
>
>
> --
> eBay vs Amazon Shopping Comparison - Try it!
> http://aytozon.com
>
>
>
> --
> eBay vs Amazon Shopping Comparison - Try it!
> http://aytozon.com
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users