I want a drop down in my form populated from a table
The model is called WebPage.php
in the model I create two functions they are identical except for name
public function something()
{
$a = $this->findAll();
return $a;
}
public function somethingelse()
{
$a = $this->findAll();
return $a;
}
In the form partial view the following code works
<?php echo CHtml::activeDropDownList($model,'KeyphrasePagePage',CHtml::listData(WebPage::model()->something(),'WebPageID','WebPageName')); ?>
The following code does not work
<?php echo CHtml::activeDropDownList($model,'KeyphrasePagePage',CHtml::listData(WebPage::model()->somethingelse(),'WebPageID','WebPageName')); ?>
It gives the following error
Quote
CException
Description
WebPage does not have a method named "somethingelse".
Description
WebPage does not have a method named "somethingelse".
It's like something is not being re-initialized or something is cached, I am confused!!
I cleared the browser cache. Closed the browser tab, logged out of the session, weird!
Specs:Yii version 1.1a
Server:apache2
OS:linux
Browser:firefox
Thanks for any help you can give me
doodle

Help
















