[Catalyst] HTML::Prototype - extra context in the search

Chisel Wright chisel at herlpacker.co.uk
Tue Nov 15 17:51:21 CET 2005


On Tue, Nov 15, 2005 at 05:38:10PM +0100, Andreas Marienborg wrote:
> that depends on what populates your $c. If it is populated correctly  
> on ajax-requests, you should be able to just use $c where you build  
> your return value for the ajax-request.
> 
> if you use the helpers, I'm not sure where you would pass it in, or  
> how they could be expected to use it.

I have "/campaign/list?client=4" which is handled by ::C::Campaign
This sets $c->stash->{current_client} in auto()

I'm using the Prototype plugin, so I have the following in my template:

---- begin ----
<input autocomplete="off" id="complete_campaign"
name="complete_campaign" type="text" class="search_box" />
<div class="auto_complete" id="complete_campaign_auto_complete" style="text-align: left;"></div>
[% url = base _ 'autocomplete/suggest_campaign' %]
[% c.prototype.auto_complete_field( 'complete_campaign', {
url => url } ) %]
---- begin ----


I have ::C::AutoComplete with my complete_campaign() function.
Adding an auto now, nothing 'useful' is passed in via
$c->req->parameters() - no surprises there.

So, what should be populating my $c?

-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/

No virus was found in this outgoing message as I didn't bother looking.



More information about the Catalyst mailing list