Re: [Catalyst] Storing Login Information

2007-08-09 Thread Jonas Alves
On 09/08/07, Patrick McDonnell <[EMAIL PROTECTED]> wrote:
> Hello -
>
> I'm working on a Catalyst app, mostly just to amuse myself, that is supposed
> to be a webmail/calendar/address book/user account management app.  All of
> the user account information, as well as the address book, is stored in an
> LDAP directory, so authenticating against that is not a problem.  I am
> running into a problem if I want the user to be able to connect to an IMAP
> server, as that would require that user provide their username/password
> again.  Here's basically how my app is currently working:
>
> User logs in, auth data is checked against LDAP.  Once logged in, the user
> is trusted to do various things based on my authorization scheme.
> Say the user wants to check his email.  I'm trying to use Net::IMAP::Simple
> to connect to my IMAP server.  However, to log in, the module needs the
> username and password.  So, the two most obvious options are to 1) have the
> user provide his authentication data again; or 2) store the user's password
> in the session.  Neither sounds like a good idea, the first is just
> annoying, and the second seems like a security vulnerability.
>
> So, does anyone have any advice on how to procede.  One idea I had was the
> login to the IMAP server the first time the user logs in to the web app, and
> then pass around the IMAP object with the session, but that seems kind of
> ugly.  Any ideas?
>
> Thanks.
>

You can create a second IMAP server that uses a secret token as the
user password.
Then you just need to auth against that server with the user login and
a password like sha1_hex($username, $your_secret), or something like
that.

Cheers,
-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Catalyst Unicode woes ...

2007-08-09 Thread Jonas Alves
On 09/08/07, Pedro Melo <[EMAIL PROTECTED]> wrote:
> Hi,
>
> On Aug 9, 2007, at 10:40 AM, Tatsuhiko Miyagawa wrote:
>
> > Similarly even if your templates are encoded in utf-8,
> > Template-Toolkit doesn't know which encoding they are in, until you
> > set BOM to your templates or use Template::Provider::Encoding to
> > explicitly specify the encoding to decode the template.
>
> hmms.. Is there a third way, just telling TT that all my templates
> are in UTF8? Setting the BOM is not easy with some editors.

Looking at Template::Provider::Encoding description:

"Template::Provider::Encoding is a Template Provider subclass to
decode template using its declaration. You have to declare encoding of
the template in the head (1st line) of template using (fake) encoding
TT plugin. Otherwise the template is handled as utf-8."

So if you want utf8 you just need to use T::P::E and don't need to
explicitly specify the encoding.

-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] C::P::C3 not working on Mac OS X

2007-05-08 Thread Jonas Alves

Hi all,
I have an application that works well on my Linux box, but dumps the
the following error in Mac OS X:

[error] Caught exception in engine "Can't use an undefined value as a
HASH reference at /Library/Perl/5.8.6/Catalyst/Engine/CGI.pm line 62."

That line is:
unless ( $c->config->{using_frontend_proxy} ) {...

If I dump $c->config it is undefined.
I'm using C::P::C3 so I tried to remove it and it worked.
I also tried to add C::P::C3 to a newly generated catalyst application
and i get the same error.
Anyone has any idea why C::P::C3 isn't working in my Mac OS X box?

Cheers.
--
Jonas Alves

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Insecure dependency while running a cat app under Apache2

2007-03-26 Thread Jonas Alves

Hi,
When I try to run my catalyst app under Apache2 I get this error message:

[error] Caught exception in MyApp::Controller::Login->form "Insecure
dependency in eval while running setgid at
/usr/local/share/perl/5.8.7/CGI/FormBuilder/Field.pm line 412."

It runs ok in the development server. Is Apache trying to run my app in
taint mode? Why?
Here is my Apache configuration:


   ServerName  myapp.dev
   DocumentRoot /servers/sites/myapp/root
   
   use lib '/servers/sites/myapp/lib';
   use MyApp;
   
   
   SetHandler modperl
   PerlResponseHandler MyApp
   
   
   SetHandler default-handler
   


Hope someone can welp me with this...

Thanks
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Anybody using Chained('.') ?

2007-03-13 Thread Jonas Alves

On 13/03/07, Jason Kohles <[EMAIL PROTECTED]> wrote:


On Mar 13, 2007, at 10:41 AM, Robert 'phaylon' Sedlacek wrote:

Jason Kohles wrote:

I'm trying to use Chained('.') to create a controller base class that
binds to the namespace of whatever controller class inherits it, but despite
the documentation specifically mentioning this use, I can't seem to get it
to work.


Where does the documentation say that? In Catalyst::DispatchType::Chained
it says

  Another interesting possibility gives :Chained('.'), which chains
  itself to an action with the path of the current controller's
  namespace.

Apparently I misunderstood the relationship between Chained and PathPart,
and therefore misunderstood what the documentation was saying here.  So now
the way I understand it is that Chained('.') means to setup a chain segment
that has as it's parent the chain segment that matches the current
controller's namespace.  Apparently what I'm actually looking for is the
equivalent of Chained('/') PathPart('.'), meaning I want to build chains
that originate in the current namespace.

What I'm actually trying to accomplish is something like this:

package MyApp::CRUDController;
use strict;
use warnings;
use base 'Catalyst::Controller';

# sub base : Chained(???) PathPart(???) CaptureArgs(0) { }

sub id : Chained('base') PathPart('id') CaptureArgs(0) { }
sub list : Chained('base') PathPart('') Args(0) { }
sub view : Chained('id') PathPart('view') Args(0) { }
sub edit : Chained('id') PathPart('edit') Args(0) { }
sub delete : Chained('id') PathPart('delete') Args(0) { }

1;

package MyApp::Controller::Foo;
use strict;
use warnings;
use base 'MyApp::CRUDController';

# So here I would like to get these chained actions:
# /foo/list
# /foo/id/*/view
# /foo/id/*/edit
# /foo/id/*/delete

1;

But the only way I can find to do this with Chained is by putting
something like this in each controller subclass:

sub base : Chained('/') PathPart('foo') CaptureArgs(0) { }

And I would rather not do that if I can avoid it, I'd rather have it
automatic, based on the namespace of the class that is inheriting the
superclass.

--
Jason Kohles
[EMAIL PROTECTED]
http://www.jasonkohles.com/
"A witty saying proves nothing."  -- Voltaire



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/



http://planet.catalystframework.org/#a28

See the PathPrefix attribute. Only in trunk I think...

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] PATCH - Multiple ActionClass attributes

2007-02-28 Thread Jonas Alves

Hi,

I wrote a patch that permits to use multiple ActionClass attributes in a
controller action.
Here is the synopsys:

=head1 USING MULTIPLE ACTIONS

To use multiple actions you just need to had more ActionClass
attributes:

 sub Hello :Local :ActionClass('SayBefore') ActionClass('SayAfter') {
   $c->res->output( 'Hello '.$c->stash->{what} );
 }

Attention that if you are using multiple actions you probably want to
use Class::C3 dispatch order. With NEXT just the first ActionClass will
be called. Here you have an example:

 package Catalyst::Action::SayBefore;
 use Class::C3;
 use base 'Catalyst::Action';

 sub execute {
   my $self = shift;
   my ( $controller, $c, $test ) = @_;
   $c->stash->{what} = 'world';
   $self->next::method( @_ );
 };

 1;

 package Catalyst::Action::SayAfter;
 use Class::C3;
 use base 'Catalyst::Action';

 sub execute {
   my $self = shift;
   my ( $controller, $c, $test ) = @_;
   $self->next::method( @_ );
   $c->res->output( 'Bye '.$c->stash->{what} );
 };

 1;

Patch with tests and docs attached.


catalyst_multiple_action_classes.diff
Description: Binary data


documentation.diff
Description: Binary data
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: PATCH - Multiple ActionClass attributes

2007-02-28 Thread Jonas Alves

Ups, wrong mailling list. I will resend it to catalyst-dev.
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Action

2007-02-07 Thread Jonas Alves

On 07/02/07, Matt S Trout <[EMAIL PROTECTED]> wrote:



On 6 Feb 2007, at 18:21, Jonas Alves wrote:

> Hi all,
> I'm trying to do a Reaction form to do an advanced search.
> This is what I have for now:
>
> package MyApp::Model::Action::Search;
> use Reaction::Class;
> use Reaction::InterfaceModel::Action;
>
> class Search is 'Reaction::InterfaceModel::Action', which {
>   has title  => (isa => 'SimpleStr', is => 'rw');
>   has state=> (isa => 'Str',  is => 'rw',
>valid_value_names => sub { [qw/One Two
> Three/] },
>valid_values  => sub { [qw/1 2 3/] },
>name_to_value_map => sub { {qw/One 1 Two 2
> Three 3/} },
>value_to_name_map => sub { {qw/1 One 2 Two 3
> Three/} },
>   );
>   implements do_apply => sub {};
> };
>

I'd just pass valid_values => sub { [ qw/One Two Three/ ] } and treat
it as an enum until you get to do_apply - do_apply should return
appropriate data, perhaps doing the search itself and returning the
resultset. Then you can pass an on_apply_callback to the ActionForm
that populates the ListView off the returned rs.



I will try that. Thanks :)
What is the best way to validate the form only when it is submited? I don't
want the messages to be displayed the first time the form is rendered.

Thanks,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: Reaction Action

2007-02-06 Thread Jonas Alves

On 06/02/07, Jonas Alves <[EMAIL PROTECTED]> wrote:


Hi all,
I'm trying to do a Reaction form to do an advanced search.
This is what I have for now:

package MyApp::Model::Action::Search;
use Reaction::Class;
use Reaction::InterfaceModel::Action;

class Search is 'Reaction::InterfaceModel::Action', which {
  has title  => (isa => 'SimpleStr', is => 'rw');
  has state=> (isa => 'Str',  is => 'rw',
   valid_value_names => sub { [qw/One Two Three/] },
   valid_values  => sub { [qw/1 2 3/] },
   name_to_value_map => sub { {qw/One 1 Two 2 Three
3/} },
   value_to_name_map => sub { {qw/1 One 2 Two 3
Three/} },
  );
  implements do_apply => sub {};
};

1;

But when it renders the form I get the following error message:
undef error - Can't call method "display_name" without a package or object
reference at
/usr/local/share/perl/5.8.7/Reaction/UI/ViewPort/Field/ChooseOne.pm line 72.

It appears that 'build_value_to_name_map' method is called even when I
pass the value_to_name_map parameter. I'm I doing something wrong? Maybe the
valid_values parameter should not be used this way.

Thanks,
--
Jonas



Hum, I was being silly.

I have to pass the attributes to the ActionForm like this:

$self->push_viewport(
   ActionForm,
   action => $c->model('Action::Search')->new(...),
   Field => {
   state => {
  valid_value_names => [...],
  valid_values  => [...],
  name_to_value_map => {...},
  value_to_name_map => {...},
   },
   },
   );

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Reaction Action

2007-02-06 Thread Jonas Alves

Hi all,
I'm trying to do a Reaction form to do an advanced search.
This is what I have for now:

package MyApp::Model::Action::Search;
use Reaction::Class;
use Reaction::InterfaceModel::Action;

class Search is 'Reaction::InterfaceModel::Action', which {
 has title  => (isa => 'SimpleStr', is => 'rw');
 has state=> (isa => 'Str',  is => 'rw',
  valid_value_names => sub { [qw/One Two Three/] },
  valid_values  => sub { [qw/1 2 3/] },
  name_to_value_map => sub { {qw/One 1 Two 2 Three 3/}
},
  value_to_name_map => sub { {qw/1 One 2 Two 3 Three/}
},
 );
 implements do_apply => sub {};
};

1;

But when it renders the form I get the following error message:
undef error - Can't call method "display_name" without a package or object
reference at
/usr/local/share/perl/5.8.7/Reaction/UI/ViewPort/Field/ChooseOne.pm line 72.

It appears that 'build_value_to_name_map' method is called even when I pass
the value_to_name_map parameter. I'm I doing something wrong? Maybe the
valid_values parameter should not be used this way.

Thanks,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] chained actions, knowing if current action is an endpoint or not

2007-02-01 Thread Jonas Alves

On 01/02/07, Dami Laurent (PJ) <[EMAIL PROTECTED]> wrote:


 Dear Catalysters,

I would like to set up an action chain where the entry point to the chain
(first action) has to do different things depending on whether there is
another action down the chain or not.

Is there a way in the API to ask Catalyst about what is pending in the
rest of the action chain ? or a way to know if the current action is being
used as an endpoint or not ?

Thanks in advance, L. Dami



I think you can't have one action that is both an endpoint and a normal
chained action at the same time. You have to define two actions with the
same PathPart.

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-29 Thread Jonas Alves

On 28/01/07, Guillermo Roditi <[EMAIL PROTECTED]> wrote:


FIXED IT!!!

take out the does '...' line and replace it with this:

override parameter_hashref => sub{
my $self = shift;
my $args = super();
$args->{password} = delete $args->{new_password};
delete $args->{confirm_new_password};
return $args;
};


here's my class:

package Prefab::Model::Action::CreateUser;

use strict;
use warnings;

use Reaction::Class;
use aliased 'Reaction::InterfaceModel::Action::DBIC::ActionReflector';

extends qw(
   Reaction::InterfaceModel::Action::User::SetPassword
   Reaction::InterfaceModel::Action::DBIC::ResultSet::Create
  );

my $r = ActionReflector->new;
$r->reflect_attrs('Prefab::Schema::User'  =>  __PACKAGE__,
  qw/id username created_d role_list/);

override parameter_hashref => sub{
my $self = shift;
my $args = super();
$args->{password} = delete $args->{new_password};
delete $args->{confirm_new_password};
return $args;
};

1;



If you want to reflect fields like i did then add this method to
action reflector:

  implements reflect_attrs => as {
my ($self, $from_class, $to_class, @attrs) = @_;
foreach my $attr_name (@attrs) {
  $self->reflect_attribute_to($from_class,

  $from_class->meta->get_attribute($attr_name),
  $to_class);
}
  };



Cool, I like that reflect_attrs method, I'm already using it.
I have tried your aproach before. You can't delete the 'new_password' and
'confirm_new_password' or the confirm_password is not checked against
'new_password'.
You have to live with the warnings in the error log.
But it doesn't work for me either. The problem is that
Reaction::InterfaceModel::Action::User::SetPassword and
Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques both override
'error_for_attribute' and 'can_apply'. So if you have unique constraints in
your schema they don't get evaluated if your class extends from
User::SetPassword before ResultSet::Create
or if you reverse the order then your confirm password is not checked. I
tried to change the methods from override to augment and the super() call to
an inner() call but i got following error:
Moose::Role cannot support 'augment' at
/usr/local/share/perl/5.8.7/Moose/Role.pm line 138

So i don't know how to fix this.

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-25 Thread Jonas Alves

On 25/01/07, Guillermo Roditi <[EMAIL PROTECTED]> wrote:


what i meant is that you get new_password and confirm_new password,
but you still need the original password field

see code for
Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;



Yes, but i have the password field in the model passed to "target_model".
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-25 Thread Jonas Alves

On 25/01/07, Jonas Alves <[EMAIL PROTECTED]> wrote:




On 25/01/07, Matt S Trout <[EMAIL PROTECTED]> wrote:
>
>
> On 25 Jan 2007, at 12:55, Jonas Alves wrote:
>
> >
> >
> > On 23/01/07, Guillermo Roditi <[EMAIL PROTECTED]> wrote: Hey, any
> > chance you could post the working code now that you fixed it.
> >
> > There is no actual real working code for reaction out there, and
> > it'd be nice to look at some real code..
> >
> > in other words, can I see your finished action and controller
> > classes so i can steal ideas and learn something?
> >
> > I am working on a reaction app that I will post to public SVN as
> > soon as it actually runs and keep it public as i develop it so
> > other people can get an idea aswell
> >
> > Hi Guillermo,
> > The application that I'm developing is for a client so I can't make
> > it public. But here are the pertinent action classes and
> > controllers that i have for now:
>
> Any particular reason you aren't using the existing SetPassword roles
> etc. ?


Ups, I guess i missed that one. I will update my code to use it. Thanks :D



Hum, I can't make it work.
This is what i have:

package OliveiraDaSerra::Model::Action::CreateUser;
use Reaction::Class;

extends qw(
   Reaction::InterfaceModel::Action::DBIC::ResultSet::Create
   Reaction::InterfaceModel::Action::User::SetPassword
);

does 'Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword';

has 'email_address' => (isa => 'EmailAddress', is => 'rw',
set_or_lazy_fail('email_address'));
#has 'password'  => (isa => 'StrongPassword', is => 'rw');
#has 'confirm_password' => (isa => 'StrongPassword', is => 'rw');
has 'last_name' => (isa => 'NonEmptySimpleStr', is => 'rw', predicate =>
'has_last_name');
has 'first_name'=> (isa => 'NonEmptySimpleStr', is => 'rw',
set_or_lazy_fail('first_name'));
has 'username'  => (isa => 'NonEmptySimpleStr', is => 'rw',
set_or_lazy_fail('username'));

#override parameter_hashref => sub {
#my $hash = super();
#$hash->{password} = delete $hash->{new_password};
#delete $hash->{confirm_new_password};
#return $hash;
#};

1;

But i get this error: Can't locate object method "password" via package
"DBIx::Class::ResultSet" at
/usr/local/share/perl/5.8.7/Reaction/InterfaceModel/Action/DBIC/User/Role/SetPassword.pm
line 8.

What am i doing wrong?

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Re: Reaction Widgets questions

2007-01-25 Thread Jonas Alves

On 25/01/07, Matt S Trout <[EMAIL PROTECTED]> wrote:



On 25 Jan 2007, at 12:36, Jonas Alves wrote:

>
>
> On 17/01/07, Matt S Trout <[EMAIL PROTECTED]> wrote:
> On 16 Jan 2007, at 17:07, Jonas Alves wrote:
> > As for a controller that limits visible attributes, are you wanting
> > to do this for the listview or globally?
> >
> > Imagine that i have 2 forms for the same table. One with all the
> > fields and another with just some of them. What came to me was
> > define another schema class to the same table but just with some of
> > the attributes defined. But that doesn't seem the best aproach...
> > But creating new action classes that just differ in the attributtes
> > defined doesn't seem a better way. Maybe if I could pass the fields
> > to the class when I push it to the viewport. Something like:
>
> Assuming the action can be committed without the additional fields,
> just subclass the Action class and override parameter_attributes to
> only return the attributes you want visible, then pass a copy of that
> action to the ViewPort instead.
>
> It's not perfect, but it works pretty well for me so far so I'm
> punting on a better solution until we've got a better idea what we
> need out of it.
>
> Thanks Matt. I think i will stick with that.
> How about javascript and ajax form validation in Reaction. Is that
> on the pipeline?

Oh hell yes. Needs a couple bits of infrastructure to do it properly,
but it's definitely coming :)



Cool. Waiting anxious for it. :)
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-25 Thread Jonas Alves

On 25/01/07, Matt S Trout <[EMAIL PROTECTED]> wrote:



On 25 Jan 2007, at 12:55, Jonas Alves wrote:

>
>
> On 23/01/07, Guillermo Roditi <[EMAIL PROTECTED]> wrote: Hey, any
> chance you could post the working code now that you fixed it.
>
> There is no actual real working code for reaction out there, and
> it'd be nice to look at some real code..
>
> in other words, can I see your finished action and controller
> classes so i can steal ideas and learn something?
>
> I am working on a reaction app that I will post to public SVN as
> soon as it actually runs and keep it public as i develop it so
> other people can get an idea aswell
>
> Hi Guillermo,
> The application that I'm developing is for a client so I can't make
> it public. But here are the pertinent action classes and
> controllers that i have for now:

Any particular reason you aren't using the existing SetPassword roles
etc. ?



Ups, I guess i missed that one. I will update my code to use it. Thanks :D

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-25 Thread Jonas Alves

On 23/01/07, Guillermo Roditi <[EMAIL PROTECTED]> wrote:


Hey, any chance you could post the working code now that you fixed it.

There is no actual real working code for reaction out there, and it'd be
nice to look at some real code..

in other words, can I see your finished action and controller classes so i
can steal ideas and learn something?

I am working on a reaction app that I will post to public SVN as soon as
it actually runs and keep it public as i develop it so other people can get
an idea aswell



Hi Guillermo,
The application that I'm developing is for a client so I can't make it
public. But here are the pertinent action classes and controllers that i
have for now:

package MyApp::Model::Action::AuthUser;
use Reaction::Class;
use Reaction::Types::DBIC;
use Reaction::InterfaceModel::Action;

class AuthUser is 'Reaction::InterfaceModel::Action', which {
 has 'username' => (isa => 'NonEmptySimpleStr', is => 'rw',
set_or_lazy_fail('username'));
 has 'password' => (isa => 'Password',  is => 'rw',
set_or_lazy_fail('password'));

 after sync_all => sub {
   my $self = shift;
   my $c = $self->ctx;
   if ($c->login($self->username, $self->password)) {
   $c->response->redirect($c->uri_for(
 $c->request->params->{request_uri}
   ));
   }
   else {
   $self->error_message("Wrong Password");
   }
 };

 override error_for_attribute => sub {
   my ($self, $attr) = @_;
   if ($attr->name eq 'password' && $self->error_message) {
 return $self->error_message;
   }
   return super();
 };

 override can_apply => sub {
   my ($self) = @_;
   return 0 if $self->error_message;
   return super();
 };

};

1;


package MyApp::Model::Action::CreateUser;
use Reaction::Class;
extends 'Reaction::InterfaceModel::Action::DBIC::ResultSet::Create';

has 'email_address' => (isa => 'EmailAddress', is => 'rw',
set_or_lazy_fail('email_address'));
has 'password'  => (isa => 'StrongPassword', is => 'rw');
has 'confirm_password' => (isa => 'StrongPassword', is => 'rw');
has 'last_name' => (isa => 'NonEmptySimpleStr', is => 'rw', predicate =>
'has_last_name');
has 'first_name'=> (isa => 'NonEmptySimpleStr', is => 'rw',
set_or_lazy_fail('first_name'));
has 'username'  => (isa => 'NonEmptySimpleStr', is => 'rw',
set_or_lazy_fail('username'));

override error_for_attribute => sub {
 my ($self, $attr) = @_;
 if ($attr->name eq 'confirm_password'
 && $self->confirm_password
 && $self->password
 && $self->confirm_password ne $self->password) {
   return "Passwords don't match";
 }
 return super();
};

override can_apply => sub {
 my ($self) = @_;
 return 0 if $self->confirm_password ne $self->password;
 return super();
};

1;

package MyApp::Controller::Login;
use strict;
use warnings;
use base 'Reaction::UI::Controller';
use Reaction::Class;
use aliased 'Reaction::UI::ViewPort::ActionForm';

sub base :Chained('/base') :PathPart('login') :CaptureArgs(0) {}

sub login :Chained('base') :PathPart('') :Args(0) {
   my ($self, $c) = @_;
   my $action = $c->model('Action::AuthUser')->new(ctx => $c);
   $self->push_viewport(
   ActionForm,
   action => $action,
   layout => 'login_form',
   column_order => [qw/username password/],
   );
}

1;


package MyApp::Controller::User;
use strict;
use warnings;
use base 'Reaction::UI::CRUDController';
use Reaction::Class;

__PACKAGE__->config(
 model_base => 'DBIC',
 model_name => 'User',
 action => { base => { Chained => '/base', PathPart => 'user' },
 list => { ViewPort => { layout => 'user_list' } },
 update => { ViewPort => { layout => 'user_form' } },
 create => { ViewPort => {
   layout => 'user_form',
   column_order => [qw/
   first_name
   last_name
   username
   password
   confirm_password
   email_address
   /],
 } } },
);

1;

Hope it helps. :)

Cheers,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Re: Reaction Widgets questions

2007-01-25 Thread Jonas Alves

On 17/01/07, Matt S Trout <[EMAIL PROTECTED]> wrote:



On 16 Jan 2007, at 17:07, Jonas Alves wrote:
> As for a controller that limits visible attributes, are you wanting
> to do this for the listview or globally?
>
> Imagine that i have 2 forms for the same table. One with all the
> fields and another with just some of them. What came to me was
> define another schema class to the same table but just with some of
> the attributes defined. But that doesn't seem the best aproach...
> But creating new action classes that just differ in the attributtes
> defined doesn't seem a better way. Maybe if I could pass the fields
> to the class when I push it to the viewport. Something like:

Assuming the action can be committed without the additional fields,
just subclass the Action class and override parameter_attributes to
only return the attributes you want visible, then pass a copy of that
action to the ViewPort instead.

It's not perfect, but it works pretty well for me so far so I'm
punting on a better solution until we've got a better idea what we
need out of it.



Thanks Matt. I think i will stick with that.
How about javascript and ajax form validation in Reaction. Is that on the
pipeline?

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Re: Reaction Widgets questions

2007-01-16 Thread Jonas Alves

On 16/01/07, Matt S Trout <[EMAIL PROTECTED]> wrote:



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

> On 12/01/07, Jonas Alves <[EMAIL PROTECTED]> 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.



Great info. I saw that that arguments where passed to the action class, but
I didn't figure that i could use them to explicitly set the fields widgets.

As for a controller that limits visible attributes, are you wanting

to do this for the listview or globally?



Imagine that i have 2 forms for the same table. One with all the fields and
another with just some of them. What came to me was define another schema
class to the same table but just with some of the attributes defined. But
that doesn't seem the best aproach... But creating new action classes that
just differ in the attributtes defined doesn't seem a better way. Maybe if I
could pass the fields to the class when I push it to the viewport. Something
like:

$self->push_viewport(
   ActionForm,
   action => $action,
   fields => { ... },
);

I've read the code and it appears that it's possible to do it. But can't
figure how can i put the fields in the hash. Maybe I should read the Moose
docs again.
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-16 Thread Jonas Alves

On 16/01/07, Matt S Trout <[EMAIL PROTECTED]> wrote:



On 15 Jan 2007, at 18:56, Jonas Alves wrote:

>
>
> On 15/01/07, Jonas Alves <[EMAIL PROTECTED]> wrote: On
> 14/01/07, Ash Berlin <[EMAIL PROTECTED]> wrote:
> Jonas Alves wrote:
> > Hi all,
> > I was starting to put authentication in a Reaction application
> that i'm
> > developing when I saw that Reaction has this classes:
> >
> > Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
> > Reaction::InterfaceModel::Action::DBIC::User::ChangePassword;
> > Reaction::InterfaceModel::Action::DBIC::User::ResetPassword;
> > Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;
> > Reaction::InterfaceModel::Action::User::ChangePassword;
> > Reaction::InterfaceModel::Action::User::ResetPassword;
> > Reaction::InterfaceModel::Action::User::SetPassword;
> >
> > It appears that Reaction already has some facilities to do auth
> stuff.
> > How can I use this classes to help me?
> >
> > Thanks a lot,
> > --
> > Jonas
> >
>
> Not having used Reaction myself BUT I suspect that these are for
> updating existing profile info in the DB.
>
> Do the authentication the same way you would in a normal Catalyst app.
>
> Ash
>
> Thanks Ash,
> I already have authentication the same way i would in a normal
> Catalyst app. But now I would like to use the Reaction TT widgets
> to create a custom form with validation for authentication and
> another one to register a user. I read the source but could not
> achieved it.
> Matt, can you help?
>
> Thanks a lot,
> --
> Jonas
>
>
> Hi again,
> I've now created an Action class do handle the login. Here is the
> code:
>
> package MyApp::Model::Action::AuthUser;
> use Reaction::Class;
> use Reaction::Types::DBIC;
> use Reaction::InterfaceModel::Action;
> use Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
>

> class AuthUser is 'Reaction::InterfaceModel::Action', which {
>   does 'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques';
>   has '+target_model' => (isa => 'DBIx::Class::ResultSet');

   has 'username' => (isa => 'NonEmptySimpleStr', is => 'rw',
set_or_lazy_fail('username'));
   has 'password' => (isa => 'StrongPassword',is => 'rw',
set_or_lazy_fail('password'));

>
>   has _unique_constraint_results => (
> isa => 'HashRef',
> is => 'rw',
> required => 1,
> default => sub { {} },
> metaclass => 'Moose::Meta::Attribute'
>   );
>
>   implements do_apply => as {
> my $self = shift;
> my $args = $self->parameter_hashref;
> warn '==> ' .Dumper $args;
> # do auth stuff here
>   };
> };
>
> 1;

> But the form is rendered just with the "ok" and "close" buttons.
> The fields are not displayed.
> I put some debug in ActionForm.pm BUILD method and found that $self-
> >_has_field_map() is always false and $action->parameter_attributes
> () does not return anything.
> What am i doing wrong?
>

You have to put the attributes within the class block or the
superclass hasn't been set yet, which means the attributes default to
the wrong meta-attribute class and aren't created as
ParameterAttribute objects. At which point, it doesn't work :)



It makes sense.
Thanks a lot Matt. :)
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-15 Thread Jonas Alves

On 15/01/07, Jonas Alves <[EMAIL PROTECTED]> wrote:


On 14/01/07, Ash Berlin <[EMAIL PROTECTED]> wrote:
>
> Jonas Alves wrote:
> > Hi all,
> > I was starting to put authentication in a Reaction application that
> i'm
> > developing when I saw that Reaction has this classes:
> >
> > Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
> > Reaction::InterfaceModel::Action::DBIC::User::ChangePassword;
> > Reaction::InterfaceModel::Action::DBIC::User::ResetPassword;
> > Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;
> > Reaction::InterfaceModel::Action::User::ChangePassword;
> > Reaction::InterfaceModel::Action::User::ResetPassword;
> > Reaction::InterfaceModel::Action::User::SetPassword;
> >
> > It appears that Reaction already has some facilities to do auth stuff.
> > How can I use this classes to help me?
> >
> > Thanks a lot,
> > --
> > Jonas
> >
>
> Not having used Reaction myself BUT I suspect that these are for
> updating existing profile info in the DB.
>
> Do the authentication the same way you would in a normal Catalyst app.
>
> Ash


Thanks Ash,
I already have authentication the same way i would in a normal Catalyst
app. But now I would like to use the Reaction TT widgets to create a custom
form with validation for authentication and another one to register a user.
I read the source but could not achieved it.
Matt, can you help?

Thanks a lot,
--
Jonas



Hi again,
I've now created an Action class do handle the login. Here is the code:

package MyApp::Model::Action::AuthUser;
use Reaction::Class;
use Reaction::Types::DBIC;
use Reaction::InterfaceModel::Action;
use Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;

has 'username' => (isa => 'NonEmptySimpleStr', is => 'rw',
set_or_lazy_fail('username'));
has 'password' => (isa => 'StrongPassword',is => 'rw',
set_or_lazy_fail('password'));

class AuthUser is 'Reaction::InterfaceModel::Action', which {
 does 'Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques';
 has '+target_model' => (isa => 'DBIx::Class::ResultSet');

 has _unique_constraint_results => (
   isa => 'HashRef',
   is => 'rw',
   required => 1,
   default => sub { {} },
   metaclass => 'Moose::Meta::Attribute'
 );

 implements do_apply => as {
   my $self = shift;
   my $args = $self->parameter_hashref;
   warn '==> ' .Dumper $args;
   # do auth stuff here
 };
};

1;

And a controller to handle it:

package MyApp::Controller::Login;
use strict;
use warnings;
use base 'Reaction::UI::CRUDController';
use Reaction::Class;
use aliased 'Reaction::UI::ViewPort::ListView';
use aliased 'Reaction::UI::ViewPort::ActionForm';
use aliased 'Reaction::UI::ViewPort';

__PACKAGE__->config(
 action => { base  => { Chained => '/base', PathPart => 'login' },
 login => { ViewPort => { layout => 'login_form' } },
},
);

sub base :Action :CaptureArgs(0) {
   my ($self, $c) = @_;
}

sub login :Chained('base') :PathPart('') :Args(0) {
   my ($self, $c) = @_;
   my $action = $c->model('Action::AuthUser')
 ->new( target_model => $c->model('DBIC::User'), ctx => $c,);
   $self->push_viewport(
   ActionForm,
   action => $action,
   #next_action => 'list',
   );
}

1;

But the form is rendered just with the "ok" and "close" buttons. The fields
are not displayed.
I put some debug in ActionForm.pm BUILD method and found that
$self->_has_field_map() is always false and $action->parameter_attributes()
does not return anything.
What am i doing wrong?

Hope you can help me.

--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Reaction Authentication

2007-01-15 Thread Jonas Alves

On 14/01/07, Ash Berlin <[EMAIL PROTECTED]> wrote:


Jonas Alves wrote:
> Hi all,
> I was starting to put authentication in a Reaction application that i'm
> developing when I saw that Reaction has this classes:
>
> Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
> Reaction::InterfaceModel::Action::DBIC::User::ChangePassword;
> Reaction::InterfaceModel::Action::DBIC::User::ResetPassword;
> Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;
> Reaction::InterfaceModel::Action::User::ChangePassword;
> Reaction::InterfaceModel::Action::User::ResetPassword;
> Reaction::InterfaceModel::Action::User::SetPassword;
>
> It appears that Reaction already has some facilities to do auth stuff.
> How can I use this classes to help me?
>
> Thanks a lot,
> --
> Jonas
>

Not having used Reaction myself BUT I suspect that these are for
updating existing profile info in the DB.

Do the authentication the same way you would in a normal Catalyst app.

Ash



Thanks Ash,
I already have authentication the same way i would in a normal Catalyst app.
But now I would like to use the Reaction TT widgets to create a custom form
with validation for authentication and another one to register a user. I
read the source but could not achieved it.
Matt, can you help?

Thanks a lot,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Reaction Authentication

2007-01-14 Thread Jonas Alves

Hi all,
I was starting to put authentication in a Reaction application that i'm
developing when I saw that Reaction has this classes:

Reaction::InterfaceModel::Action::DBIC::Role::CheckUniques;
Reaction::InterfaceModel::Action::DBIC::User::ChangePassword;
Reaction::InterfaceModel::Action::DBIC::User::ResetPassword;
Reaction::InterfaceModel::Action::DBIC::User::Role::SetPassword;
Reaction::InterfaceModel::Action::User::ChangePassword;
Reaction::InterfaceModel::Action::User::ResetPassword;
Reaction::InterfaceModel::Action::User::SetPassword;

It appears that Reaction already has some facilities to do auth stuff. How
can I use this classes to help me?

Thanks a lot,
--
Jonas
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: Reaction Widgets questions

2007-01-12 Thread Jonas Alves

On 12/01/07, Jonas Alves <[EMAIL PROTECTED]> 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'.


I also want to create a new controller that show in the form just some
of the fields of a table. Is this possible? How can i do it?

Thanks for your help,
--
Jonas



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Reaction Widgets questions

2007-01-12 Thread Jonas Alves

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?
I also want to create a new controller that show in the form just some
of the fields of a table. Is this possible? How can i do it?

Thanks for your help,
--
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] schema

2006-12-26 Thread Jonas Alves

  my $barneys = $c->model('DB::Person')->search({name => 'barney'});

instead of

  my $schema = $c->model('DB');
  my $barnes = $schema->resultset('Person')->search({name => 'barney'});

And I don't think Model::DBIC::Schema pays attention to the default_model
setting.



He can use the default_model setting and use
$c->model->resultset('Person') to get the Person resultset.

--
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] schema

2006-12-24 Thread Jonas Alves

If I write the name of the database in more modules it will be harder to
change its name, but now I I think that I could use something like:

$c->model($c->config->{db});

and just change the name of the db in the application config.


Or you can just use $c->model() and define the "default_model"
parameter in the config file.

--
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Configuring Catalyst::Model::DBIC::Schema from YAML

2006-10-05 Thread Jonas Alves
On 05/10/06, Jonathan Rockway <[EMAIL PROTECTED]> wrote:
> I'll put it in Catalyst svn and fix anything obvious, if you want, but
> since I don't actually use the module,  I don't want to commit to
> maintaining it long term.  Hopefully a user will step forward to
> maintain it, but if not, I'll deal with it for now.
>
> Do you keep it in svn, or do you use some other RCS?  I would prefer to
> import the whole change history, if possible (never know when you need
> to go back to an older version for whatever reason).
>

No Jonathan, i don't have the MicroMason view in any RCS. Was a very
small module that didn't use very much. Putting it in the Catalyst svn
is a great idea. Thanks very much. I can make a new release with the
bug fix after that. Or i can give you PAUSE access to the module.

-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Configuring Catalyst::Model::DBIC::Schema from YAML

2006-10-03 Thread Jonas Alves
On 03/10/06, Jon Warbrick <[EMAIL PROTECTED]> wrote:
> On Mon, 2 Oct 2006, Matt S Trout wrote:
>
> > Jon Warbrick wrote:
> > > But for some reason my Catalyst::View::MicroMason
> > > view, called Lookup::View::MicroMason _isn't_ successfully configured - it
> > > behaves as if the extra mixins are not present. Anyone any idea why?
> >
> > Yes. Because it's broken.
> >
> > my @Mixins  = @{ $self->config->{Mixins} || [] };
> >
> > should be
> >
> > my @Mixins  = @{ $self->{Mixins} || [] };
> >
> > and similarly throughout the module.
> >
> > I've cc'ed the author on this message in the hopes he'll fix it :)
>
> Here's a patch, in effect a rewrite of new() based on
> Catalyst::View::TT::new(), which _appears_ to resolve the problem though I
> still don't feel I entirely understand what should be happening here...
>
> Jon.

Hi,
I can apply the patch, but i don't use the MicroMason view anymore.
Someone want to maintain it?

-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Fastest Perl HTTPD?

2006-08-26 Thread Jonas Alves
http://use.perl.org/~Matts/journal/30758

-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Forms and Plugins and Tutorials, oh my!!

2006-08-18 Thread Jonas Alves
On 18/08/06, Carl Franks <[EMAIL PROTECTED]> wrote:
> On 18/08/06, Jonas Alves <[EMAIL PROTECTED]> wrote:
> > On 18/08/06, Carl Franks <[EMAIL PROTECTED]> wrote:
> > >
> > > If you don't want to manually download the dojo library, it needs
> > > Catalyst::Plugin::Dojo which currently uses HTML::Dojo, but will be
> > > changed to use Alien::Dojo once that's merged with HTML::Dojo. - see
> > > the previous discussion on this list, titled "Alien-Dojo / HTML-Dojo
> > > merger suggestions"
> > >
> > > If you're able to help at all with developing these, it'd be most welcome.
> > > The first priority is probably rewriting Alien::Dojo, along the lines
> > > mentioned in the "Alien-Dojo / HTML-Dojo merger suggestions" email.
> >
> > Hi Carl,
> > I would like to help developing these modules. Could you give some
> > guidance in what needs to be done.
> > I really need HTML::Widget::Dojo for the future versions of InstantCRUD.
>
> At the moment, there's only been 1 release of Alien::Dojo, and it's broken.
> The author is happy to hand over maintenance of it.
>
> The message mentioned above is here:
> http://lists.rawmode.org/pipermail/catalyst/2006-June/008222.html
> This is Yuval's resonse:
> http://lists.rawmode.org/pipermail/catalyst/2006-June/008225.html
> It seems a bit over-engineered to me, but Yuval is the man when it
> comes to design, so I bow to him. Unfortunately, I don't have the time
> to work on it - it's a minor issue for me, as it's so easy to manually
> download the dojo-ajax release from the website.
>
> As HTML-Widget-Dojo stands, I think the latest in subversion worked ok
> with dojo v0.3.
> Dojo v0.3.1 has since been released, so we need to check whether the
> widgets we use have had incompatable changes.
> I had posted a few bug reports - I'll need to search for them and see
> if they've been addressed.
>
> This thread also mentions a couple of issues that might still be outstanding.
> http://lists.rawmode.org/pipermail/html-widget/2006-May/thread.html#2
>
> Feel free to ask anything else.
> Anything specific to HTML-Widget-Dojo should probably be on the H-W list 
> though.
>
> Cheers,
> Carl

Thanks Carl. I will go to holidays today. But i will take a look at it
when i come back.

Cheers,
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Forms and Plugins and Tutorials, oh my!!

2006-08-18 Thread Jonas Alves
On 18/08/06, Carl Franks <[EMAIL PROTECTED]> wrote:
> On 18/08/06, Kevin Monceaux <[EMAIL PROTECTED]> wrote:
> > That would certainly work.  But, imagine if a form plugin took care of the
> > dirty work for the developer.  Let's pretend for a moment.  Imagine, if you
> > will, that someone integrated the FCKEditor with HTML::Widget.  One might be
> > able to create an FCKEditor textarea field by doing something like:
> >
> > $w->element('FCKEditor', 'description' )->label('Description')->rows(20)->
> > columns(40);
>
> There's work in this direction already with HTML::Widget::Dojo.
> Work has currently stalled, partly because dojo seemed to be going
> through a lot of changes, and partly because it's slipped down my
> priority list.
>
> Currently, HTML::Widget::Dojo provides elements for WYSIWYG textarea,
> auto-complete text fields, and a popup date selector.
>
> If you don't want to manually download the dojo library, it needs
> Catalyst::Plugin::Dojo which currently uses HTML::Dojo, but will be
> changed to use Alien::Dojo once that's merged with HTML::Dojo. - see
> the previous discussion on this list, titled "Alien-Dojo / HTML-Dojo
> merger suggestions"
>
> If you're able to help at all with developing these, it'd be most welcome.
> The first priority is probably rewriting Alien::Dojo, along the lines
> mentioned in the "Alien-Dojo / HTML-Dojo merger suggestions" email.

Hi Carl,
I would like to help developing these modules. Could you give some
guidance in what needs to be done.
I really need HTML::Widget::Dojo for the future versions of InstantCRUD.

Cheers
-- 
Jonas

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/