Re: [cgiapp] CAP::AutoRunmode forwarding problem

2007-01-26 Thread RA Jones
RA Jones wrote: An app. I was developing some time ago seems to have stopped working properly. The problem seems to involve methods in a CAP::AR delegate class, which run correctly except when I try to forward to another sub-routine. I'm still stuck with an ugly fix on this one. I don't

[cgiapp] CAP::AutoRunmode forwarding problem

2007-01-23 Thread RA Jones
An app. I was developing some time ago seems to have stopped working properly. The problem seems to involve methods in a CAP::AR delegate class, which run correctly except when I try to forward to another sub-routine. Let me illustrate: package MyApp::Runmodes; use strict; sub runmode_1 {

Re: [cgiapp] Test 2 - is this thing on?

2006-11-09 Thread RA Jones
Jonathan Mangin wrote: First drop-down: select onBlur=populate_clinicians(['src_id'], ['clin_list']); return true; name=src_id id=src_id option value=nbsp;/option .. /select Looks like all the examples of using CGI::Ajax I've seen. Is populate_clinicians doing a db lookup? If so, isn't that

Re: [cgiapp] Test 2 - is this thing on?

2006-11-09 Thread RA Jones
Michael Peters wrote: I'm not sure I completely understand what you're looking for here, but if you want an Ajax call to submit back to the same url you're page is coming from, then window.location will contain that. The problem does not arise with CGI::AJAX as it is mostly Perl-driven and I

Re: [cgiapp] Test 2 - is this thing on?

2006-11-09 Thread RA Jones
Michael Peters wrote: wrap that bit into a function that you have in a .js file. Something like function do_cool_stuff(url) $('#bad_nhsno').load( url, { # = using TT2 'INTERPOLATE' function etc, } ); And then in your template when you want to use it, do this:

Re: [cgiapp] Test 2 - is this thing on?

2006-11-08 Thread RA Jones
[EMAIL PROTECTED] wrote: Is this list still active, or has my workplace started to filter this... Well, I could throw in a couple of (slightly off-topic) AJAX questions if anyone cares to field them, or have we had enough of that topic recently? -- Richard Jones Leeds, UK mailto:[EMAIL

Re: [cgiapp] Test 2 - is this thing on?

2006-11-08 Thread RA Jones
Ron Savage wrote: On Wed, 08 Nov 2006 20:43:36 +, RA Jones wrote: Hi Well, I could throw in a couple of (slightly off-topic) AJAX questions if anyone cares to field them, or have we had enough of that topic recently? Throw them in (aka I'm bored...)! That's what I wanted to hear

Re: [cgiapp] Re: CGI::App CGI:Ajax nearly working - please help with last bit

2006-10-24 Thread RA Jones
David Scott wrote: RA, Please summarize your function so we can all benefit. David, With pleasure. The validation function is part of a much larger clinical information system, and validates the UK National Health Service number, which is a 10-digit unique patient identifier with a

Re: [cgiapp] Re: CGI::App CGI:Ajax nearly working - please help with last bit

2006-10-23 Thread RA Jones
Michael Peters wrote: Not to add too much to your plate, but you'll also need to use a browser that has decent debugging tools. I prefer firefox, but some people pay for visual studio and use IE. With Firefox, my Ajax debugging goes something like this: If it's not doing anything, then open up

Re: [cgiapp] CGI::App CGI:Ajax nearly working - please help with last bit

2006-10-22 Thread RA Jones
Ron Savage wrote: I've just read some of the JQuery docs, and I'd say it's a clever package, but with an unusual syntax. And since you've not comfortable with Javascript yet, I don't see the point /for a beginner in this field/ to try producing production-quality code while learning

Re: [cgiapp] CGI::App CGI:Ajax nearly working - please help with last bit

2006-10-21 Thread RA Jones
Bruce McKenzie wrote: Your corresponding javascript func must send the string to some target div or else handle it with another function (a callback) that will manipulate it further. I know, I didn't show all the code as I thought it would make the message unnecessarily long. The

Re: [cgiapp] CGI::App CGI:Ajax nearly working - please help with last bit

2006-10-21 Thread RA Jones
Bruce McKenzie wrote: with the tiny (~15k) jQuery library loaded, all the javascript you would have to write would be something like this (assuming you use rm=runmode in CGIApp) function validateNHSOwithAjax(myInput){ $('#someHTMLContainer').load( 'myWebApp.cgi', { rm : 'validate_nhso',

Re: [cgiapp] CGI::App CGI:Ajax nearly working - please help with last bit

2006-10-21 Thread RA Jones
Jonathan Mangin wrote: Well, just to finish the story... I needed to register the subs this way. They also need to be defined as run_modes in setup. my $activity_url = 'fitness.pl?rm=getActivity'; my $daily_url = 'fitness.pl?rm=dispDaily'; my $pjx = new CGI::Ajax('getActivity' =

Re: [cgiapp] Using AJAX with C::A

2006-10-20 Thread RA Jones
Cees Hek wrote: I did a talk on AJAX and perl at YAPC Chicago [1] this year. The slides for most of the talks are online [2], and I added links to my slides [3] and source code [4]. Hi Cees, thanks I have downloaded the source code and am working my way through the files. I cannot see any

Re: [cgiapp] Using AJAX with C::A

2006-10-19 Thread RA Jones
Michael Peters wrote: IMO, saying you want to learn AJAX without learning JS is like saying you want to learn web programming without learning HTML and HTTP. Sure there are probably frameworks out there that will hide those details from you, but sooner or later you're gonna have to get your

Re: [cgiapp] Using AJAX with C::A

2006-10-19 Thread RA Jones
Michael Peters wrote: After the client receives the info from the server it needs to process it. Using the same cases above: A) JS usually takes that partial document and injects it into the current page (in prototype this is done with Element.update). B) Parse the XML and 1 - extra data

[cgiapp] Don't understand ValidateRM behaviour

2006-10-04 Thread RA Jones
Am using CAP::ValidateRM to handle web-form validation, and all works as expected - if missing or invalid fields, return $obj-dfv_error_page() without updating database, otherwise update database and $obj-forward('desired_runmode'). But now the client wants the database to be updated with fields

Re: [cgiapp] Don't understand ValidateRM behaviour

2006-10-04 Thread RA Jones
Michael Peters wrote: RA Jones wrote: Presumably changing all rm's to the current rm is the intended behaviour of ValidateRM / HTML::FillInForm, but is there anything I can do to modify this so it works the way I desire, or is it not possible? Hope it all makes sense. Well, HTML::FillInForm

[cgiapp] Accepting 3rd party sessions and CAP::Session

2006-06-16 Thread RA Jones
Hi group, My current app under development needs to accept a session id from a referring (non-CGI:App) application, which uses the same 32-digit construct (MD5) as used by CGI::Session. The session identifier is passed in the url, so can be captured by the new application as part of the

Re: [cgiapp] Accepting 3rd party sessions and CAP::Session

2006-06-16 Thread RA Jones
Cees Hek wrote: On 6/16/06, RA Jones [EMAIL PROTECTED] wrote: Presumably this is not the correct way to handle new session id generation in CGI::Session. Is it even possible to force CGI::Session to use a pre-defined session id string in the first place? If CGI::Session can not load a session

Re: [cgiapp] Upload meter plugin/tutorial?

2006-05-02 Thread RA Jones
Barry Hoggard wrote: I'm getting ready to add an upload meter to some CGI::Application-based applications, running under mod_perl (1.x). Is there a plugin I've missed, or a tutorial somewhere I could use? Otherwise I'll just adapt something from one of the CPAN modules. I think Cees is

Re: [cgiapp] session no default expiration = no deletion ?

2006-04-13 Thread RA Jones
Cees Hek wrote: CGI::Session-find( sub {} ); I believe that function will load up and decode every session in the store to check it's expiry time. It is really inefficient for large numbers of sessions. That is why the 'find' command is much better for files, and that is why I use the

Re: [cgiapp] How to split runmodes into different modules

2006-04-03 Thread RA Jones
Michael Peters wrote: Even the most complicated auth setup can be done in Apache using mod_perl Authz and Authen handlers. Even though it's running at the apache level, it's still a part of your application since it's connecting to your database and has your business logic. It's just done

Re: [cgiapp] CAP::Authentication cookies

2006-03-29 Thread RA Jones
Michael Graham wrote: But even before all that, I have to fix a bug in LinkIntegrity which is currently preventing it from...um...actually working. Film at 11. That is the one which generates 'Access Denied' on initial access to the application? I haven't got past that one yet and am running

Re: [cgiapp] CAP::Authentication cookies

2006-03-28 Thread RA Jones
Ron Savage wrote: On Mon, 27 Mar 2006 23:47:17 +0100, RA Jones wrote: I just re-read the CAP::Authentication docs, under 'Choosing a Store', and I think at least one of us is confused :-). Here's how I see it: A glimmer of hope then! o User submits credentials o Server logs user in, puts flag

Re: [cgiapp] CAP::Authentication cookies

2006-03-28 Thread RA Jones
Thanks Michael that's just the sort of information I was hoping for. Ron partly answered in an earlier post which I hadn't noticed when I posed my question. I do use occasional static pages but they are delivered via templates through the app so I can still use session stuff. -- Richard Jones

[cgiapp] CAP::Authentication cookies

2006-03-27 Thread RA Jones
Hi group, I've run into an unforeseen problem with the above combination. All worked fine under development on my system, but transferring to production for the final test session highlighted the following - if the user disables cookies then session maintenance fails even when using session

Re: [cgiapp] CAP::Authentication cookies

2006-03-27 Thread RA Jones
Ron Savage wrote: On Mon, 27 Mar 2006 20:38:22 +0100, RA Jones wrote: Hi RA is always required irrespective of store method? Is there any way round this save the horrible kludge of passing the parameter as an embedded hidden form field or tacked onto the end of clickable links? Aren't you

[cgiapp] CAP::AutoRunmode::FileDelegate

2006-01-21 Thread RA Jones
It seems a bit quiet here at the moment. I could do with some help with CAP::AutoRunmode::FileDelegate - basically I cannot get it to work using the documentation as provided. Depending on how I configure the system I get one of the following: All runmodes including start rm into ./runmodes

Re: [cgiapp] CAP::AutoRunmode::FileDelegate

2006-01-21 Thread RA Jones
Jesse Erlbaum wrote: Hi Richard -- I can't help you with that error, but out of curiosity: Why did you choose ::FileDelegate? Perhaps a more pointed version of the same question: Why did you choose to use ::FileDeletegate instead of a more fully thought-out server page system like Mason?

Re: [cgiapp] CGI::Session::ID::md5-generate_id data collision

2006-01-11 Thread RA Jones
On Tue, 10 Jan 2006, Michael Graham [EMAIL PROTECTED] wrote: I don't think there is an easy way for you to override generate_id() in a way that will trick FormState into using a different value for its ids. The sensible thing to do is to patch CAP::FormState to use sequential ids. OK some

Re: [cgiapp] CGI::Session::ID::md5-generate_id data collision

2006-01-10 Thread RA Jones
On Mon, 9 Jan 2006, Michael Graham [EMAIL PROTECTED] wrote: One point to remember is that these form state ids are specific to a particular user session. So any potential collision would have to be with an existing state for the *same* user. For this reason, tampering is less of an issue as

[cgiapp] CGI::Session::ID::md5-generate_id data collision

2006-01-09 Thread RA Jones
Hello group, I'm using CAP::FormState to protect hidden form fields. Everything appears to work OK, but I notice a large amount of information build-up in the a_session field of the sessions table (also using CGI::Session with MySQL for authentication). In particular there is a large

[cgiapp] Data::FormValidator valid HTML

2006-01-05 Thread RA Jones
Hi group, What is the best way to use DFV (via CAP::ValidateRM) with drop-down menus which have default as blank? To elaborate with an example - field entry 'last_name' is required by check_rm(), so an empty submission should trigger an error, and does. But the problem is to satisfy HTML

Re: [cgiapp] Data::FormValidator valid HTML

2006-01-05 Thread RA Jones
On Thu, 5 Jan 2006, Cees Hek [EMAIL PROTECTED] wrote: On 1/5/06, RA Jones [EMAIL PROTECTED] wrote: To elaborate with an example - field entry 'last_name' is required by check_rm(), so an empty submission should trigger an error, and does. But the problem is to satisfy HTML validation I have

Re: [cgiapp] CAP::DebugScreen and ErrorDocument

2005-12-25 Thread RA Jones
On Sun, 25 Dec 2005, Ron Savage [EMAIL PROTECTED] wrote: Sorry, no. But then, I don't ever have to debug my code... Hohohohoho. Well aren't you the lucky one! For me it's more often a case of decoding my bugs ;-) Hope everyone is, has or will enjoy the days festivities (if you celebrate

Re: [cgiapp] CAP::DebugScreen and ErrorDocument

2005-12-24 Thread RA Jones
On Thu, 22 Dec 2005, Michael Peters [EMAIL PROTECTED] wrote: I decided to play with CAP::DebugScreen (since it uses my CAP::ViewCode and I was interested to see what someone is doing with my stuff :) and I have to say that I like it. It's fairly simple and really easy for tracking down fatal

Re: [cgiapp] Re: CAP::DebugScreen and ErrorDocument

2005-12-24 Thread RA Jones
On Sat, 24 Dec 2005, Mark Stosberg [EMAIL PROTECTED] wrote: On 2005-12-24, Cees Hek [EMAIL PROTECTED] wrote: I ignored the test failure and installed anyway. However, the author should be notified I guess... Done: http://rt.cpan.org/NoAuth/Bug.html?id=16727 Still having problems with

Re: [cgiapp] Re: CAP::DebugScreen and ErrorDocument

2005-12-24 Thread RA Jones
On Sat, 24 Dec 2005, Mark Stosberg [EMAIL PROTECTED] wrote: You should get the 500 error for compile time issues, but the DebugScreen for run time issues. That part works for me. I know, but it's definitely giving the default 500 error page both run-time as well as of course compile-time

[cgiapp] Number of rm's best practice (more)

2005-12-18 Thread RA Jones
Reading the thread on 'Good practices: how many run modes in an app' it is obvious my current application under development is going way over the 'recommended' upper limit of rm's. I know I need to break it into smaller units based around functionality, but how? At the moment my main

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread RA Jones
On Sun, 18 Dec 2005, Jeff MacDonald [EMAIL PROTECTED] wrote: I'm at about the same stage of figuring things out as you are, I'd recommend looking into C::A::P::Dispatch, it can basically parse your query string, to know which module handles which runmode, combine that with AutoRunmodes and you

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread RA Jones
On Sun, 18 Dec 2005, Rhesa Rozendaal [EMAIL PROTECTED] wrote: Here's a sketch of my app structure as it is now. I show two parts, the main, formerly monolithic CgiApp, and one package with a set of run modes. package My::MainApp; use base qw/My::BaseApp/; # I already have this one; it

Re: [cgiapp] Number of rm's best practice (more)

2005-12-18 Thread RA Jones
Hi Jesse, On Sun, 18 Dec 2005, Jesse Erlbaum [EMAIL PROTECTED] wrote: [lots of useful remarks] HTH, Yes it does - but only to muddy the already murky waters ;-) It is a counter argument to the one that suggests the fewer the better. Actually I've no real preference as yet, other than to

[cgiapp] CAP::Authentication cookie problem

2005-11-23 Thread RA Jones
In trying to improve my authentication routines I've switched from CAP::Session to CAP::Authentication. Running the sample file in CAP::Auth works well, provided I change the package name to match MyLogin-authen. But when run from my own application in cgiapp_init() I get the following when

[cgiapp] AnyTemplate multi-configs mod_perl

2005-11-05 Thread RA Jones
Hi group, I have a problem with AnyTemplate's Multiple Named Template Configurations under a mod_perl environment. Following the convention in AnyTemplate POD, I have the following in cgiapp_init(): $obj-template('no_wrapper')-config( # for templates not requiring wrapper type =

Re: [cgiapp] RFC: synopsis for CGI::App book

2005-09-09 Thread RA Jones
On Thu, 8 Sep 2005, Jaclyn Whitehorn [EMAIL PROTECTED] wrote: While there is such a thing as over-simplifying, I really don't see why TT can't be covered in a page or two. I personally think that the book should primarily use HTML::Template, since it's (1) integrated, and (2) EASY. At some

[cgiapp] C:A and mod_perl2

2005-07-27 Thread RA Jones
I have successfully setup my CGI::Applications so that a single app module can be run under 3 different environments - mod_cgi instance script, ModPerl::Registry and an Apache PerlResponseHandler, under both Linux and WinXP OS's on a dual-boot development system. Firstly, is there any

Re: [cgiapp] CAP-AnyTemplate mod_perl

2005-07-19 Thread RA Jones
On Mon, 18 Jul 2005, Michael Graham [EMAIL PROTECTED] wrote: Trying to get CA plus some plugins working under mod_perl. CAP-AnyTemplate (v0.07) works fine as part of regular cgi script, but when run under mod_perl: $self-template-config( Configs-AT_CONFIG, ); Do you put the

[cgiapp] CAP-AnyTemplate mod_perl

2005-07-18 Thread RA Jones
Trying to get CA plus some plugins working under mod_perl. CAP-AnyTemplate (v0.07) works fine as part of regular cgi script, but when run under mod_perl: Error executing run mode 'login': HTML::Template-new() : Cannot open included file login.html : file not found. at

Re: [cgiapp] CAP-AnyTemplate mod_perl

2005-07-18 Thread RA Jones
On Mon, 18 Jul 2005, Michael Graham [EMAIL PROTECTED] wrote: Hi Ron, Trying to get CA plus some plugins working under mod_perl. CAP-AnyTemplate (v0.07) works fine as part of regular cgi script, but when run under mod_perl: $self-template-config( Configs-AT_CONFIG, ); Do you put the

Re: [cgiapp] Template and interpolation

2005-04-24 Thread RA Jones
On Fri, 22 Apr 2005, Michael Peters [EMAIL PROTECTED] wrote: RA Jones wrote: [..] Many, many people have used TT and C::A under mod_perl, and statistically, some of them were probably using windows. I don't think it's that combination. To figure it out, you might have to get your hands dirty

Re: [cgiapp] Template and interpolation

2005-04-24 Thread RA Jones
On Fri, 22 Apr 2005, Cees Hek [EMAIL PROTECTED] wrote: [..] Are you using the experimental XS Stash module with TT? See Template/Config.pm to see if you are, and if so, try the pure perl one instead. To use the pure perl stash, just edit Template/Config.pm and change the following line: $STASH

[cgiapp] Template and interpolation

2005-04-22 Thread RA Jones
I know it's been quiet on the CA list recently. So a Q to liven it up. This one was originally posted on the Templates mailing list but got no takers so I want to try again here (I only use TT via CA so it's sort-of relevant). It concerns the Perl interpolate bug, but at a much smaller file

Re: [cgiapp] Template and interpolation

2005-04-22 Thread RA Jones
that. And the strange thing is it only happens when running under mod_perl (Registry or PerlRun), never as a native CGI application. Does anyone successfully run CA with TT under mod_perl? Maybe it's a Windows thing? I don't have access to mod_perl/Apache on a UNIX system (yet). On Fri, 22 Apr 2005, RA Jones

Re: [cgiapp] Found the problem with ValidateRM Template

2005-04-13 Thread RA Jones
On Wed, 13 Apr 2005, Emanuele Zeppieri [EMAIL PROTECTED] wrote: -Original Message- [...] The reason for this is in the nature of $return_page. For H::T-generated templates it is scalar data (ie the complete HTML return page), but for Template-generated templates it prints out as

[cgiapp] Found the problem with ValidateRM Template

2005-04-12 Thread RA Jones
As mentioned before, I could not get ValidateRM working with Template.pm's templates within CGI::Application. I can now. I narrowed the problem down to the check_rm() sub in ValidateRM, and I know that $err_page is returning empty, so is not triggering the error page for Template-generated

[cgiapp] Fatal error after query() becomes undefined?

2005-04-03 Thread RA Jones
Hello mailing list, I am new to both mailing list and OOP. With a little help from Cees Hek I have managed to get a working web application where I can login, display a default page and (almost) logout again (see below). I'm using Template Toolkit and CGI::FormBuilder to manage my html. But now

Re: [cgiapp] Fatal error after query() becomes undefined?

2005-04-03 Thread RA Jones
On Sun, 3 Apr 2005, Cees Hek [EMAIL PROTECTED] wrote: On Apr 3, 2005 3:45 PM, RA Jones [EMAIL PROTECTED] wrote: sub logout { # called via link from web-page: my $self = shift; $self-session-delete(); # delete session $self-tt_params( username = undef ); # delete UserID param