RE: [fw-general] Validating a person's name with Zend Validate
If you really want to accept international visitors, be very careful what you do with names... My family name for instance is 'de Lau'. The 'de' part in the Netherlands is called a 'tussenvoegsel'.[1] It is considered part of the family name. I would suggest that if a visitor entered any upppercase character in their input, they probably did a better job than you would be doing and you better leave it alone. Exception might be ALL UPPERCASE input or even cAPS LOCK. Kind regards, Vincent de Lau vinc...@delau.nl [1] http://en.wikipedia.org/wiki/Tussenvoegsel From: guice...@gmail.com [mailto:guice...@gmail.com] On Behalf Of Philip G Sent: Thursday, January 08, 2009 12:20 AM To: Michael Tramontano Cc: Jake McGraw; fw-general Subject: Re: [fw-general] Validating a person's name with Zend Validate On Wed, Jan 7, 2009 at 3:57 PM, Michael Tramontano wrote: Well if you're using ucwords() or ucfirst() for the o'reilly issue, perhaps you should just uppercase the first letter and ignore the other characters. That way you get Beth AND O'Reilly. McCain. ;) --- Philip g...@gpcentre.net http://www.gpcentre.net/
Re: [fw-general] Validating a person's name with Zend Validate
Hi Philip, Philip G schrieb: > McCain. ;) Works totally fine with the solution Michael has proposed. cu, Lars
Re: [fw-general] Best Practices: Eliminate redundancy within various controller init methods?
You can make a custom controller to make all the others... something like this: class My_Controller_Action extends Zend_Controller_Action { public function init() { // your common code } } Then you will use it like this: class IndexController extends My_Controller_Action { // optional function to use to add more stuff to the default init public function init() { // some code parent::init(); // use this anywhere inside this function to call the default init // some code } } Hope it helps ;) Giuliano jasonzfw wrote: > > Hi, > > Been using the ZFW for a few weeks now, and love it. I have a pretty good > grasp on the key features, however there's one obstacle I can't seem to > surpass. My site is broken into about 7 different controllers, and I store > all configuration data in config.ini. > > Currently within each controller init() method I redundantly include the > same 5-6 lines of code which perform various calculations, such as > determining the number of registered users. This information is > subsequently displayed within the page header. For instance, you'll find > this line within each of my controllers' init() methods: > > $this->view->totalUsers = $user->getUserCount(); > > (obviously this data is cached using Zend_Cache, I'm just keeping it > simple here) > > For that matter, several of my controller actions use config.ini > parameters, so the following line is currently found in every controllers' > init() method: > > $this->config = Zend_Registry::get('config'); > > I've seemingly tried everything, including creating a custom front > controller plugin and defining a preDispatch() method. However the > variable scope seems limited to that method, as I'm unable to retrieve > $this->config within my controllers. > > Surely there's a recommended way to manage these lines of code in a single > location? While this works, I'd much rather avoid having to redundantly > maintain the same lines of code in each controller action. > > Thank you! > Jason > -- View this message in context: http://www.nabble.com/Best-Practices%3A-Eliminate-redundancy-within-various-controller-init-methods--tp21341232p21347824.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Best Practices: Eliminate redundancy within various controller init methods?
You can of course have a base custom controller, but you do not need to. Depending on what you need exactly you can use either an action helper in the init method or a plugin or both a plugin and an action helper. public function init(){ $this->_helper->myInit(); //instead of your six lines of code } Bart Giuliano Riccio schreef: You can make a custom controller to make all the others... something like this: class My_Controller_Action extends Zend_Controller_Action { public function init() { // your common code } } Then you will use it like this: class IndexController extends My_Controller_Action { // optional function to use to add more stuff to the default init public function init() { // some code parent::init(); // use this anywhere inside this function to call the default init // some code } } Hope it helps ;) Giuliano jasonzfw wrote: Hi, Been using the ZFW for a few weeks now, and love it. I have a pretty good grasp on the key features, however there's one obstacle I can't seem to surpass. My site is broken into about 7 different controllers, and I store all configuration data in config.ini. Currently within each controller init() method I redundantly include the same 5-6 lines of code which perform various calculations, such as determining the number of registered users. This information is subsequently displayed within the page header. For instance, you'll find this line within each of my controllers' init() methods: $this->view->totalUsers = $user->getUserCount(); (obviously this data is cached using Zend_Cache, I'm just keeping it simple here) For that matter, several of my controller actions use config.ini parameters, so the following line is currently found in every controllers' init() method: $this->config = Zend_Registry::get('config'); I've seemingly tried everything, including creating a custom front controller plugin and defining a preDispatch() method. However the variable scope seems limited to that method, as I'm unable to retrieve $this->config within my controllers. Surely there's a recommended way to manage these lines of code in a single location? While this works, I'd much rather avoid having to redundantly maintain the same lines of code in each controller action. Thank you! Jason
Re: [fw-general] Best Practices: Eliminate redundancy within various controller init methods?
On 8 Jan 2009, at 09:26, Bart McLeod wrote: You can of course have a base custom controller, but you do not need to. Depending on what you need exactly you can use either an action helper in the init method or a plugin or both a plugin and an action helper. public function init(){ $this->_helper->myInit(); //instead of your six lines of code } Actually, if you have a My_Controller_Action::init(), you don't need to define and init() at all in the child classes, whereas if you use a helper, you do need to define the init() in the controllers where you need the myInit(). Regards, Rob...
Re: [fw-general] Best Practices: Eliminate redundancy within various controller init methods?
On 1/8/2009 12:05, Rob Allen wrote: On 8 Jan 2009, at 09:26, Bart McLeod wrote: You can of course have a base custom controller, but you do not need to. Depending on what you need exactly you can use either an action helper in the init method or a plugin or both a plugin and an action helper. public function init(){ $this->_helper->myInit(); //instead of your six lines of code } Actually, if you have a My_Controller_Action::init(), you don't need to define and init() at all in the child classes, whereas if you use a helper, you do need to define the init() in the controllers where you need the myInit(). Depends on the place where you register the helper, because HelperBroker::__construct() will call the init() method of all registered helpers at the time Zend_Controller_Action is instantiated. Then, the same HelperBroker will call the preDispatch() and postDispatch() method of all helpers before and, respectively, after Zend_Controller_Action::dispatch(). There's a nice representation of this process here: http://surlandia.com/wp-content/uploads/2008/11/zf-dispatch-lifecycle-bw.jpg So, IMHO, a helper could be the solution, the only issue remaining might be the place to register the helper and then what callback method to use, init() or preDispatch(). Regards, Rob...
[fw-general] Question regarding dojo forms rendered in templates called via xhr.
Hi all, I am in the process of switching our application to make use of dojo forms, however, am having some issues with forms which are rendered via xhr requests. In a nutshell: a) Layout is rendered and the index action renders a dojo form which works perfectly fine. b) After submitting the form, the user manually follows a link which calls a JS function and loads the required action template in a specified div. c) The loaded dojo form in the resulting div however doesn't seem to be 'dojo enabled'. The form does render, albeit without any styles or dijit functionality. Please note: initialization of application is based on Matthew Weier O'Phinney's excellent pastebin app. I pasted the relevant sections @: http://www.pastebin.ca/1303381 The entire application source can be viewed at: http://bazaar.launchpad.net/~mhashmi/zivios/devel/files (please see the 'installer' module). Also: I had made quite a few attempts to selectively load the required dojo modules (with dojo.addOnLoad), but for some reason I am not getting it right. I am also confused about setting dojo to "declarative" mode in the view template when we have already done so in the predispatch action... Any help would be much appreciated. Thanks, -- Mustafa A. Hashmi
Re: [fw-general] Question regarding dojo forms rendered in templates called via xhr.
that is a javascript specific problem. If you load stuff via XHR you have to reattach all the events to it, because they have not been registered. all the content inside the loaded div has not been "dojo eventized" lets call it, so no javascript is happening there. you have to reattach all events to that specific elements. greetings, Benjamin On Thursday 08 January 2009 12:22:31 Mustafa A. Hashmi wrote: > Hi all, > > I am in the process of switching our application to make use of dojo > forms, however, am having some issues with forms which are rendered > via xhr requests. In a nutshell: > > a) Layout is rendered and the index action renders a dojo form which > works perfectly fine. > b) After submitting the form, the user manually follows a link which > calls a JS function and loads the required action template in a > specified div. > c) The loaded dojo form in the resulting div however doesn't seem to > be 'dojo enabled'. The form does render, albeit without any styles or > dijit functionality. > > Please note: initialization of application is based on Matthew Weier > O'Phinney's excellent pastebin app. > > I pasted the relevant sections @: http://www.pastebin.ca/1303381 > > The entire application source can be viewed at: > > http://bazaar.launchpad.net/~mhashmi/zivios/devel/files (please > see the 'installer' module). > > Also: I had made quite a few attempts to selectively load the required > dojo modules (with dojo.addOnLoad), but for some reason I am not > getting it right. I am also confused about setting dojo to > "declarative" mode in the view template when we have already done so > in the predispatch action... > > Any help would be much appreciated. > > Thanks, > -- > Mustafa A. Hashmi -- Benjamin Eberlei http://www.beberlei.de
Re: [fw-general] Best Practices: Eliminate redundancy within various controller init methods?
On 8 Jan 2009, at 11:13, Ionut Gabriel Stan wrote: On 1/8/2009 12:05, Rob Allen wrote: On 8 Jan 2009, at 09:26, Bart McLeod wrote: You can of course have a base custom controller, but you do not need to. Depending on what you need exactly you can use either an action helper in the init method or a plugin or both a plugin and an action helper. public function init(){ $this->_helper->myInit(); //instead of your six lines of code } Actually, if you have a My_Controller_Action::init(), you don't need to define and init() at all in the child classes, whereas if you use a helper, you do need to define the init() in the controllers where you need the myInit(). Depends on the place where you register the helper, because HelperBroker::__construct() will call the init() method of all registered helpers at the time Zend_Controller_Action is instantiated. Then, the same HelperBroker will call the preDispatch() and postDispatch() method of all helpers before and, respectively, after Zend_Controller_Action::dispatch(). There's a nice representation of this process here: http://surlandia.com/wp-content/uploads/2008/11/zf-dispatch-lifecycle-bw.jpg So, IMHO, a helper could be the solution, the only issue remaining might be the place to register the helper and then what callback method to use, init() or preDispatch(). That's correct, but if you register the helper with the broker and use the hooks, you will get the initialisation for every single controller. If you use a superclass, then you can choose whether to extend a given controller with it or not. Personally, I would use a helper and an init() function in the controllers where I want to use that common functionality. Regards, Rob...
Re: [fw-general] Best Practices: Eliminate redundancy within various controller init methods?
Another option for the common users' data is to simple create a View Helper which runs the relevant query to get the total user count (have the helper grab the Model instance and perform the work). Then simply call that View Helper from within your template as needed. Just to be smart, you can use the same helper if its really really needed within a Controller using $this->view->myHelper(). The reason an Action Helper for that case may be inappropriate, is that the data is needed by the View, but is not needed by the Controller, so why even bother doing it in the Controller? ;) Skip the middleman. As for configuration, why not create an Action Helper to simply encapsulate the Zend_Config instance? Then from a controller, you can access the instance using something like: $this->_helper->config The only work required would be formulating the helper as a basic proxy to the underlying Zend_Config instance using PHP's magic methods, and registering the Action Helper to the HelperBroker. See: http://devzone.zend.com/article/3350-Action-Helpers-in-Zend-Framework In general it's a good idea to avoid extending Zend_Controller_Action to add functionality. It's the easy option, and like all similarly easy options it can turn into a bloated, overused, unportable class. Rob Allen-3 wrote: > > > On 8 Jan 2009, at 11:13, Ionut Gabriel Stan wrote: > >> On 1/8/2009 12:05, Rob Allen wrote: >>> >>> On 8 Jan 2009, at 09:26, Bart McLeod wrote: >>> You can of course have a base custom controller, but you do not need to. Depending on what you need exactly you can use either an action helper in the init method or a plugin or both a plugin and an action helper. public function init(){ $this->_helper->myInit(); //instead of your six lines of code } >>> >>> >>> Actually, if you have a My_Controller_Action::init(), you don't >>> need to >>> define and init() at all in the child classes, whereas if you use a >>> helper, you do need to define the init() in the controllers where you >>> need the myInit(). >> >> Depends on the place where you register the helper, because >> HelperBroker::__construct() will call the init() method of all >> registered helpers at the time Zend_Controller_Action is >> instantiated. Then, the same HelperBroker will call the >> preDispatch() and postDispatch() method of all helpers before and, >> respectively, after Zend_Controller_Action::dispatch(). >> >> There's a nice representation of this process here: >> >> http://surlandia.com/wp-content/uploads/2008/11/zf-dispatch-lifecycle-bw.jpg >> >> So, IMHO, a helper could be the solution, the only issue remaining >> might be the place to register the helper and then what callback >> method to use, init() or preDispatch(). > > > > That's correct, but if you register the helper with the broker and use > the hooks, you will get the initialisation for every single > controller. If you use a superclass, then you can choose whether to > extend a given controller with it or not. > > Personally, I would use a helper and an init() function in the > controllers where I want to use that common functionality. > > Regards, > > Rob... > > > - Pádraic Brady Blog: http://blog.astrumfutura.com Free Zend Framework Book: http://www.survivethedeepend.com OpenID Europe Foundation - Irish Representative -- View this message in context: http://www.nabble.com/Best-Practices%3A-Eliminate-redundancy-within-various-controller-init-methods--tp21341232p21350275.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Best Practices: Eliminate redundancy within various controller init methods?
On 8 Jan 2009, at 11:32, Pádraic Brady wrote: Another option for the common users' data is to simple create a View Helper which runs the relevant query to get the total user count (have the helper grab the Model instance and perform the work). Then simply call that View Helper from within your template as needed. Just to be smart, you can use the same helper if its really really needed within a Controller using $this->view->myHelper(). The reason an Action Helper for that case may be inappropriate, is that the data is needed by the View, but is not needed by the Controller, so why even bother doing it in the Controller? ;) Skip the middleman. Yeah for this case, an view helper make life so much easier and makes more sense. In general it's a good idea to avoid extending Zend_Controller_Action to add functionality. It's the easy option, and like all similarly easy options it can turn into a bloated, overused, unportable class. I agree - the main problem is when you need two unrelated types of functionality and then your "simple" parent class suddenly becomes a God :) Regards, Rob...
Re: [fw-general] Question regarding dojo forms rendered in templates called via xhr.
On Thu, Jan 8, 2009 at 4:25 PM, Benjamin Eberlei wrote: > that is a javascript specific problem. If you load stuff via XHR > you have to reattach all the events to it, because they have not been > registered. > > all the content inside the loaded div has not been "dojo eventized" lets call > it, so no javascript is happening there. you have to reattach all events to > that specific elements. Many thanks for the speedy response. I actually did try the "addOnLoad" calls and "requireModule" calls from within the template, however, I am obviously missing more of the required glue. Will try again and share my attempts if I can't go further. Also: noticed that pastebin is up to 1.3.0 (i was referencing 1.0.0), so will look there for pointers as well. Thanks again. > > On Thursday 08 January 2009 12:22:31 Mustafa A. Hashmi wrote: >> Hi all, >> >> I am in the process of switching our application to make use of dojo >> forms, however, am having some issues with forms which are rendered >> via xhr requests. In a nutshell: >> >> a) Layout is rendered and the index action renders a dojo form which >> works perfectly fine. >> b) After submitting the form, the user manually follows a link which >> calls a JS function and loads the required action template in a >> specified div. >> c) The loaded dojo form in the resulting div however doesn't seem to >> be 'dojo enabled'. The form does render, albeit without any styles or >> dijit functionality. >> >> Please note: initialization of application is based on Matthew Weier >> O'Phinney's excellent pastebin app. >> >> I pasted the relevant sections @: http://www.pastebin.ca/1303381 >> >> The entire application source can be viewed at: >> >> http://bazaar.launchpad.net/~mhashmi/zivios/devel/files (please >> see the 'installer' module). >> >> Also: I had made quite a few attempts to selectively load the required >> dojo modules (with dojo.addOnLoad), but for some reason I am not >> getting it right. I am also confused about setting dojo to >> "declarative" mode in the view template when we have already done so >> in the predispatch action... >> >> Any help would be much appreciated. >> >> Thanks, >> -- >> Mustafa A. Hashmi > > -- > Benjamin Eberlei > http://www.beberlei.de >
Re: [fw-general] Best Practices: Eliminate redundancy within various controller init methods?
-- Bart McLeod wrote (on Thursday, 08 January 2009, 10:26 AM +0100): > You can of course have a base custom controller, but you do not need to. > > Depending on what you need exactly you can use either an action helper in the > init method or a plugin or both a plugin and an action helper. Also, you can create an action helper that has an init() or preDispatch() method, and register it in your bootstrap. This is a nice way to build code that can be re-used across controllers without needing a custom base controller (as action helpers have introspection to the current controller). > public function init(){ > $this->_helper->myInit(); //instead of your six lines of code > } > > Bart > > Giuliano Riccio schreef: > > You can make a custom controller to make all the others... something like > this: > > class My_Controller_Action extends Zend_Controller_Action > { > public function init() > { > // your common code > } > } > > Then you will use it like this: > > class IndexController extends My_Controller_Action > { > // optional function to use to add more stuff to the default init > public function init() > { > // some code > parent::init(); // use this anywhere inside this function to > call the default init > // some code > } > } > > Hope it helps ;) > > Giuliano > > jasonzfw wrote: > > > Hi, > > Been using the ZFW for a few weeks now, and love it. I have a pretty > good > grasp on the key features, however there's one obstacle I can't seem > to > surpass. My site is broken into about 7 different controllers, and I > store > all configuration data in config.ini. > > Currently within each controller init() method I redundantly include > the > same 5-6 lines of code which perform various calculations, such as > determining the number of registered users. This information is > subsequently displayed within the page header. For instance, you'll > find > this line within each of my controllers' init() methods: > > $this->view->totalUsers = $user->getUserCount(); > > (obviously this data is cached using Zend_Cache, I'm just keeping it > simple here) > > For that matter, several of my controller actions use config.ini > parameters, so the following line is currently found in every > controllers' > init() method: > > $this->config = Zend_Registry::get('config'); > > I've seemingly tried everything, including creating a custom front > controller plugin and defining a preDispatch() method. However the > variable scope seems limited to that method, as I'm unable to retrieve > $this->config within my controllers. > > Surely there's a recommended way to manage these lines of code in a > single > location? While this works, I'd much rather avoid having to > redundantly > maintain the same lines of code in each controller action. > > Thank you! > Jason > > > > > -- Matthew Weier O'Phinney Software Architect | matt...@zend.com Zend Framework | http://framework.zend.com/
Re: [fw-general] Question regarding dojo forms rendered in templates called via xhr.
On Thursday 08 January 2009 12:22:31 Mustafa A. Hashmi wrote: > I am in the process of switching our application to make use of dojo > forms, however, am having some issues with forms which are rendered > via xhr requests. In a nutshell: > > a) Layout is rendered and the index action renders a dojo form which > works perfectly fine. > b) After submitting the form, the user manually follows a link which > calls a JS function and loads the required action template in a > specified div. > c) The loaded dojo form in the resulting div however doesn't seem to > be 'dojo enabled'. The form does render, albeit without any styles or > dijit functionality. When using XHR to retrieve (X)HTML content that will be injected into the DOM, you need to do two things: 1) Any dojo modules that the new content uses must already be loaded (i.e., the dojo.require calls should already have occurred). Because of how Zend_Dojo works, anything aggregated in the dojo view helper will not be sent in the payload (unless you explicitly include it). Additionally, HTML content pulled by XHR ignores any
[fw-general] Condicional validation with File Element
Hi all, I'm new to ZF and here. I have search a lot but i find nothing about condicional validations. What I need with Zend_Form_Element_File component is this: - Insert is not allow empty file. - Edit an existing record with file associated, is optional. I couldn't archieve with the component. Any ideia how to solve this? Thanks for any help! -- View this message in context: http://www.nabble.com/Condicional-validation-with-File-Element-tp21353398p21353398.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Condicional validation with File Element
- Set the file element to required = false - The file element can not edit database records Greetings Thomas Weidner, I18N Team Leader, Zend Framework http://www.thomasweidner.com - Original Message - From: "Shalanga" To: Sent: Thursday, January 08, 2009 4:00 PM Subject: [fw-general] Condicional validation with File Element Hi all, I'm new to ZF and here. I have search a lot but i find nothing about condicional validations. What I need with Zend_Form_Element_File component is this: - Insert is not allow empty file. - Edit an existing record with file associated, is optional. I couldn't archieve with the component. Any ideia how to solve this? Thanks for any help! -- View this message in context: http://www.nabble.com/Condicional-validation-with-File-Element-tp21353398p21353398.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] ZF Pear channel / Zend_Tool installation
Hi all! I have setup a PEAR channel for ZF packages. Consider this the "beta" and "semi-official" channel while we work out the kinks. I have more of an announcement, details and reasoning located here: http://ralphschindler.com/2009/01/07/the-semi-official-zend-framework-pear-c hannel The channel is located at http://pear.zfcampus.org Give it a whirl and let me know what you think. I plan on spinning out some new devel packages as I introduce (or reintroduce) some new features into the Zend_Tool component, and as the Zend_Application proposal takes shape. Cheers! Ralph -- Ralph Schindler Software Engineer | ralph.schind...@zend.com Zend Framework| http://framework.zend.com/
[fw-general] Zend_Dojo View Helper - how do StackContainer and BorderContainer work?
Hi, I just wonder how StackContainer and BorderContainer work compared to AccordionContainer and TabContainer. I have an example running with a TabContainer layout elements which includes three ContentPane layout elements. Looks and works as expected. I changed this example and switched to AccordionContainer and AccordionPane and that example works as well as expected. Then I tried to change from TabContainer to StackContainer, but this does not work. Only the content of the first ContentPane is shown without any design. Just black and white output. The same with BorderContainer but this time it shows the content of all ContentPane without any design. Do StackContainer and BorderContainer really do work different than AccordionContainer and TabContainer? And if yes, how do they work? Here is my example. - borderContainer()->captureStart('container'); ?> contentPane()->captureStart( 'pizza1', array(), array('title' => 'Pizza 1') ); ?> Pizza 1 Pizza 1 description. contentPane()->captureEnd('pizza1');?> contentPane()->captureStart( 'pizza2', array(), array('title' => 'Pizza 2') ); ?> Pizza 2 Pizza 2 description. contentPane()->captureEnd('pizza2'); ?> contentPane()->captureStart( 'pizza3', array(), array('title' => 'Pizza 3') ); ?> Pizza 3 Pizza 3 description contentPane()->captureEnd('pizza3'); ?> borderContainer()->captureEnd('container'); ?> - To test this, just change the borderContainer() calls to tabContainer() Thanks and best regards, Ralf
[fw-general] Is it possible to draw overlapping lines with Zend_Pdf?
I cannot draw overlapping lines with Zend_Pdf, is it possible? How? Thanks Shawn
Re: [fw-general] Zend_Dojo View Helper - how do StackContainer and BorderContainer work?
-- Ralf Eggert wrote (on Thursday, 08 January 2009, 06:56 PM +0100): > I just wonder how StackContainer and BorderContainer work compared to > AccordionContainer and TabContainer. > > I have an example running with a TabContainer layout elements which > includes three ContentPane layout elements. Looks and works as expected. > I changed this example and switched to AccordionContainer and > AccordionPane and that example works as well as expected. > > Then I tried to change from TabContainer to StackContainer, but this > does not work. Only the content of the first ContentPane is shown > without any design. Just black and white output. That's normal. StackContainer is typically used for creating custom widgets -- in fact, TabContainer is a type of StackContainer. With StackContainer, one ContentPane is shown at a time, and you have to provide UI elements for switching through panes (TabContainer does this via tabs...). The standard example shows using it for a pager (for instance, flipping through "pages" of an article). > The same with BorderContainer but this time it shows the content of > all ContentPane without any design. BorderContainer is for composing a layout consisting of multiple panes; each ContentPane represents a particular region of that layout. For it to work, BorderContainer requires that you specify a "region" parameter for each ContentPane; that pane is then shown in that region. The standard regions are top, bottom, left, right, and center; how they are rendered is based on which layout design you specify for the BorderContainer. You specify the layout design using the "design" parameter of the BorderContainer; the types are "headline" (the default) and "sidebar". "Headline" has the ContentPanes representing the top and bottom regions stretch to fill the container horizontally; the left, center, and right pane widths are then split across the width and appear between the top and bottom. With "sidebar", the left and right panes fill the vertical height. You may create your BorderContainer using any number of panes; you don't need to represent all regions. For the layout to show correctly, you *do* need to use one of the Dijit themes. When in doubt, go to http://dojotoolkit.org or http://dojocampus.org. :) > Do StackContainer and BorderContainer really do work different than > AccordionContainer and TabContainer? And if yes, how do they work? > > Here is my example. > > - > borderContainer()->captureStart('container'); ?> > > contentPane()->captureStart( > 'pizza1', array(), array('title' => 'Pizza 1') > 'pizza1', array(), array('title' => 'Pizza 1') > ); ?> > Pizza 1 > Pizza 1 description. > contentPane()->captureEnd('pizza1');?> > > contentPane()->captureStart( > 'pizza2', array(), array('title' => 'Pizza 2') > ); ?> > Pizza 2 > Pizza 2 description. > contentPane()->captureEnd('pizza2'); ?> > > contentPane()->captureStart( > 'pizza3', array(), array('title' => 'Pizza 3') > ); ?> > Pizza 3 > Pizza 3 description > contentPane()->captureEnd('pizza3'); ?> > > borderContainer()->captureEnd('container'); ?> > - > > To test this, just change the borderContainer() calls to tabContainer() > > Thanks and best regards, > > Ralf > -- Matthew Weier O'Phinney Software Architect | matt...@zend.com Zend Framework | http://framework.zend.com/
[fw-general] Session arrays
I'm trying to work out how to set up an array in a session with zend framework. I've managed to get simple values into sessions without array, but just can't work this part out. I would like to submit a form which adds the following to a session array. accommodation_id, accommodation_name, accommodation_price, accommodation_type. I would like for people to be able to add multiple amount of these into the session, and then loop through it on the view page, however I'm unsure of how to add an array in a session with zend framework. Any help would be great. thanks - http://www.acewebdesign.com.au Web Design Adelaide -- View this message in context: http://www.nabble.com/Session-arrays-tp21365392p21365392.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend Form Question
Hey List, Do you think you could point me in the direction of an example demonstrating building a form like this setMethod('post'); $this->setAction('/images/uploadImage'); $this->setAttrib('enctype', 'multipart/form-data'); $this->addElement('text', 'name', array( 'label' => 'Name', 'required' => true, 'validators' => array( array('validator' => 'StringLength', 'options' => array(3, 20))) ) ); That Sets a custom error message for failure, and/or uses a regex validator? I've been playing around a lot and I'm having trouble with those two. I can do $this->name->getValidator('StringLength')->setMessage('Names must be between 3 and 20 characters long'); But it seems as though there should be something in that array I can set. paul