[Catalyst] FormBuilder: HOWTO make a particular OPTION disabled in a SELECT form?

2010-06-12 Thread w...@serensoft.com
Catalyst (and Chaining in particular) is really, really sweet! Enjoying the exploration immensely. So here's our next puzzle: Objective: to DISABLE some of the s in a field. $teams = [ map { [ $_->id, $_->name ] } @teams ]; $form->field( name=>

Re: [Catalyst] HOWTO: order_by a field in a related record, for paging

2010-06-12 Thread w...@serensoft.com
Ah, after adding "join => 'team'" (and tweaking fields to distinguish me.* items) that did the trick, thanks! $team_ids = [ map { "me.team" => $_ } @id_list ]; my $users = $c->model('My::User') ->search_rs( $team_ids, { join => 'team', order_

Re: [Catalyst] HOWTO: order_by a field in a related record, for paging

2010-06-12 Thread Octavian Rasnita
From: > $c->model()->search( {}, {order_by=>???, page=>$page} ) > > How do we "order_by" a field from a related record when pulling a resultset? > We want to order users by team (then by lastname, firstname) and be able to > PAGE back and forth... > > e.g. a User belongs_to a Team. > >my $t

[Catalyst] HOWTO: order_by a field in a related record, for paging

2010-06-12 Thread w...@serensoft.com
$c->model()->search( {}, {order_by=>???, page=>$page} ) How do we "order_by" a field from a related record when pulling a resultset? We want to order users by team (then by lastname, firstname) and be able to PAGE back and forth... e.g. a User belongs_to a Team. my $team_name = $c->user->te

[Catalyst] unrecognized characters

2010-06-12 Thread Xiao Yafeng
Hi gurus, I'm new to Catalyst. I've found a strange situation when I wrote a website in utf-8. The page will change into unrecognized characters when I use DBD::Oracle plus WRAPPER directive. but if I use single module like DBD::Oracle or WRAPPER, it will retrieve correct words. Pleas