You might want to send your reply to the list as well, so others can help
you with the form stuff :)
Robin
On Thu, Jun 12, 2008 at 4:54 AM, Neriodavid(Wei Dai) <[EMAIL PROTECTED]>
wrote:
> Hi, thanks very much for you detailed response!
>
> 1. Um, ok. I think I need set the 'resetParams' to true even though I
> didn't set up a custom route. After pass the optional params with default
> route and reset params, it is ok now. Thanks.
>
> 2.Actually, I have carefully read the Matthew's article. It is pretty good.
> But, my question is how can I add xhtml/dom element with text node in the
> tags not wrap/prepend/append tags to the Zend_Form_Element objects.
> The only way I can think of is use "Description" decorator. But, I need
> use "Description upon Description" and then set every "Description" with the
> value of the desired text?
>
> 3.This questions is actually a report of (Maybe a little bug?) problem. It
> is that when you add the HtmlTag decorator with the "empty element tag",
> such as "br" or "hr". ZF will use this tag wrap around the element with the
> "<br>" and "</br>", not use "<br />".
>
> 4.I am talking about use the Zend_Auth_Adapter. When I use the
> "setCredentialTreatment" method with "Password(?)" against mysql 5, and in
> the DB, the password column was encoded using the PASSWORD, not the OLD
> PASSWORD, it fails to authenticate. However, When I use MD5, it works.
>
> 5. Thanks for your answer. After I added $db->query('SET NAMES utf8'); in
> my bootstrap, it works!
>
>
> On Wed, Jun 11, 2008 at 6:31 PM, Robin Skoglund <[EMAIL PROTECTED]> wrote:
>
>> 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
>>
>
>