Am 01.04.2009 um 00:50 schrieb Mario Minati:
Hi Moritz,
I like your Controller very much.
Just some questions:
Do you know if it can handle uploads with the Ext ux SwfUpload?
Probably no as the code of handle_uploads suggests.
I have no Idea how SwfUpload works. AFAIK it allows to upload
multiple files. Does it submit the form data as well? If not,
this uploading thing should be an extra controller.
As I did with ImageChooser I would suggest
CatalystX::Controller::ExtJS::SwfUpload
Line 134 is:
$object = $object->$self->config->{default_rs_method};
Is that correct? It looks a bit to perlish, but I'm not sure.
Yes, that line is totally wrong, shold look like:
my $rs = $self->config->{default_rs_method}
$object = $object->$rs;
How do you handle the usual controller logic, do you put it into the
model and
let the update die on problems or do you overwrite the PUT/PUSH
methods?
What kind of logic are we talking about? I put A LOT of logic in the
model.
This helps me with testing and I have currently a daemon process who
needs
to access the model. So I have everything there. Most of the logic is
handled by formfu.
Do you plan to put that module into the formfu repository?
Yes I do. Just wanted to write some more documentation and ask Carl if
I can
upload it there. I'm off until sunday and don't have internet access.
But here is the latest and greatest latest version of this controller.
I fixed the bug you mentioned and dropped the requirement for so many
files.
If one of the put/get/post/list files cannot be found it falls back
to the base file root/forms/???.yml
You are welcome to patch and write on. Or even upload it to the formfu
repo. I already have my bags packed and will leave in a few minutes.
One more thing, there are no tests yet. The module lives currently in my
app's lib directory. So we need a module::install environment or
something.
See you next monday!
cheers,
moritz
Am 01.04.2009 um 00:50 schrieb Mario Minati:
Hi Moritz,
I like your Controller very much.
Just some questions:
Do you know if it can handle uploads with the Ext ux SwfUpload?
Probably no as the code of handle_uploads suggests.
Line 134 is:
$object = $object->$self->config->{default_rs_method};
Is that correct? It looks a bit to perlish, but I'm not sure.
How do you handle the usual controller logic, do you put it into the
model and
let the update die on problems or do you overwrite the PUT/PUSH
methods?
Do you plan to put that module into the formfu repository?
Greets,
Mario Minati
Am Dienstag 31 März 2009 13:13:09 schrieb Moritz Onken:
Hi Mario,
I wrote a Catalyst controller which might be worth looking at for
you.
It handles all kind of REST requests using formfu config files. For
each kind of request there is an extra file.
I added a few bits of documentation to it. It's currently in
development for a new project I'm working on.
My Controllers look currently something like this:
package MyApp::Controller::User;
use strict;
use warnings;
use base 'CatalystX::Controller::ExtJS::REST';
1;
This will create two chained actions: /user and /users, where you can
post,put, delete and get whatever you want.
You can read the documentation I wrote and try it.
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu