I know this has been covered before, but as a reminder to people upgrading
to the new MVC code:

If your old controller code used __construct() to setup you controller, you
either need to move that code into a function called init() or fix your
constructor code to allow for the passing of request/response/invokeArgs

The new Zend_Controller_Action class provides a stub function called init()
that you can override to do any controller level setup if needed.

Lee.

On 12/22/06, Lee Saferite <[EMAIL PROTECTED]> wrote:

Actually, a call to $this->_getParam('id') gets translated into
$this->getRequest()->getParam('id') in the Action class.  So, his code
'should' work.  It seems that the internal call to getRequest() is not
returning a valid object.

The source code provided is insufficient to diagnose the problem.  If you
send your setup code, We can give you a better idea of the problem.

The error message you are getting seems like the constructor for your
controller is not setting the Request object, do you have a custom
__construct() function on your controller?  If so you need to either move
that code into the init() function or make your __construct function accept
the correct parameters and call the parent constructor.

Lee.

On 12/22/06, Simon Mundy <[EMAIL PROTECTED]> wrote:
>
> Hi Lindemann
>
> The '_getParam' method was used previously to retrieve request variables
> from the dispatcher token. However, you've now got a request object that
> takes care of that instead.
>
> Try:-
>
> $request = $this->getRequest();
> $id = $request->id;
>
> ...from inside your action.
>
>  * Source Code:*
>
>  $zielgruppe_id = $this->_getParam('id');
>
>
>  --
>
> Simon Mundy | Director | PEPTOLAB
>
> """ " "" """""" "" "" """"""" " "" """"" " """"" "  """""" "" "
> 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
> Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
> 4124
> http://www.peptolab.com
>
>
>

Reply via email to