I have

The problem is that i have no physical /shema/list action:

::Controller::Root

sub default : Private {
   .... load template by path,
        i.e. for /schema/list url it processes root/src/schema/list.tt
        (this is because i have many actions which doesn't neet perl work.
Only TT & DBIx::Class)
}



::Controller::Configure

sub index : Private {
    ....
    $c->forward('/schema/list');
}


and i got error
Couldn't forward to command "/schema/list": Invalid action or component.

likely i need to fall in standart dispatch process to do that.
But plugin subrequest executes again auto actions etc. The code is executed
twice.
I need to execute only action i want but i need catalyst to look for it with
all dispatch rules.



2007/3/30, Nilson Santos Figueiredo Junior <[EMAIL PROTECTED]>:

On 3/29/07, Oleg Pronin <[EMAIL PROTECTED]> wrote:
> I cannot forward to the list actions because they are not private
actions
> (they have its own URLs). In docs 'forward' is for private actions.

If the docs state that, they're wrong. It's perfectly possible to
forward to public actions.

> For example you can create url-action which edits some objects and
include
> it in many templates. This is not like
> ordinary template toolkit's include - this component can show itself,
modify
> data, receive request params etc, like
> any web page. And this doesnt depend on whether this action is directly
> called from browser or included in some template.

You could have some thing like this:

sub nice_page : Local {
   my ($self, $c) = @_;
   $c->forward('object1');
   $c->forward('object2');
}

Then, inside nice_page.tt:

[% INCLUDE object1.tt %]
[% INCLUDE object2.tt %]

Should do exactly what you want. And, well, if it doesn't you can
always use Catalyst::Plugin::SubRequest.

-Nilson Santos F. Jr.

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive:
http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to