[html-formfu] HTML::FormFu::Dojo
Stefan Stührmann
Stefan.Stuehrmann at end2endmobile.com
Wed Oct 10 13:04:33 GMT 2007
Hi,
Can somebody give me some information to HTML::FormFu::Dojo? Is there a module availible.
I see a link in the Description of HTML::Formfu but no cpan module.
Stefan
-----Ursprüngliche Nachricht-----
Von: html-formfu-request at lists.rawmode.org [mailto:html-formfu-request at lists.rawmode.org]
Gesendet: Mittwoch, 10. Oktober 2007 14:00
An: html-formfu at lists.rawmode.org
Betreff: HTML-FormFu Digest, Vol 6, Issue 6
Send HTML-FormFu mailing list submissions to
html-formfu at lists.rawmode.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
or, via email, send a message with subject or body 'help' to
html-formfu-request at lists.rawmode.org
You can reach the person managing the list at
html-formfu-owner at lists.rawmode.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of HTML-FormFu digest..."
Today's Topics:
1. load_config_file in the middle of YAML (Ruben Fonseca)
2. Re: load_config_file in the middle of YAML (Will Hawes)
3. Re: load_config_file in the middle of YAML (Ruben Fonseca)
4. Re: load_config_file in the middle of YAML (Ruben Fonseca)
5. Automatic constraints from DBIC data types (Zbigniew Lukasiak)
6. Re: load_config_file in the middle of YAML (Jason Kohles)
7. Re: load_config_file in the middle of YAML (Jason Kohles)
----------------------------------------------------------------------
Message: 1
Date: Wed, 10 Oct 2007 12:02:17 +0100
From: Ruben Fonseca <rubenfonseca at di.uminho.pt>
Subject: [html-formfu] load_config_file in the middle of YAML
To: Rendering and Validation Framework HTML Form Creation
<html-formfu at lists.scsys.co.uk>
Message-ID: <9DACE1EC-F295-4CBB-B219-9C23544916D2 at di.uminho.pt>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
Hi!
I'm trying to use the load_config_file in the middle of a YAML specification to load some common form widgets from another file, but so far I've been unsuccessful.
Imagine this YAML:
---
action: /foo
elements:
- type: Text
...
- load_config_file: /foo/file
- type: Submit
...
And on /foo/file I have:
---
elements:
- type: Text
...
This generates an error "an't locate object method "elements" via package "HTML::FormFu::Element::Text" at /opt/local/lib/perl5/ site_perl/5.8.8/HTML/FormFu/ObjectUtil.pm line 264", so I'm certain I did something wrong.
Can you tell me the proper way to do this please?
thank you!
Ruben
------------------------------
Message: 2
Date: Wed, 10 Oct 2007 12:11:49 +0100
From: "Will Hawes" <wdhawes at gmail.com>
Subject: Re: [html-formfu] load_config_file in the middle of YAML
To: "HTML Form Creation, Rendering and Validation Framework"
<html-formfu at lists.scsys.co.uk>
Message-ID:
<360eac500710100411r49728251l57865a14df999b35 at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
On 10/10/2007, Ruben Fonseca <rubenfonseca at di.uminho.pt> wrote:
>
> Hi!
>
> I'm trying to use the load_config_file in the middle of a YAML
> specification to load some common form widgets from another file, but
> so far I've been unsuccessful.
>
> Imagine this YAML:
> ---
> action: /foo
>
> elements:
> - type: Text
> ...
>
> - load_config_file: /foo/file
>
> - type: Submit
> ...
>
>
> And on /foo/file I have:
> ---
> elements:
> - type: Text
> ...
>
>
> This generates an error "an't locate object method "elements" via
> package "HTML::FormFu::Element::Text" at /opt/local/lib/perl5/
> site_perl/5.8.8/HTML/FormFu/ObjectUtil.pm line 264", so I'm certain I
> did something wrong.
>
> Can you tell me the proper way to do this please?
load_config_file is a method of HTML::FormFu. As such I would only anticipate it working as a top level item in a YAML file.
If you have a look at HTML::FormFu::Manual::Cookbook (currently only in SVN), there is an example of how to do this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20071010/16=
1fadb5/attachment.html
------------------------------
Message: 3
Date: Wed, 10 Oct 2007 12:44:37 +0100
From: Ruben Fonseca <rubenfonseca at di.uminho.pt>
Subject: Re: [html-formfu] load_config_file in the middle of YAML
To: "HTML Form Creation, Rendering and Validation Framework"
<html-formfu at lists.rawmode.org>
Cc: "HTML Form Creation, Rendering and Validation Framework"
<html-formfu at lists.scsys.co.uk>
Message-ID: <C7047ADE-AB01-4CCB-A718-9B2ACCA483E6 at di.uminho.pt>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On 2007/10/10, at 12:11, Will Hawes wrote:
> Can you tell me the proper way to do this please?
>
> load_config_file is a method of HTML::FormFu. As such I would only
> anticipate it working as a top level item in a YAML file.
Oh god I'm screwed. I looked at the Cookbook (thanks!) and it seems that I can't include files in the *middle* of a YAML specification...
>
> If you have a look at HTML::FormFu::Manual::Cookbook (currently
> only in SVN), there is an example of how to do this.
Since after the load_config_file I only have the submit button I have
two options:
* move the submit button to an external file and load_config_file it
* create it using Perl after loading my form
Anyway, thank you!
Ruben
------------------------------
Message: 4
Date: Wed, 10 Oct 2007 12:44:37 +0100
From: Ruben Fonseca <rubenfonseca at di.uminho.pt>
Subject: Re: [html-formfu] load_config_file in the middle of YAML
To: "HTML Form Creation, Rendering and Validation Framework"
<html-formfu at lists.rawmode.org>
Cc: "HTML Form Creation, Rendering and Validation Framework"
<html-formfu at lists.scsys.co.uk>
Message-ID: <C7047ADE-AB01-4CCB-A718-9B2ACCA483E6 at di.uminho.pt>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On 2007/10/10, at 12:11, Will Hawes wrote:
> Can you tell me the proper way to do this please?
>
> load_config_file is a method of HTML::FormFu. As such I would only
> anticipate it working as a top level item in a YAML file.
Oh god I'm screwed. I looked at the Cookbook (thanks!) and it seems
that I can't include files in the *middle* of a YAML specification...
>
> If you have a look at HTML::FormFu::Manual::Cookbook (currently
> only in SVN), there is an example of how to do this.
Since after the load_config_file I only have the submit button I have
two options:
* move the submit button to an external file and load_config_file it
* create it using Perl after loading my form
Anyway, thank you!
Ruben
------------------------------
Message: 5
Date: Wed, 10 Oct 2007 11:46:25 +0000
From: "Zbigniew Lukasiak" <zzbbyy at gmail.com>
Subject: [html-formfu] Automatic constraints from DBIC data types
To: "HTML Form Creation, Rendering and Validation Framework"
<html-formfu at lists.rawmode.org>
Message-ID:
<d36a60910710100446q5df27ac9jad804f55bbacffb8 at mail.gmail.com>
Content-Type: text/plain; charset=UTF-8
Hi there,
I can start work on the DBIC constraints - but I am still hesitating
about the api. I've started with a subroutine that works similarly to
the other HTML::FormFu::DBIC subs:
constraints_from_dbic( $dbic, $form );
It would just scan all form fields and add the constraints from the
$dbic row. The problem I see is with configuration - since normal
constraints are added from the yaml config like:
elements:
- type: Text
name: foo
constraints:
- type: Length
min: 8
So this would be a bit different. We could also have something like:
elements:
- type: Text
name: foo
constraints:
- type: Length
min: 8
- type: From_DBIC
dbic_field: foofoo
But then when converting from a vanilla FormFu to FormFu::DBIC you
would have to edit the whole yaml config.
Hmm. Which one do you prefer? Any other api ideas?
Cheers,
Zbyszek
http://perlalchemy.blogspot.com/
------------------------------
Message: 6
Date: Wed, 10 Oct 2007 07:57:36 -0400
From: Jason Kohles <email at jasonkohles.com>
Subject: Re: [html-formfu] load_config_file in the middle of YAML
To: "HTML Form Creation, Rendering and Validation Framework"
<html-formfu at lists.rawmode.org>
Cc: Rendering and Validation Framework HTML Form Creation
<html-formfu at lists.scsys.co.uk>
Message-ID: <B3B58283-76A9-46BC-9EDE-154C25AE2290 at jasonkohles.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On Oct 10, 2007, at 7:02 AM, Ruben Fonseca wrote:
> Hi!
>
> I'm trying to use the load_config_file in the middle of a YAML
> specification to load some common form widgets from another file,
> but so far I've been unsuccessful.
>
When you use load_config_file, it inserts the contents of the loaded
configuration file at the same level where the call was, so what you
are doing ends up getting parsed something like this:
---
action: /foo
elements:
- type: Text
- elements:
- type: Text
- type: Submit
If /foo/file just contains the elements that you want inserted at
that point, then you can take out the elements:, move everything else
up a level and do it like this:
---
action: /foo
elements:
- type: TExt
- load_config_file: /foo/file
- type: Submit
---
- type: Text
>
> This generates an error "an't locate object method "elements" via
> package "HTML::FormFu::Element::Text" at /opt/local/lib/perl5/
> site_perl/5.8.8/HTML/FormFu/ObjectUtil.pm line 264", so I'm certain
> I did something wrong.
>
> Can you tell me the proper way to do this please?
>
> thank you!
> Ruben
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.rawmode.org
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
--
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing." -- Voltaire
------------------------------
Message: 7
Date: Wed, 10 Oct 2007 07:57:36 -0400
From: Jason Kohles <email at jasonkohles.com>
Subject: Re: [html-formfu] load_config_file in the middle of YAML
To: "HTML Form Creation, Rendering and Validation Framework"
<html-formfu at lists.rawmode.org>
Cc: Rendering and Validation Framework HTML Form Creation
<html-formfu at lists.scsys.co.uk>
Message-ID: <B3B58283-76A9-46BC-9EDE-154C25AE2290 at jasonkohles.com>
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
On Oct 10, 2007, at 7:02 AM, Ruben Fonseca wrote:
> Hi!
>
> I'm trying to use the load_config_file in the middle of a YAML
> specification to load some common form widgets from another file,
> but so far I've been unsuccessful.
>
When you use load_config_file, it inserts the contents of the loaded
configuration file at the same level where the call was, so what you
are doing ends up getting parsed something like this:
---
action: /foo
elements:
- type: Text
- elements:
- type: Text
- type: Submit
If /foo/file just contains the elements that you want inserted at
that point, then you can take out the elements:, move everything else
up a level and do it like this:
---
action: /foo
elements:
- type: TExt
- load_config_file: /foo/file
- type: Submit
---
- type: Text
>
> This generates an error "an't locate object method "elements" via
> package "HTML::FormFu::Element::Text" at /opt/local/lib/perl5/
> site_perl/5.8.8/HTML/FormFu/ObjectUtil.pm line 264", so I'm certain
> I did something wrong.
>
> Can you tell me the proper way to do this please?
>
> thank you!
> Ruben
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.rawmode.org
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
--
Jason Kohles
email at jasonkohles.com
http://www.jasonkohles.com/
"A witty saying proves nothing." -- Voltaire
------------------------------
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu at lists.rawmode.org
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
End of HTML-FormFu Digest, Vol 6, Issue 6
*****************************************
More information about the HTML-FormFu
mailing list