Re: Template-based renderers with QuickForm_Controller? (PART III)
| From: | Bertrand Mansion | Date: | Wed, 07 Apr 2004 14:19:57 +0000 |
| Subject: | Re: Template-based renderers with QuickForm_Controller? (PART III) | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-11700@lists.php.net to get a copy of this message | ||
<Maxim.Volkov@ca.brann.com> wrote :
> Hello everyone,
>
>
>
> I am still trying to make work happily together QuickForm_Controller and
> QuickForm_Renderer so Controller wizard can be templated with Smarty.
>
>
>
> To make meaningful question about problem I am facing I did two examples
> of the same form handled in one case by QuickForm_Renderer and in second
> case modification of Wizard example from latest Pear distro. You can see
> template it self and source code as well.
>
>
>
> -1- Smarty Renderer http://test.ampi.ca/a.html --> Works as
> expected.
>
> -2- However Controller http://test.ampi.ca/A.html -->
> misbehaves!
>
>
>
> PROBLEM 1. Template get parsed (otherwise errors would produce), but it
> won't get populated with form. (The empty box on top of the page printed
> by
>
> $tpl->display(TEMPLATE_DIR . TEMPLATE_PAGE1); line.)
>
>
>
> PROBLEM 2. Form get printed with $page->display(); , but has no intended
> templating. (More correctly it has some default template coming from
> some (from where?) Pear HTML_QuickForm class).
>
>
>
> Should I override more methods? Do I miss something? Does any one has a
> working example of ANY template working with controller?
Probably because you didn't issue:
$page->accept($renderer);
in _renderForm().
Bertrand Mansion
Mamasam