Hey,

I seem to have an ackward problem in the newsmodel or a controller
using it, even though it should be very simple.

My frontpage uses the 'Nieuws' model and succesfully retrieves all
records in the database.

My 'Nieuws' controller has a function 'toevoegen' ('add' in english),
and also uses the 'Nieuws' model. However, when navigating to
'/nieuws/toevoegen', I get the error

Notice: Undefined property: NieuwsController::$Nieuw in
/cake/libs/controller/controller.php on line 594

The associated statement in cake's code is $table =
$this->{$model}->table;
thus indicating that cake expects my controller to have a model called
'Nieuw' associated with it, and that model obviously doesn't exist. I
did however set the controllers' 'uses' variable to use 'Nieuws'...

A bit of code to support:

class NieuwsController extends AppController {

    var $name = 'Nieuws';
    var $uses = array('Nieuws');

    function toevoegen ()
    {
        $fieldlist = $this->generateFieldNames(); // triggers error
        $this->set('velden',$fieldlist;
    }
}

class Nieuws extends AppModel
{
    var $name = 'Nieuws';
    var $useTable = 'nieuwbouw_nieuws';
}

What the heck is happening here? I don't seem to understand?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to