Yii Framework Forum: Question on trying samples in BOOK - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Question on trying samples in BOOK

#1 User is offline   Novice 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 3
  • Joined: 08-September 10

Posted 08 September 2010 - 11:00 AM

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.
0

#2 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 08 September 2010 - 11:01 AM

You can probably check Book's app source code for an answer: http://github.com/jefftulsa/TrackStar
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#3 User is offline   jefftulsa 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 168
  • Joined: 06-October 08
  • Location:Austin, TX

Posted 08 September 2010 - 12:31 PM

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.
0

#4 User is offline   samdark 

  • Having fun
  • Yii
  • Group: Yii Dev Team
  • Posts: 3,778
  • Joined: 17-January 09
  • Location:Russia

Posted 08 September 2010 - 02:29 PM

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.
Yii 1.1 Application Development Cookbook

Enjoying Yii? Star us at github: 1.1 and 2.0.
0

#5 User is offline   jefftulsa 

  • Advanced Member
  • Yii
  • Group: Yii Dev Team
  • Posts: 168
  • Joined: 06-October 08
  • Location:Austin, TX

Posted 09 September 2010 - 08:59 AM

View Postsamdark, on 08 September 2010 - 02:29 PM, said:

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users