Question on trying samples in BOOK

Dear all experts,

I’m a newbie to Yii. Actually I tried to study Prado before but I felt quite hard to enter.

I found some comments about Yii from Qiang. Then I turned to look this framework for my web development.

I started to learn Yii from the book: Agile Web Application Development with Yii1.1 and PHP5.

I followed all the steps to Chapter 6. It seems everything alright. However, one page that I tried appeared problem.

That’s the update page of Issue. This page didn’t be talked in the book. The problem is: the output of the line “<?php echo $form->dropDownList($model,‘owner_id’, $this->getProject()->getUserOptions()); ?>” is error OR null and terminated in the page of views/issue/_form.php.

In issue->Create page, it’s fine. In Issue->View page, it’s also OK. But in Issue->Update page, it’s terminated at some point.

I had tried to print out the value of "$this->getProject()->getUserOptions()", the output is NULL.

I don’t know why!!! Any expert can tell me what happened.

You can probably check Book’s app source code for an answer: http://github.com/jefftulsa/TrackStar

A quick comment:

If the book actually covered every detail of creating a fully complete application, there would be a lot of repetition and, what is already a long book would have been about twice as long. The book intentionally leaves some of the application implementation up to the reader. Consequently, there are features of the application that may need to be implemented by the reader. For example, if the "U"pdate in CRUD functionality was covered using the project entity, we may leave the "U"pdate of other domain objects up to the reader to implement. The code that samdark mentions is no more (nor less) complete than what is covered in the book, so it also will have some intentional functionality gaps, and may not provide an immediate answer to your question.

Qiang was kind enough to create a new forum to house all of the yii book discussions:

http://www.yiiframew…ok-discussions/

I will be monitoring this forum and will work to answer questions and address as many issues as I can.

As for your specific question, Novice, I will take a look at what you have against the code that was developed for the book and help fill in the gaps for this specific piece that may not have been covered.

jefftulsa

Maybe we’ll create a “Book FAQ and errors” sticky topic and you’ll post found typos? This way it will be easy for reader to find his answer and for you to get all these to second edition of the book if there will be one.

Sounds like a good idea, Samdark. I will compile a short list of items to get it started and create that topic soon. Thanks.