[Catalyst] Forms and Plugins and Tutorials, oh my!!
Fellow Catalyst Enthusiasts, The more I see of Catalyst the more I'm liking it. I just started taking it for a spin a week or so ago. After just finishing the HTML::Widget plugin portion of the Catalyst tutorial yesterday I saw the post announcing the FormBuilder plugin. Both look very promising. There are a couple of features I'd love to see available in one form library or another. I searched through the vast asortment of available Catalyst plugins and didn't see what I was looking for. So I thought it might be best to ask if any of the current plugins provide such functionality. If none do perhaps someone will see this post and think, Hay, that would really be helpful. I think I'll enhance my plugin. Are there currently any form libraries that integrate a WYSIWYG style HTML editor such as the FCKEditor? Does any of the available form libraries have the ability to set the focus to a particular field? I have a simple bit of JavaScript that combined with a body onLoad=FieldFocus() will set the focus to the first form field on a page if the page contains a form, but it would be nice to have such functionality built into a form library. For some reason my JavaScript doesn't appear to work with HTML::Widget generated forms. I haven't tried it with FormBuilder generated forms yet. Does any available form library implement input mask type functionality? Okay, I'll admit it - I'm a fan of old-fashioned text based data entry apps. When entering a date, for example, I much prefer to be able to enter something like 02132006 into a text field and have the application automatically add the separator characters transforming it to 02/13/2006. I absolutely hate drop-down boxes on html forms for date entry. Input mask type functionality is also helpful for such things as social security numbers, phone numbers, etc. Does any available form library implement an autotab feature? Extending the example above it would be nice to have the cursor automatically skip to the next field after entering the last digit of a date in a date field. And now I have a couple of image plugin related questions. Are there any Catalyst plugins to help deal with uploaded images? I'm looking for something along the lines of: 1. Generate a random name to avoid duplicate filename conflicts and move the uploaded image to an image directory. 2. Generate a thumbnail for the image. 3. Store the needed image path and size info in a database. 4. Helper functions to spit out an appropriate image tag in a template for images in the database. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Minor Problem With Tutorial
Kennedy, On Mon, Aug 14, 2006 at 04:24:56PM -0400, [EMAIL PROTECTED] wrote: It has to do with how cpan.org auto-indexes everything. Unfortunately, the code guys did such a good job that this has been sitting in trunk for a while waiting to be released... :-) Maybe they will find a bug and release 5.7002 soon. :-) I was a little annoyed by the tutorial's link problem at first but after I found the link to the individual pod files I had no problem creating a local copy via pod2html. I'm very impressed with the tutorial. It covers alot of ground. I'm only about half way through it so far. Thanks to my local copy I was able to figure out the proper links to the individual sections of the online version. For those that haven't figured it out yet: http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7001/lib/Catalyst/Manual/Tutorial/Intro.pod will get you to the Intro section, and the links to the other sections of the tutorial work from that page. Re the forward issue... I would need to take a closer look to comment. Let me know if you are still having problems and we can figure it out. The tutorial at the above link doesn't appear to have the problem. I'm just digging into Catalyst but thanks to the very helpful replies I received to my initial post I think I understand the root of the problem. So, I'll take a stab at summarizing it and hopefully someone will jump in and correct me if I completely smeg up the summary. The latest version of the Catalyst Basics tutorial at: http://dev.catalyst.perl.org/repos/Catalyst/trunk/Catalyst-Runtime/lib/Catalyst/Manual/Tutorial/CatalystBasics.pod has a USING THE DEFAULT TEMPLATE NAME section in which the user is instructed to remove the: $c-stash-{template} = 'books/list.tt2'; statement from the Books controller's list method. In the next section of the tutorial a simple delete method is added. After it deletes a book it tries to redirect the user to the list method via: $c-forward('list'); Which executes the list method in the Books controller, then returns to the delete method and falls through to the various end methods and eventually the DefaultEnd or RenderView method gets executed. So, if a template hasn't been explicitly set the template name defaults to books/delete.tt2, not the books/list.tt2. There might be more than one solution to the problem. One could add the: $c-stash-{template} = 'books/list.tt2'; statement back to the Books controller's list method or perhaps could set the template name in the delete method. Right around the point in the tutorial where the delete method is added might be a good place to discuss when/where using the default template name won't work. Someone suggested using $c-detach('list') instead of $c-forward('list'). I tried that. When using $c-detach('list') from the delete method the template name still appears to default to books/delete.tt2. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
[Catalyst] Minor Problem With Tutorial
Fellow Catalyst Enthusiasts, I'm exploring the wonderful world of Catalyst and trying to work my way through the tutorial which should be at: http://search.cpan.org/~mramberg/Catalyst-Runtime-5.7001/lib/Catalyst/Manual/Tutorial.pod For some reason all that appears to be on that page is an outline of the tutorial. The links that should point to the individual sections of the tutorial don't go anywhere. But, I found a link at the bottom of the page where I was able to download the pod files and generate a local copy of the tutorial on my test box. Anyway, I'm at the end of the BasicCRUD section of the tutorial where one creates the Books::Delete method. The last line in the method is: $c-forward('list'); Catalyst appears to be ignoring this statement. When I tried to delete a book I got: Coldn't render template file error - books/delete.tt2: not found So, I tried creating an empty books/delete.tt2 template to see if Catalyst just wanted to find a template file matching the method it was in before performing the redirect. It then displayed the blank page instead of redirecting to the list method. I'm sure there is something simple I overlooked. Anybody have any suggestions of what I might check? I'm running Catalyst 5.7001 on a FreeBSD 6.1 box. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/
Re: [Catalyst] Minor Problem With Tutorial
Nilson, On Mon, Aug 14, 2006 at 03:57:25PM -0300, Nilson Santos Figueiredo Junior wrote: In order to achieve the desired behaviour you could either issue a redirect response (through $c-response-redirect($uri) ) or explicitely set the desired template filename. You hit the nail right on the head. In the USING THE DEFAULT TEMPLATE NAME section of the CatalystBasics tutorial the tutorial author has one remove the template name from the list method. I either missed step in the tutorial where it was added back to the list method or there is a minor bug in the tutorial. I was receiving the error because the template name wasn't explicitly set in the list method. I'll nit-pick through the tutorial again and see if I missed a step. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. ___ List: Catalyst@lists.rawmode.org Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/ Dev site: http://dev.catalyst.perl.org/