> First off, init is called when the form is instantiated and so setting the
> count after the form has been instantiated results in the protected property
> rowCount being set and nothing more.
I'd guessed that :-(
> 1. Pass the count to init directly instead of calling setCount after the
> form has been instantiated
Well init is called from the __construct constructor method.
I tried something naive like:
$form = new DummyForm(array('rowCount' => 2));
But it didn't seem to work.
> 2. Move the loop into a separate method
Where ?
> Also, you want to consider creating a DisplayGroup for
> each row so as to be able to easily reference a given row.
Got that licked already, thanks.
GTG
没有评论:
发表评论