Hey

On Wed, Jun 11, 2008 at 10:15 AM, Neriodavid(Wei Dai) <[EMAIL PROTECTED]>
wrote:

> Hi,
>   I am using Zend Framework develop a project. So far, it is going good.
>
>  However, I have some questions wondering if anyone can help me:
>
> 1.view: $this->url() problem.
>   When use it on a page with other links which may have addition params at
> the end of the url, the additional params will also
>   append to the out put of the $this->url().


When using the URL view helper (and the action helper), we often tend to
overlook the optional parameters. These are: 'route' and 'resetParams',
which both have weird (wrong) default values. If you don't specify route,
the helper will use the current route, so you should almost always specify
that you want to use 'default' route. The other parameter, 'resetParams'
should explain itself. Just play around a little with those :)


>
>
> 2.how to decorate a form to allow html/dom element in between form element?
>    I have a well designed form with many table cell and heading text in it.
> How do I achive, e.g.:
>
>   <tr><td>type:</td>               <td>url:</td></tr>
>   <tr><td>Element_Label</td> <td>an object of
> Zend_Form_Element_Text</td></tr>
>
> 3.add custom form decorator HtmlTag, when tags are br, hr ... empty tag, it
> generate <br></br> and <hr></hr>.


This tutorial by Matthew - who created Zend_Form - should get you started:
http://devzone.zend.com/article/3450-Decorators-with-Zend_Form


>
>
> 4. CredentialTreatment('Password(?)') doesn't work.


Not sure what you're talking about here, so I'm afraid I can't help.


>
>
> 5.how to set ZF so that the data send to utf-8 mysql database not resulted
> in unrecognized text? I am not use $db->query, I do DB query mostly on the
> Table level, it means, I almost always use save(), delete().


First of all, you need to be sure that the data you send actually  _is_
UTF-8. Second, you need to make sure you have a UTF-8 compatible collation
on your columns (which I'm sure you already know). Third, try using
$db->query('SET NAMES utf8'), where $db refers to your database adapter
instance.


Robin Skoglund

Reply via email to