Hi Kai!

I just extended  Zend_Controller_Action to change dispatch():

        public function dispatch($action)
        {
$method = !empty($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER ['REQUEST_METHOD']) : 'get';
                if (method_exists($this, $action . $method)) {
                        parent::dispatch($action . $method);
                } else {
                        parent::dispatch($action);
                }
        }

If I have a method called indexActionGet() or indexActionPost() it gets called if the request method matches. If not indexAction() is called (or __call() if it doesn't exist).

nico


[06.04.2007 15:15] Kai Meder wrote:

Hello,

everybody knows the form-POSTing problem if you hit the back- or refresh-button: "the page has expired bla bla"...

i want to implement two methods:
editAction():  display form
_editAction(): process form and http-redirect back to editAction()

however, it seems that the routing-process kills the underscore in "_editAction" and calls "editAction" instead.

any best-practice for the POST-problem?

thanks,
kai

Reply via email to