FAQ
I am using JSON in one or two places (for ajax) and TT elsewhere.

For some reason "make test" has started forwarding to JSON by
*default* even though the test server still sends to TT.

If you have more than one view type, what determines which is used by default?

thanks!

Daniel

Search Discussions

  • Todd Holbrook at Jun 4, 2008 at 10:08 pm

    On Wed, Jun 4, 2008 at 1:54 PM, Daniel McBrearty wrote:

    I am using JSON in one or two places (for ajax) and TT elsewhere.

    For some reason "make test" has started forwarding to JSON by
    *default* even though the test server still sends to TT.

    If you have more than one view type, what determines which is used by
    default?
    You should set default_view in your config as soon as you add a second view.
    Just use the part of the package name after "View::", so "TT" in your case.

    Todd
    --
    Todd Holbrook
    Dream Theory Studios Inc.
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20080604/9c1f79a9/attachment.htm
  • Aristotle Pagaltzis at Jun 4, 2008 at 10:10 pm

    * Daniel McBrearty [2008-06-04 23:05]:
    If you have more than one view type, what determines which is
    used by default?
    perldoc Catalyst

    If the name is omitted, it will look for
    - a view object in $c->stash{current_view_instance}, then
    - a view name in $c->stash->{current_view}, then
    - a config setting 'default_view', or
    - check if there is only one view, and return it if that's the case.

    Similar rule for the model, btw.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.org/>
  • Daniel McBrearty at Jun 4, 2008 at 10:23 pm
    thanks both!
    On Wed, Jun 4, 2008 at 11:10 PM, Aristotle Pagaltzis wrote:
    * Daniel McBrearty [2008-06-04 23:05]:
    If you have more than one view type, what determines which is
    used by default?
    perldoc Catalyst

    If the name is omitted, it will look for
    - a view object in $c->stash{current_view_instance}, then
    - a view name in $c->stash->{current_view}, then
    - a config setting 'default_view', or
    - check if there is only one view, and return it if that's the case.

    Similar rule for the model, btw.

    Regards,
    --
    Aristotle Pagaltzis // <http://plasmasturm.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/


    --
    Daniel McBrearty
    email : danielmcbrearty at gmail.com
    http://www.engoi.com
    http://danmcb.vox.com
    http://danmcb.blogger.com
    find me on linkedin and facebook
    BTW : 0873928131

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedJun 4, '08 at 9:54p
activeJun 4, '08 at 10:23p
posts4
users3
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase