Re: [Catalyst] FormBuilder not working

2008-09-20 Thread Hani Anani
Hello Abhishek,

I suspect the problem is with the naming of your files and dir structure.

If search2 method is in the Project module you will need to do the
following:

1. create a project sub dir in your root/forms dir
2. move your form definition file to the root/forms/project/search2.fb
3. Your template should be defined in root/project/search.tt2 you specify
this in your code
 $c->stash->{template} = 'project/search2.tt2';
This is unecessary since Catalyst does this for you.

I do have to say I am a little confused, cause you refer to
root/src/search2.tt2 at the start of the email, in that case you might just
need to rename your form file to search2.fb to match you method's name.

Hope this helps you figure out what went wrong,
-Hani

On Fri, Sep 19, 2008 at 11:31 PM, abhishek jain
<[EMAIL PROTECTED]>wrote:

> Hello Friends,I am new to Catalyst and need to implement FormBuilder.
> What i am doing is:
> a template called root/src/search2.tt2 with the following content;
>
> [% META title = "Edit a person" %]
> [% FormBuilder.render %]
>
> a form script on root/forms/search.db
>
> in controller i have the following function
>
> sub search2 : Local Form {
> my ( $self, $c ) = @_;
> $c->stash->{template} = 'project/search2.tt2';
> }
>
> Do I need to do anything extra, i can get a page but without the form.
> Pl.help.
> --
> Thanks and kind Regards,
> Abhishek jain
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] FormBuilder not working

2008-09-20 Thread abhishek jain
On Sat, Sep 20, 2008 at 12:28 PM, Hani Anani <[EMAIL PROTECTED]> wrote:

> Hello Abhishek,
>
> I suspect the problem is with the naming of your files and dir structure.
>
> If search2 method is in the Project module you will need to do the
> following:
>
> 1. create a project sub dir in your root/forms dir
> 2. move your form definition file to the root/forms/project/search2.fb
> 3. Your template should be defined in root/project/search.tt2 you specify
> this in your code
>  $c->stash->{template} = 'project/search2.tt2';
> This is unecessary since Catalyst does this for you.
>
> I do have to say I am a little confused, cause you refer to
> root/src/search2.tt2 at the start of the email, in that case you might just
> need to rename your form file to search2.fb to match you method's name.
>
> Hope this helps you figure out what went wrong,
> -Hani
>
> On Fri, Sep 19, 2008 at 11:31 PM, abhishek jain <
> [EMAIL PROTECTED]> wrote:
>
>> Hello Friends,I am new to Catalyst and need to implement FormBuilder.
>> What i am doing is:
>> a template called root/src/search2.tt2 with the following content;
>>
>> [% META title = "Edit a person" %]
>> [% FormBuilder.render %]
>>
>> a form script on root/forms/search.db
>>
>> in controller i have the following function
>>
>> sub search2 : Local Form {
>> my ( $self, $c ) = @_;
>> $c->stash->{template} = 'project/search2.tt2';
>> }
>>
>> Do I need to do anything extra, i can get a page but without the form.
>> Pl.help.
>> --
>> Thanks and kind Regards,
>> Abhishek jain
>>
>> ___
>> List: Catalyst@lists.scsys.co.uk
>> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
>> Dev site: http://dev.catalyst.perl.org/
>>
>>
>
> ___
> List: Catalyst@lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
>
>

Thanks for the fast reply,The problem is solved
-- 
Thanks and kind Regards,
Abhishek jain
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] C::P::Compress::Gzip

2008-09-20 Thread Octavian Rasnita

Hi,

I try to use C::P::Compress::Gzip, but if I add it to the list of plugins, 
the program gives an error in the browser telling

"The requested URL / was not found on this server."

And in the error_log I can see the following error:
[Sat Sep 20 11:13:43 2008] [error] [client 127.0.0.1] Attempt to serve 
directory: E:/web/Acces/root/


If I remove C::P::Compress::Gzip from the list of plugins, the program works 
fine.


Here are the plugins I use in the app:

use Catalyst qw/
-Debug
ConfigLoader
Static::Simple
Session
Session::State::Cookie
Session::Store::File
Authentication
Authorization::Roles
Email
Compress::Gzip
   /;

In the Root.pm controller I have an empty "index" method that serves the 
root/index template.


sub index :Path :Args(0) {
   my ( $self, $c ) = @_;
}

I have also tried to add in this method:
$c->stash->{template} = "index";

but it gives the same error. Strangely, but if I add:
$c->res->body($c->welcome_message);

the welcome message is printed fine.

Am I doing something wrong?

Thank you.

Octavian


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


Re: [Catalyst] FormBuilder not working

2008-09-20 Thread abhishek jain
On Sat, Sep 20, 2008 at 1:12 PM, abhishek jain
<[EMAIL PROTECTED]>wrote:

>
>
> On Sat, Sep 20, 2008 at 12:28 PM, Hani Anani <[EMAIL PROTECTED]> wrote:
>
>> Hello Abhishek,
>>
>> I suspect the problem is with the naming of your files and dir structure.
>>
>> If search2 method is in the Project module you will need to do the
>> following:
>>
>> 1. create a project sub dir in your root/forms dir
>> 2. move your form definition file to the root/forms/project/search2.fb
>> 3. Your template should be defined in root/project/search.tt2 you specify
>> this in your code
>>  $c->stash->{template} = 'project/search2.tt2';
>>  This is unecessary since Catalyst does this for you.
>>
>> I do have to say I am a little confused, cause you refer to
>> root/src/search2.tt2 at the start of the email, in that case you might just
>> need to rename your form file to search2.fb to match you method's name.
>>
>> Hope this helps you figure out what went wrong,
>> -Hani
>>
>> On Fri, Sep 19, 2008 at 11:31 PM, abhishek jain <
>> [EMAIL PROTECTED]> wrote:
>>
>>> Hello Friends,I am new to Catalyst and need to implement FormBuilder.
>>> What i am doing is:
>>> a template called root/src/search2.tt2 with the following content;
>>>
>>> [% META title = "Edit a person" %]
>>> [% FormBuilder.render %]
>>>
>>> a form script on root/forms/search.db
>>>
>>> in controller i have the following function
>>>
>>> sub search2 : Local Form {
>>> my ( $self, $c ) = @_;
>>> $c->stash->{template} = 'project/search2.tt2';
>>> }
>>>
>>> Do I need to do anything extra, i can get a page but without the form.
>>> Pl.help.
>>> --
>>> Thanks and kind Regards,
>>> Abhishek jain
>>>
>>> __
>>
>>
That problem is solved , i have yet another one,
In my form definition i am writing the following:

name: search
method: post
fields:
dom:
label: Dom
type: text
size: 30
required: 1
ext:
label: Ext
type: select
required: 1
fieldopts:
ext:
options:
id1
val1
id2
val2


I need a select option box with the id1 and id2 as option  and val1 and val2
as values.

I am not sure how to do so,
Also where to get help if the next problem arises,
Pl. help.
-- 
Thanks and kind Regards,
Abhishek jain
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/