[Catalyst] HTML::Prototype

Andreas Marienborg omega at palle.net
Thu Nov 3 16:18:49 CET 2005


On 3. nov. 2005, at 15.36, Will Smith wrote:

> Thanks for the good movie. i have the sample working fine. But when  
> trying to put a column value to have it autocomplete, it does not  
> quite right. please show me where i am wrong:
>
> ---------------------
>
> sub suggest : Local {
>     my ( $self, $c ) = @_;
>     use mytest::M::CDBI::Cd;
>     my @complete_me = mytest::M::CDBI::Cd->search_like(cdname=>$c- 
> >req->params->{%complete_me%});
>     #my @suggestions;
>     #push @suggestions, "$complete_me"; ----------- this is where I  
> can append another column value?
>     $c->res->output( $c->prototype->auto_complete_result 
> (\@complete_me) );
> }
you need to send it an array of strings, not an array of  
mytest::M::CDBO::Cd objects. Do you see the difference?

map { $_->cdname } @complete_me;

might work

andreas



More information about the Catalyst mailing list