[fw-general] Zend_Form upload file

2010-03-16 Thread Jacky Chen
Hi, i have found that Zend_Form_Element_File ignore no file option would not work if the form that submited is missing that file element. let's say,there is a form that upload a file to the server, any text: upload file: and the Zend_Form as this, addElement($any); $uploadFile = new

[fw-general] zend_db_table::fetchRow() always fetch the first row

2009-08-05 Thread Jacky Chen
Hi there, if the Zend_Db_Table::fetchRow() always return the first row from the result is correct? because i want to fetch one row from the result set also by offset,such as this, // $table is an object of a class that extends Zend_Db_Table $select = $table->select()->limit(1, rand(0,100)); $row

[fw-general] create form element problems

2009-08-05 Thread Jacky Chen
Hi there, when i create a form element with pluginLoader in the options, like this, $text = new Zend_Form_Element_Text('name',array( 'pluginLoader' => new Zend_Loader_PluginLoader(array( 'My_Path_Prefix'=>'My/Path/Prefix')) )); it throw the exception like following: An error oc

Re: [fw-general] Bug with zend_file addValidator method

2009-08-03 Thread Jacky Chen
rror messages for the validator. Best regards Jacky 2009/3/31 Thomas Weidner > So you propose that Zend_Form_Element_File and Zend_File_Transfer should > not behave the same like all other Zend_Form_Element's ? > > This would be unlogically and lead to a difference between the

Re: [fw-general] problem with form file element

2009-04-24 Thread Jacky Chen
> with it. > > You should read here for details: > > http://www.thomasweidner.com/flatpress/2009/04/17/recieving-files-with-zend_form_element_file/ > > Greetings > Thomas Weidner, I18N Team Leader, Zend Framework > http://www.thomasweidner.com > > > - Original Me

Re: [fw-general] problem with form file element

2009-04-24 Thread Jacky Chen
sorry,Thomas,here is the code, setEnctype('multipart/form-data'); $form->addElement('file','upload',array('label'=>'choose file','destination'=>realpath('.'))); $form->upload->setDecorators(array('Label','File','Description','Errors')); $form->addElement('submit','submit'); if ($this->_request->isP

[fw-general] problem with form file element

2009-04-24 Thread Jacky Chen
Hi there, when i update the latest zend framework from svn, then the form with file element was failed when submit the form with a file to upload. It would get the error message like The file 'x' was not found . what's wrong with it? How should i fixed it?Thanks. Best Regards Jacky

Re: [fw-general] about zend_form_element_file error messages

2009-03-31 Thread Jacky Chen
554 and the related lines of code look similar > to the actual branch 1.7. > > Greetings > Thomas Weidner, I18N Team Leader, Zend Framework > http://www.thomasweidner.com > > - Original Message - From: "Jacky Chen" > To: > Sent: Tuesday, March 31,

Re: [fw-general] about zend_form_element_file error messages

2009-03-31 Thread Jacky Chen
file->getMessages()); > } > } > print ""; > > ?> > > > > Test > > > render(new Zend_View());?> > > > ----- > and the output I am getting is > Array ( [fileUploadErrorFileNotFou

[fw-general] about zend_form_element_file error messages

2009-03-30 Thread Jacky Chen
Hi, is it not implement the error messages process for the form file element just now,or missing that? no error messages are assign to the form file element after the file adapter validated the file element. Best Regards, Jacky

[fw-general] Bug with zend_file addValidator method

2009-03-30 Thread Jacky Chen
Hi there, there is a bug for the method addValidator in Zend_File Adapter,it should construct the validator instance after unset the options with messages. Best Regards, Jacky

[fw-general] Re: bug with Zend_Form_Element_Checkbox

2009-03-22 Thread Jacky Chen
is->_request->isPost() && $form->isValid($this->_request->getPost()) { print_r($form->getValues()); } $this->view->form = $form; } } 2009/3/23 Jacky Chen > Hi there, > there is a bug with the Zend_Form_Element_Checkbox, when i

[fw-general] bug with Zend_Form_Element_Checkbox

2009-03-22 Thread Jacky Chen
Hi there, there is a bug with the Zend_Form_Element_Checkbox, when i added a Checkbox element, with the checkValue 1 and unCheckedValue 0, to the form, and then render it with this banner,$this->form->checkElement->renderViewHelper(), then post the form with the checkElement unchecked to the same p

[fw-general] headScript helper problem

2009-03-12 Thread Jacky Chen
Hi guys, i enable zend_layout in my application, there are four template files, layout.phtml, header.phtml, index.phtml, footer.phtml ,to render. layout.phtml is the layout template,and header.phtml and footer.phtml rendered in layout.phtml,the code as following: layout.phtml -

[fw-general] how to write such route

2009-03-06 Thread Jacky Chen
hi guys, i want to add a router that match any characters but not match the word "manage",for example,it would match /home , /news , /blog , but /manage should not be matched. how to write such a route? thanks. Greetings, Jacky

[fw-general] rename filter not work correctly

2009-03-03 Thread Jacky Chen
Hi zfer, it seem that the file rename filter not work correctly,it not rename the file when i upload the file first,but it worked when i upload the same file after the first. for example,i add a rename filter that set target to c.jpg,and then upload a file named a.jpg,but the uploaded file would re

[fw-general] about the code in the Zend_Controller_Action::__call()

2008-09-24 Thread Jacky Chen
Hi, let's look at the code of the method __call() of the Zend_Controller_Action: public function __call($methodName, $args) { if ('Action' == substr($methodName, -6)) { require_once 'Zend/Controller/Action/Exception.php'; $action = substr($methodName, 0, st

[fw-general] about params in Front and Dispatcher

2008-09-24 Thread Jacky Chen
Hi, I want to render views by viewRenderer automatic for a module, and another one by manual.For example,i want that admin module to render view by viewRenderer,and default module to render view by explicit. so i setParam('noViewRenderer', true) in the bootstrap file,and register a plugin to hook

[fw-general] about invokeArgs in the front controller and dispatcher

2008-09-24 Thread Jacky Chen
Hi, i set noViewRenderer to true by default in the bootstrap file before dispatch start, and check the module name in a controller plugin that hook the preDispatch event to switch on/off to the viewRenderer,if there is admin module,following code would be called in the plugin preDispatch() method:

Re: [fw-general] Bug with Zend_File_Transfer

2008-09-18 Thread Jacky Chen
Leader, Zend Framework > http://www.thomasweidner.com > > ----- Original Message - From: "Jacky Chen" <[EMAIL PROTECTED]> > To: > Sent: Friday, September 19, 2008 8:47 AM > Subject: [fw-general] Bug with Zend_File_Transfer > > > > it seem that each validat

[fw-general] Bug with Zend_File_Transfer

2008-09-18 Thread Jacky Chen
it seem that each validation for the file elements in the zend_form would validate all of the file elements in the form.it means that if there have two file elements in the form,says A and B. So isValid() for the element A is called,it would validate A and B,not just A. So if i want to upload two

[fw-general] Bug with Zend_File_Transfer

2008-09-11 Thread Jacky Chen
Hi there, there is a bug in the Zend_File_Transfer_Abstract::setOptions() , the code in the setOptions() as bellow: if (is_array($options)) { $this->_options += $options; } Maybe the following code should it be: if (is_array($options)) { $this->_options = $options + $this->_option

[fw-general] Re: about file rename filter

2008-09-10 Thread Jacky Chen
Sorry, the code $upload->addFilter('cba.js',true) incorrect. it should be $upload->addFilter('rename',array('cba.jpg', true)); 2008/9/11 Jacky Chen <[EMAIL PROTECTED]> > Hi guy, > > Let's say that i want to rename the upload file abc.jp

[fw-general] about file rename filter

2008-09-10 Thread Jacky Chen
Hi guy, Let's say that i want to rename the upload file abc.jpg to cba.jpg just after the file is complete upload in the form,how can i add the rename filter to the form? of course,i can add the filter like this $upload->addFilter('cba.jpg', true) if i know that the file that would be upload is a

[fw-general] custom error message doesn't display with Zend_Form_Element_File

2008-09-07 Thread Jacky Chen
Hi, I add a NotExists validator to a file element with custom error message,but the validator just display the default DOES_EXISTS error message.

[fw-general] how to set error message for Required form validator?

2008-07-13 Thread Jacky Chen
Hi, how to set error message for required form validator? there is a username element that required is true, then three validators are added to it.The first is notEmpty validator with message "now allow empty",the second is stringLength validator with options of array(1,20,'messages'=>'username mu

[fw-general] is there a proposal about jquery?

2008-07-10 Thread Jacky Chen
Hi all, is there a proposal about jquery? have some one plan to integrate it into zend framework? jquery is a wonderful javascript library, in my opinion, powerful and easy use, i look forward some one to integrate it into zend framework.

Re: [fw-general] about filters and validators order in Zend_Form

2008-07-09 Thread Jacky Chen
thanks. > We plan on having both the current prefilter, as well as a postfilter; > I'm not sure that this will make 1.6, however. that sounds great! Thanks your great job! 2008/7/10 Matthew Weier O'Phinney <[EMAIL PROTECTED]>: > -- Jacky Chen <[EMAIL PROTECTED]>

[fw-general] about filters and validators order in Zend_Form

2008-07-09 Thread Jacky Chen
Hi, in the Zend_Form of current implement,filters is apply before validators,but i want to filter data after form is validate. For example,in the regiser form,i have to validate the field password not empty,and than filter it with the MD5 filter. I think it is best that developer can set the filt

[fw-general] how to get format action name without Action suffix?

2008-07-09 Thread Jacky Chen
Hi, I want to get the format action name,but there just a method in Zend_Controller_Dispatcher_Abstract::formatActionName($unformatted), but it return the action name with the Action suffix. because action name or controller name can be, get.data,or get-data, for example.If i call the method getA

[fw-general] about setLayout() method in layout view helper

2008-07-05 Thread Jacky Chen
Hi, there is a method of *setLayout(Zend_Layout $layout)* in the view helper of *Zend_View_Helper_Layout*, how to call this method? the code, * $this->layout(),* in the view just return the instance of the *Zend_Layout*, not the *Zend_View_Helper_Layout* instance. in the view file: layout()->setL

[fw-general] how can i set list separator in zend_form?

2008-05-06 Thread Jacky Chen
Hi all, I want render multiCheckbox or Radio with no \n separator in Zend_Form,how can i do that? I look for the code at Zend_Form_Decorator_ViewHelper,there is no listsep parameter to be passed. Best Regards. Jacky

Re: [fw-general] is it a bug or not?

2008-05-03 Thread Jacky Chen
thanks your reply,Matthew. 2008/5/3 Matthew Weier O'Phinney <[EMAIL PROTECTED]>: > -- Jacky Chen <[EMAIL PROTECTED]> wrote > (on Saturday, 03 May 2008, 03:54 PM +0800): > > I add an select element to the Zend_Form,like this, > > > > $course = new Zend_F

[fw-general] is it a bug or not?

2008-05-03 Thread Jacky Chen
Hi, I add an select element to the Zend_Form,like this, $course = new Zend_Form_Element_Select('course[]'); $form->addElement($course); And,the name of the course element would be course,not course[],except that i set the multiple attribute of the element to true. But i won't this style of multip

[fw-general] bug with Zend_Loader

2008-04-24 Thread Jacky Chen
Hi, file_exists() function can't detect the file included with include_path. the rv9295 of Zend_Loader::isReadable() detect a file if readable as following: if (!file_exists($filename) || !$fh = @fopen($filename, 'r', true)) { return false; }

[fw-general] bug with Zend_Form_Decorator_ViewHelper

2008-04-16 Thread Jacky Chen
Hi there, In the render method of Zend_Form_Decorator_ViewHelper,there is missing the fifth argument that Zend_View_Helper_FormMultiCheckbox and other helpers that need the listsep argument. Best Regards.

[fw-general] how to add file field to zend_form

2008-04-11 Thread Jacky Chen
Hi All, How can i add file field to Zend_Form? Best Regards.

[fw-general] how to set dependent element in Zend_Form

2008-04-09 Thread Jacky Chen
Hi All, I want to validate an element that it depend on another element is set.Can i do that in Zend_Form, if yes, and how? Best Regards

Re: [fw-general] is it a bug with Zend_View_Helper_FormCheckbox?

2008-03-24 Thread Jacky Chen
and how can i use checkbox in the Zend_Form? 2008/3/24, Matthew Weier O'Phinney <[EMAIL PROTECTED]>: > > -- Jacky Chen <[EMAIL PROTECTED]> wrote > (on Monday, 24 March 2008, 05:06 PM +0800): > > > i found that view helper of formCheckbox not display opti

[fw-general] is it a bug with Zend_View_Helper_FormCheckbox?

2008-03-24 Thread Jacky Chen
Hi there, i found that view helper of formCheckbox not display options elements,is it a bug or not?

[fw-general] bug with Zend_Controller_Request_Http::setParam

2008-01-02 Thread Jacky Chen
Hi, in the method setParam of Zend_Controller_Request_Http,the code like this: public function setParam($key, $value) { $keyName = (null !== ($alias = $this->getAlias($key))) ? $alias : $key; parent::setParam($key, $value); return $this; } is it sould parent

Re: [fw-general] Zend_Mail Bug?

2007-12-28 Thread Jacky Chen
return '=?' . $this->_charset . '?Q?' . $quotedValue . '?='; } } if change it like this: protected function _encodeHeader($value) { if (Zend_Mime::isPrintable($value)) { return $value; } else { return '=?&

Re: [fw-general] Zend_Mail Bug?

2007-12-28 Thread Jacky Chen
n false; } and the subject and body contains Chinese characters. 2007/12/29, Simone Carletti <[EMAIL PROTECTED]>: > > > It would be helpful if you post here a sample code you use for sending > emails. > A real example would be wonderful. :) > > -- Simone > &

[fw-general] Zend_Mail Bug?

2007-12-27 Thread Jacky Chen
Hi all, I send mail with Zend_Mail,and i received the mail body as following.What is the problem? =E5=96=84=E8=B5=84=E6=96=99?= Content-Type: multipart/alternative; charset="utf8"; boundary="=_a63f032d182e04daf6311fe5329bef65" MIME-Version: 1.0 --=_a63f032d182e04daf6311fe5329bef65 Content-Type:

Re: [fw-general] how to set timezone depend on locale

2007-09-04 Thread Jacky Chen
create a relation (array, > db,...) > > between timezone and locale yourself. > > I dont know any project in the wild wild world which adds this natively. > > > > Greetings > > Thomas > > I18N Team Leader > > > > > > - Original Message --

[fw-general] how to set timezone depend on locale

2007-09-04 Thread Jacky Chen
Hi there, I want to set timezone depend on the user locale,how to do it? Best Regards, Jacky

[fw-general] about the url view helper

2007-08-01 Thread Jacky Chen
Hi list, when i use the view helper of Url,i met a problem.what i want is to use the url helper to construct the right url for the right router. for example,when i use the default router,it construct the url as * /news/read/id/1* for me as i call * $this->url(array('controller'=>'news','act

Re: [fw-general] is it a bug?

2007-05-16 Thread Jacky Chen
sorry,i make a mistake,it isn't any errors on the table relationships.i am so sorry. Regards, Jacky 2007/5/16, Jacky Chen <[EMAIL PROTECTED]>: As the example in the manual of Zend_DB_Table_Relationships array( 'columns' => 'reported_by&

Re: [fw-general] is it a bug?

2007-05-15 Thread Jacky Chen
=> array( 'columns' => array('verified_by'), 'refTableClass' => 'Accounts', 'refColumns'=> array('id') ), 'Product' => array( 'c

[fw-general] is it a bug?

2007-05-15 Thread Jacky Chen
Hi list, In Zend_Db_Table Relationships,if there are two or more tables with the same primary key in the table _referenceMap,exception would be throw.I don't know if it is a bug. Regards Jacky

Re: [fw-general] route problem

2007-04-18 Thread Jacky Chen
Thank you,Martel. 2007/4/19, Martel Valgoerad <[EMAIL PROTECTED]>: Jacky Chen wrote: > Hi all, > I want to specify a url such as > http://localhost/index.php?controller=index&action=view > <http://localhost/index.php?controller=index&action=view> and have

[fw-general] route problem

2007-04-17 Thread Jacky Chen
Hi all, I want to specify a url such as http://localhost/index.php?controller=index&action=view and have it dispatch properly,how?

[fw-general] question about zend_db_table

2007-04-09 Thread Jacky Chen
Hi there, how can i query limit rows from zend_db_table,if the query result is large.And also the Zend_Db_Table Relationships. Best Regards, Jacky

[fw-general] problem for zend_feed

2007-03-22 Thread Jacky Chen
Hi,there i met a problem when i produce a rss feed.How can i encode the entry title?If the entry title contain the & char,a warning would occure. *Warning*: DOMDocument::createElement() [function.DOMDocument-createElement]: unterminated e

[fw-general] can one module adds more than one controller directory?

2007-03-08 Thread Jacky Chen
i just want to add more than one controller directory to one module. for example: ... $front->addControllerDirectory("./controllers/n1","news"); $front->addControllerDirectory("./controllers/n2","news"); As that the controller directory would be "./controllers/n2",not the two.

[fw-general] match path problem

2007-01-18 Thread Jacky Chen
Hi there, I want to add two routers,one to match the path such as http://myhost/actionor http://myhost/action?querystring and another match the path such as http://myhost/controller/action .How? Best Regards, Jacky

[fw-general] bug in route

2007-01-18 Thread Jacky Chen
Hi there, Sorry for my english,i just point out the bug with codes. bootstrap file code: // index.php $router = new Zend_Controller_RewriteRouter(); $router->addRoute('passport',new Zend_Controller_Router_Route(':action',array('controller'=>'passport','action'=>'login'))); $front = Zend_Controlle

[fw-general] bug in route

2007-01-14 Thread Jacky Chen
Hi there, i has wrtie a passport controller PassportController,there are three actions,loginAction,logoutAction,registerAction. When i invoke these action with a query string end up with index.php,and then the action was be redirect to the default action,loginAction. defaut route is: $router = ne

[fw-general] bug in Zend_Controller_Front

2006-12-11 Thread Jacky Chen
*Warning*: Zend_Controller_Front::require_once(Zend/Controller/Request_Http) [function.Zend-Controller-Front-require-once]: failed to open stream: No such file or directory in * E:\workplace\fz\zend\Zend\Controller\Front.php* on line

Re: [fw-general] bug in Zend_Controller_Front

2006-12-07 Thread Jacky Chen
Anything is ok when i use the old files of Zend/Controller,but it failed if use the new Zend/Controller files. my app directory layout is: app |--- controllers ||- IndexController.php ||- news || |- NewsController.php |

Re: [fw-general] bug in Zend_Controller_Front

2006-12-07 Thread Jacky Chen
I had updated the svn,when i running my app,i get this exception message: Array ( [0] => Zend_Exception Object ( [message:protected] => File "\IndexController.php" was not found. [string:private] => [code:protected] => 0 [file:protected] => H:\fzwc\zend\Zend.php [line:protected] => 200 [trace:pri

Re: [fw-general] bug in Zend_Controller_Front

2006-12-07 Thread Jacky Chen
2006/12/7, Matthew Weier O'Phinney <[EMAIL PROTECTED]>: -- Jacky Chen <[EMAIL PROTECTED]> wrote (on Thursday, 07 December 2006, 03:55 PM +0800): > In new Zend_Controller_Front (svn 2172) implement,the setControllerDirectory() > and dispatch() methods have been modifi

[fw-general] bug in Zend_Controller_Front

2006-12-06 Thread Jacky Chen
Hi, In new Zend_Controller_Front (svn 2172) implement,the setControllerDirectory() and dispatch() methods have been modified.In the code line 630,there is set the dispather controller directory in the dispatch() method.So in my bootstrap file index.php , my code like this: ... *$rout = new Zend_Co

[fw-general] Route problem

2006-11-28 Thread Jacky Chen
Hi, when there are no actions match in the controller,the noRouteAction should be call,but it isn't. ( incubator/library )

[fw-general] problems about Zend_Db_Table

2006-11-26 Thread Jacky Chen
Hi, I met some problems when i use Zend_Db_Table in my application.In my app,many tables have two or more primary keys,but Zend_Db_Table can only set one primary key.And another problem is,when finding one or many records with Zend_Db_Table,if no record is found,it return an Zend_Db_Table_Row obje

Re: [fw-general] bug in Zend/Controller/Dispatcher.php

2006-11-26 Thread Jacky Chen
Thanks your reply,Matthew.I had solved the problem. Regards 2006/11/25, Matthew Weier O'Phinney <[EMAIL PROTECTED]>: -- Jacky Chen <[EMAIL PROTECTED]> wrote (on Friday, 24 November 2006, 05:53 PM +0800): > Hi > when i run my app under linux,i got the error: > Fatal

[fw-general] bug in Zend/Controller/Dispatcher.php

2006-11-24 Thread Jacky Chen
Hi when i run my app under linux,i got the error: *Fatal error*: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Directory "mnt/hdb/web project/fz/web/controllers/news" not found or not readable' in /mnt/hdb/web project/fz/zend/Zend/Controller/Dispatcher.php:146 Stack trace

Re: [fw-general] bug with Zend_Http_Request

2006-11-18 Thread Jacky Chen
Hi,Matthew you just corrected the *$count($segs)* bug.And the bug with the methods of Zend_Http_Request hasn't corrected yet. */** * Base URL of request * @var string */ protected $_baseUrl = ''; * */** * Base path of request * @var string */ protected $_ba