[Catalyst] Re: Reaction Widgets questions

Matt S Trout dbix-class at trout.me.uk
Tue Jan 16 12:31:10 GMT 2007


On 12 Jan 2007, at 18:59, Jonas Alves wrote:

> On 12/01/07, Jonas Alves <jonas.alves at gmail.com> wrote:
>> Hi,
>> I'm trying Reaction for the first time. I already got it to work  
>> using
>> the CRUDController against some tables i have in a database.
>> Now i'm trying to change the widgets used to display the form. How  
>> can
>> i tell Reaction that one field type is a
>> Reaction::UI::ViewPort::Field::* class?
>
> Ok, i guess i found that one. The build_fields_for_type_* method in
> the ActionFom.pm class do it when call the build_simple_field method.
> So to get a Password field i just have to say that my field isa =>
> 'Password'.

Yep, plus you can set config(action => { 'name' => { ViewPort =>  
{ ... } } }) to alter the arguments passed through - ActionForm only  
searches the build_fields_for_type stuff if it isn't given explicit  
info on what to do.

As for a controller that limits visible attributes, are you wanting  
to do this for the listview or globally?

-- 
Matt S Trout, Technical Director, Shadowcat Systems Ltd.
Offering custom development, consultancy and support contracts for  
Catalyst,
DBIx::Class and BAST. Contact mst (at) shadowcatsystems.co.uk for  
details.
+ Help us build a better perl ORM: http://dbix- 
class.shadowcatsystems.co.uk/ +





More information about the Catalyst mailing list