2008年12月10日星期三

Re: [fw-mvc] Send a Parameter between Actions

You can send a parameter in to an action if you use the actionstack controller plugin accessible via $this->_helper->actionstack(action, controller, module, array('key' => 'value')) where the array parameter at the end receives variable and assignments in key / value pair format.

This may or may not be helpful for you in your specific situation but just fyi.

Note:  the variable is then scoped into the controller object and is accessible via $this->key

Thanks!
--

Paul Shoemaker | LAMP Developer
paul.shoemaker@helloecho.com

echo  |  Hello. Hello.  |  helloecho.com

The information contained in this message is intended only for the use
of the individual or entity named above. If the reader of this message
is not the intended recipient, or the employee or agent responsible for
delivering it to the intended recipient, you are hereby notified that
any dissemination, distribution, or copying of this communication is
strictly prohibited.

Please consider the environment and do not print this email unless necessary.

On Dec 10, 2008, at 4:33 PM, Abraham Block wrote:

You can't send a parameter in, but you can save it in a session variable. If its just a message (and I guess technically  anything, you can use the flashmessenger action helper

On Wed, Dec 10, 2008 at 4:48 PM, Expertics <expertics@gmail.com> wrote:
Hi, I need send a parameter between Actions and  I haven't found the solution.

I have this code in the Controller:
 
class clientController extends Zend_Controller_Action
{
...
   public function  viewAction(){

   }
 
   public function processAction() {
 
      (a) ... Process...
 
      $result = array('id'=>566 , array('p1'=>'6667', 'p2'=>'6668', 'p3'=>'6667', ....);
    
  ===> I like to send an array ( $result as parameter) from here to check(), because I am going to use _redirect  . how i do this?
      $this->_redirect('client/check'); 

   }
 
 
   public function checkAction() {
 
      (*) show the output ( $result)
   }
 
 
In the View :
 
view.phtml  --> it has a form ( <form method="post" action="/client/procces"> )
 
 
Thanks
 
George
 


没有评论: