RE: [Catalyst] Catalyst, TT and using new filter

2008-02-05 Thread Peter Sørensen
Thanks that worked.

Below just FYI.

In the meantime I found, that the problem was related to my
minor knowledge to TT. The reason I wanted to trim the output 
was, that the code:

   tdtextarea 
[% FOREACH line IN subscribers %]
[% line | undent %]
[% END %]
   /textarea/td

produces NL in the textarea field. I changed this to:

   tdtextarea 
[%- FOREACH line IN subscribers -%]
[%- line | trim -%]
[% END -%]
   /textarea/td

and got rid of the NL. I was'nt aware of this.

regards

Peter
---


easy filters:

package myApp::View::TT;

use strict;
use base 'Catalyst::View::TT';

__PACKAGE__-config(
{
CATALYST_VAR   = 'catalyst',
...
FILTERS = {
yesno = sub {
$_[0] ? 'yes' : 'no';
},
onoff = sub {
$_[0] ? 'on' : 'off';
},
},
},
);

1;

Peter Sørensen schrieb:
 Hi,

 I am Using catalyst, TT and formbuilder.

 I am struggling with output in a textarea field and would like to 
 install a new filter to TT to be used like:

   tdtextarea 
   [% FOREACH line IN subscribers %]
   [% line | undent %]
   [% END %]
   /textarea/td

 I have tried the standard trim filter but this does not give the expected 
 result.

 I found a post facing the problem, where Andy Wardley suggested a 
 undent filter and supplied code for this.

 My problem is where to put this code so that TT will recognize this 
 filter according to Catalyst.

 Do I need to install this as a new Plugin in TT?


 Regards


 Peter Sorensen/University of Southern Denmark/E-mail: [EMAIL PROTECTED]












 Med venlig hilsen

 Peter Sørensen
 Vid.medarb., IT-service

 Tlf.6550 2858
 Fax 6550 2860
 Email   [EMAIL PROTECTED]
 Web http://intern.sdu.dk/it-service/ansatte/ps-238/
 Adr.Campusvej 55, 5230 Odense M

 SYDDANSK UNIVERSITET
 ___
 Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk
   
   
 -Oprindelig meddelelse-
 Fra: Gavin Henry [mailto:[EMAIL PROTECTED]
 Sendt: 4. februar 2008 11:50
 Til: catalyst@lists.scsys.co.uk
 Emne: [Catalyst] Catalyst and Web Services?

 Hi All,

 If you want to provide access over SSL with auth, i.e. for example a desktop 
 app posting and retrieving info from/to a Catalyst app what's the best way?

 REST or SOAP?

 I want the same users that normalling login via a web browser and get a 
 cookie to be able to login via a light wee desktop app or some such?

 Would you create a new interface/access point on the Cat site and use REST or 
 SOAP?

 All new to me, so excuse the dumb questions.

 Thanks.

 ___
 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/


   


--
Mit freundlichen Grüßen

Felix Antonius Wilhelm Ostmann
--
Websuche   Search   Technology   GmbH  Co. KG
Martinistraße 3  -  D-49080  Osnabrück  -  Germany
Tel.:   +49 541 40666-0 - Fax:+49 541 40666-22
Email: [EMAIL PROTECTED] - Website: www.websuche.de
--
AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310
Komplementärin: Websuche   Search   Technology
Verwaltungs GmbH   -  AG Osnabrück  -   HRB 200359
Geschäftsführer:  Diplom Kaufmann Martin Steinkamp
--


___
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] Catalyst, TT and using new filter

2008-02-04 Thread Felix Antonius Wilhelm Ostmann

easy filters:

package myApp::View::TT;

use strict;
use base 'Catalyst::View::TT';

__PACKAGE__-config(
   {
   CATALYST_VAR   = 'catalyst',
...
   FILTERS = {
   yesno = sub {
   $_[0] ? 'yes' : 'no';
   },
   onoff = sub {
   $_[0] ? 'on' : 'off';
   },
   },
   },
);

1;

Peter Sørensen schrieb:

Hi,

I am Using catalyst, TT and formbuilder.

I am struggling with output in a textarea field and would like to
install a new filter to TT to be used like:

tdtextarea 
[% FOREACH line IN subscribers %]
[% line | undent %]
[% END %]
  /textarea/td

I have tried the standard trim filter but this does not give the expected 
result.

I found a post facing the problem, where Andy Wardley suggested a undent filter
and supplied code for this.

My problem is where to put this code so that TT will recognize this filter
according to Catalyst. 


Do I need to install this as a new Plugin in TT?


Regards


Peter Sorensen/University of Southern Denmark/E-mail: [EMAIL PROTECTED]












Med venlig hilsen

Peter Sørensen
Vid.medarb., IT-service

Tlf.6550 2858
Fax 6550 2860
Email   [EMAIL PROTECTED]
Web http://intern.sdu.dk/it-service/ansatte/ps-238/
Adr.Campusvej 55, 5230 Odense M

SYDDANSK UNIVERSITET
___
Campusvej 55 * 5230 * Odense M * Tlf. 6550 1000 * www.sdu.dk


-Oprindelig meddelelse-
Fra: Gavin Henry [mailto:[EMAIL PROTECTED] 
Sendt: 4. februar 2008 11:50

Til: catalyst@lists.scsys.co.uk
Emne: [Catalyst] Catalyst and Web Services?

Hi All,

If you want to provide access over SSL with auth, i.e. for example a desktop 
app posting and retrieving info from/to a Catalyst app what's the best way?

REST or SOAP?

I want the same users that normalling login via a web browser and get a cookie to be able 
to login via a light wee desktop app or some such?

Would you create a new interface/access point on the Cat site and use REST or 
SOAP?

All new to me, so excuse the dumb questions.

Thanks.

___
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/


  



--
Mit freundlichen Grüßen

Felix Antonius Wilhelm Ostmann
--
Websuche   Search   Technology   GmbH  Co. KG
Martinistraße 3  -  D-49080  Osnabrück  -  Germany
Tel.:   +49 541 40666-0 - Fax:+49 541 40666-22
Email: [EMAIL PROTECTED] - Website: www.websuche.de
--
AG Osnabrück - HRA 200252 - Ust-Ident: DE814737310
Komplementärin: Websuche   Search   Technology
Verwaltungs GmbH   -  AG Osnabrück  -   HRB 200359
Geschäftsführer:  Diplom Kaufmann Martin Steinkamp
--


___
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/