[Catalyst] method to repeatedly submit form

Mesdaq, Ali amesdaq at websense.com
Thu Jul 10 20:39:31 BST 2008

Ok so the flow would be read cvs file (lets assume its submitted by the
user) then you want all validated (whatever that may be) records to
automatically be inserted to that other db then only the records that
were not validated would be presented to the user so they could correct
it or deselect it from being inserted right?

Well I would create a validation method in your controller and not use
FormFu. Call that method for each record and if it fails just push the
record on to an array for presentation to the user. Then when they
resubmit just call that method again for each submitted record and get
rid of the non submitted records.

All validated records should be inserted into db directly if you can but
if you can't have direct access do a post of serialized json data or
name value pairs for each record.

Security Researcher II
Websense Security Labs

-----Original Message-----
From: Dermot [mailto:paikkos at googlemail.com] 
Sent: Thursday, July 10, 2008 12:47 AM
To: The elegant MVC web framework
Subject: Re: [Catalyst] method to repeatedly submit form

2008/7/9 Mesdaq, Ali <amesdaq at websense.com>:
> Just to better understand what your trying to do. Are you saying you
> want to display records and only the records that are selected you
> to be passed to the other db?

Yes in part that correct. However up to that point there wouldn't have
been any validation on the records (there are imported from csv). I
had thought that I should, for each record, open it in a FormFu, do
the validation, if ok send it, if not halt and prompt the user.

Perhaps I should try a different approach, like validating the data at
the import stage. I had thought about using Chain also.

List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive:
Dev site: http://dev.catalyst.perl.org/


 Protected by Websense Messaging Security -- www.websense.com 

More information about the Catalyst mailing list