[Jifty-commit] r2226 - jifty/trunk/lib/Jifty/Manual
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Thu Nov 30 06:57:22 EST 2006
Author: agentz
Date: Thu Nov 30 06:57:19 2006
New Revision: 2226
Modified:
jifty/trunk/lib/Jifty/Manual/Actions.pod
Log:
[Manual/Actions.pod]
- made the $id args optional in the sample code.
- added internal links to L</monikers>.
Modified: jifty/trunk/lib/Jifty/Manual/Actions.pod
==============================================================================
--- jifty/trunk/lib/Jifty/Manual/Actions.pod (original)
+++ jifty/trunk/lib/Jifty/Manual/Actions.pod Thu Nov 30 06:57:19 2006
@@ -248,23 +248,25 @@
view page template may have the following piece of code in it:
<%args>
- $id
+ $id => undef
</%args>
<%init>
- my $result = Jifty->web->response->result('post');
+ my $result = Jifty->web->response->result('post_blog');
$id = $result->content('id') if $result and !defined $id;
# load the record by $id and other stuff go here...
</%init>
-where C<'post'> is the moniker of your post page action. In fact, that's
-exactly how actions "return" values to other templates in your application.
+where C<'post_blog'> is the moniker for your post page action object.
+In fact, that's exactly how actions "return" values to other templates
+in your application. Note that the whole data passing process happens
+completely on the server-side, so no serialization is required here.
+
+It should also be mentioned that the response object is "per request". That is,
+it usually can't live up to another user request. Therefore, when paging mechanism
+is applied to your view page, for example, you have to either pass some data
+to the link constructor or explicitly tell Jifty to preserve states for you.
-It should be mentioned that the response object is "per request". that is,
-it usually can't live across links. Therefore, when paging is added to your view
-page, for example, you need to either pass some data to the link as C<args>
-or explicitly tell Jifty to preserve states for you.
-
-See the source code of Jifty's Pony site and L<Jifty::Request::Mapper> for some
+See L</monikers>, the Jifty Pony site's source, and L<Jifty::Request::Mapper> for some
more information.
=head2 USING ACTIONS
More information about the Jifty-commit
mailing list