Re: [fw-general] Best coding practice? Form takes too long to load now.

2009-03-06 Thread Christoph Dorn
bytte wrote: Hey that was interesting. I have the indexes defined and I see though Firebug that there's currently 381 queries being performed at 0.14949 seconds. I guess that means they're not the culprit? 381 DB queries is a lot of queries for a single web page. Even if they only take 0

Re: [fw-general] Dijit elements and xhrPost

2009-03-06 Thread mapes911
I figured it out. I had to go through and destroy each dijit element when i reloaded the page so that it did not exist at the moment that dojo parsed the new html. something like this did the trick dijit.byId(widgetId).destroy(true); thanks guys! mapes911 wrote: > > hmmm ok. > > in my case i

Re: [fw-general] Zend_Form_Element_Checkbox not populating state?

2009-03-06 Thread Mon Zafra
It appears that checkboxes need to set a couple of public properties before rendering $newsletterOptin->options = array( 'checked' => $newsletterOptin->getCheckedValue(), 'unChecked' => $newsletterOptin->getUncheckedValue() ); Kinda nasty. It's probably nicer to use the decorators the usu

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread Mon Zafra
The label wrapping logic is hardcoded in the view helper, specifically Zend_View_Helper_FormRadio. Overriding that logic would involve a lot of code duplication. If you're fine with that: - create a file named MyMultiCheckbox.php in your application/views/helpers directory class Zend_View_Helper_

Re: [fw-general] Zend_ProgressBar (Ideas?)

2009-03-06 Thread Ben Scholzen 'DASPRiD'
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 A bit late, but, you should just use jsPull with the persistentNamespace. ... : ___ _ ___ ___ ___ _ ___: : | \ /_\ / __| _ \ _ (_) \ : : | |) / _ \\__ \ _/ / | |) | : : |___/_/:\_\___/_| |_|_\_|___/

RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread fire-eyed-boy
Ah oke, I see what you mean now. No, I am using the ViewScript on the whole form. So I have some more control over the placement of the elements in my ViewScript. The PrepareElements decorator makes sure that the forms elements are all made aware of the view and possible translators as far as I

[fw-general] Zend_Form_Element_Checkbox not populating state?

2009-03-06 Thread fire-eyed-boy
Hi all, With my Zend_Form I'm populating a single optin checkbox. After submission, when the form is not valid and is rerendered, it fails to have remembered the checkbox's state. It seems to populate a default value of "0" in the hidden element (which I think is correct) but also in the chec

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread Mon Zafra
No problem, I'm glad my suggestions worked for you. By 'echoing the whole form', I mean you were doing a form ?> in the view. I thought you were using ViewScript on the elements only and not the form. renderForm() is only useful if you're doing something like // controller $this->view->form = new

Re: [fw-general] how to write such route

2009-03-06 Thread keith Pope
You could use a negative lookaround regex in the validator 2009/3/6 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

RE: [fw-general] how to write such route

2009-03-06 Thread Vincent de Lau
You could use a regular expression route, a custom route or you could a route that just catches /manage. Vincent de Lau vinc...@delau.nl From: Jacky Chen [mailto:jacky...@gmail.com] Sent: Friday, March 06, 2009 5:30 PM To: fw-general@lists.zend.com Subject: [fw-general] how to write such

RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread fire-eyed-boy
Works like a charm Mon. Thanks again. I'm not sure though what you mean by echoing the whole form. If you mean echo each individual element with $form->element->someElement->renderViewHelper() then yes. Anyway, the decorators are starting to make sense more and more now. The decorator hierar

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread Mon Zafra
I see that you're echoing the whole form. There's no need for renderForm() in that case. Just put the Form decorator after ViewScript. The output of the ViewScript will be wrapped by that way. -- Mon On Sat, Mar 7, 2009 at 12:33 AM, wrote: > I gues I was a bit hasty about point 2. renderF

RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread fire-eyed-boy
I gues I was a bit hasty about point 2. renderForm( false ); ?> produces two form elements, one fully closed and one with only the starting tag: ... etc This is the code in my extended form: $this->setName( $this->_name ) ->setMethod( 'post' )

[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] Zend Filter Input, first element from a csv not validating correctly

2009-03-06 Thread rollockg
I am attempting to use Zend_Filter_Input to validate data coming from a csv. $filters= array(0 => array('StringTrim', 'StripTags'), 1=> array('StringTrim', 'StripTags'), 3=> array('StringTrim', 'StripTags')); $valida

FW: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread fire-eyed-boy
Sorry guys, forgot to send to fw-gene...@lists.zend.com. So here you go: From: fire-eyed-...@hotmail.com To: mon...@gmail.com Subject: RE: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements Date: Fri, 6 Mar 2009 15:58:00 +

[fw-general] Custom NS parsing with Zend_Feed

2009-03-06 Thread Marco
Hi All I have an RSS feed that I both need to generate and consume in the following format http://www.example.org/myns#";> Feed Title http://www.example.org Welcome to my nice feed Item Title Item Description http://www.example.org/item1

Re: [fw-general] Call a stored procedure

2009-03-06 Thread Vladas Diržys
Hi, As far I know, Zend_Db doesn't try to support stored procedures. But you can try following: $conn = $db->getConnection();$conn->query('call dosomething();'); -- Pagarbiai, Vladas Diržys Tel.: +370 620 69020 www.dirzys.com On Fri, Mar 6, 2009 at 12:46 PM, debussy007 wrote: > > Hi, > > I've

Re: [fw-general] Menu Templating

2009-03-06 Thread Matthias W.
Thanks, I didn't know this helper, I think it works the same way. But it doesn't support the evaluation of a template in the database. This is the reason, I'll use the Template class I created with the class from http://www.techfounder.net/2008/11/18/oo-php-templating/ with additionally eval suppo

[fw-general] Call a stored procedure

2009-03-06 Thread debussy007
Hi, I've always used the Zend_Db_Table_Abstract to fetch data. However, I'll need to call a MySQL stored procedure now ... Anyone has an idea on how to achieve this ? Thank you. -- View this message in context: http://www.nabble.com/Call-a-stored-procedure-tp22369464p22369464.html Sent from th

Re: [fw-general] Menu Templating

2009-03-06 Thread Giuliano Riccio
Your example looks a lot like http://framework.zend.com/manual/en/zend.view.helpers.html#zend.view.helpers.initial.partial the partial helper . Giuliano Matthias W. wrote: > > Hi, > I'm going to implement a CMS. > The first classes are created and now I'm on the menu. > > The menu should cont

Re: [fw-general] Zend_Form: MultiCheckbox or Checkbox i.c.w. ViewScript and looping through individual elements

2009-03-06 Thread Mon Zafra
1. My suggestion is to take the string output of $multiCheckbox->renderViewHelper(), explode it using the separator, then loop through each line. e.g. $form->addElement('multiCheckbox', 'foo', array( 'multiOptions' => $options, 'separator' => '__SEPARATOR__' )); // view script $output = $t

Re: [fw-general] Menu Templating

2009-03-06 Thread Matthias W.
I added following function to get templates from for example database which cannot be included with include, because theres no file existing to read: protected function _eval() { eval('?>' . func_get_arg(0) . ' > I found an answer for my question: > http://www.techfounder.net/2008/11/18/oo-p

Re: [fw-general] Menu Templating

2009-03-06 Thread Matthias W.
I found an answer for my question: http://www.techfounder.net/2008/11/18/oo-php-templating/ I think this is the best way to make an easy templating class. And if I want the user to create templates without PHP (with placeholder) I think I'll write a TemplateCompiler from placeholderTemplate to

RE: [fw-general] Dojo, and Zend Studio

2009-03-06 Thread Simon Griffiths
From: Robert Gormley [mailto:rgorm...@mgcare.com] Sent: 05 March 2009 23:02 To: fw-general@lists.zend.com Subject: [fw-general] Dojo, and Zend Studio Hi all, I realise that this isn't really ZF's "fault", and a bit more related to Zend Studio for Eclipse, but I'm surely not the only person hav

[fw-general] Menu Templating

2009-03-06 Thread Matthias W.
Hi, I'm going to implement a CMS. The first classes are created and now I'm on the menu. The menu should contain a template so that I only have to create an array with the menu structure and a template with the HTML. I've got: $tmpl = array( 'navigationClassCSS' => 'nav', 'menu' => array(