Not trying to swamp you guys but here as another TODO I'm throwing
out.. Fortunately it should be easy to fix especially since you all
have been in their refactoring and all.

I've run into this problem again. Basically it is that Maypole has no
place to stash miscelannoous stuff while in the Model processing.

This is a problem when you internal_redirect.  You cannot always use
$r->objects because Maypole wil fill that automatically and it is
basically reserved for objects of the
model type..

Here is my case:  I redirect back to punch_clock/index from "do_punch"
returning the
current punch that was just done by an employee/user.

sub do_punch : Exported {
   ...
   my $emply_punch = $self->create_from_cgi($r);
   $r->redirect('/punch_clock/index');
 ##############  PROBLEM HERE #############################
  There is no place to put the new punch obcject so it is available in
  index.  I can *NOT*  put it in $r->objects because
 index then has to determine if the object is the employee's last
punch or if it is a random punch beckase the user typed in a url like
"/punch_clock/index/35"  .

See? So we need a place  to stash named variables for actions. So in
do_punch I would say
$r->stash->{emply_punch} = $emply_punch;
$r->redirect(punch_clock/index);

 I know catalyst has "stash". Maybe we can think of a better name :)


pjs


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to