[fw-general] ZF with Ajax (Dojo or anything)
I have this problem where I am trying to show pieces of the form as the user fills out more of the form. I was trying to do this in a way where the entire form was on the phtml page, but pieces of the form were hidden by using div with a style property of hidden. When an onClick is called or onBlur, the javascript makes the call to the server via xhrPost or any kind of XMLHttpRequest wrapper (for those not using Dojo) and goes to the server. Here is the problem. I am setting view variables in my controller, but those variables are only available if they are going to be displayed on the phtml file that corresponds to the Controllers view. That makes sense. But what am I supposed to do? This has to be a common thing, but I just do not know how to address it. Please help. -- View this message in context: http://www.nabble.com/ZF-with-Ajax-%28Dojo-or-anything%29-tp24517178p24517178.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] ZF with Ajax
I am just trying to figure out if I can do this or whether I am just doing it wrong I have a form that displays more of itself as the user fills in info. When they choose from a select option it calls a javascript function via Prototype which makes a request to the server for a controller. The issue is this. The view variables from the controller are set to display for the matching view template. But since I was using Ajax I had the other part of the form hidden via a div: div id=adjForm style=display:none rest of the form /div The issue is that the div above is in the original page. So it does not see any of the view variables from the controller. Is there a way to make it see those? I know that I can take out what is in the div and put it into the view that the controller is looking for, but I wanted to do it with all the code in one page and using a display:none. Will I have to pull the code back out and put it in the the view? -- View this message in context: http://www.nabble.com/ZF-with-Ajax-tp24432700p24432700.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Check to see if a request parameter was set
This statement: isset ($this-_getParam('adjType')); produces the following error: Fatal error: Can't use method return value in write context in /usr/local/apache2-development/htdocs/ARMS/application/modules/default/controllers/IndexController.php on line 136 What are my alternatives? -- View this message in context: http://www.nabble.com/Check-to-see-if-a-request-parameter-was-set-tp23962984p23962984.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Ajax Forms
I am not using Zend_Form, bu if I have to I will. I basically have a page that is a form. When a user selects certain options from the form more of the form appears and in some cases part of the form dis-appears. Currently, I use onChange and just refresh the page. I found a way to integrate Prototype, but I am still not integrated it fully, because what happens is the onChange is called view Prototype and it calls an action in my controller and variables are set, but for they are set for the action called by ajax. -- View this message in context: http://www.nabble.com/Ajax---Forms-tp23769817p23769817.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] what can be used t replace these nice smarty features
I have decided not to use Smarty as my template engine. But, what can I use instead in Zend View for things like: html_options I despise too many loops in my pages and this was a very clean way to populate a dropdown. select size=1 name=shortTerritory onchange=form1.submit() {html_options options=$shortTerritories selected=$selected_fiscal_year} /select What are my alternatives? Another reason why I am leaving Smarty is because I could not get it to integrate with Dojo. -- View this message in context: http://www.nabble.com/what-can-be-used-t-replace-these-nice-smarty-features-tp23623976p23623976.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] How to set up dependant dropdowns in form
Ace Paul wrote: I have a form, which I would like to use dependent drop downs in. I can't seem to find anything about it hear, after looking all morning trying to work it out. I have one field race_country when an option is selected I would like to show the cities in that country. The following is what I have currently in the form, which will show all countries and all cities. Any help would be great. thanks $table = new Country(); foreach ($table-fetchAll() as $c) { $country-addMultiOption($c-country_id, $c-country_name); } $this-addElement( $country); $city = new Zend_Form_Element_Select('race_city'); $city-setLabel('City') -setRequired(true); $table = new City(); foreach ($table-fetchAll() as $c) { $city-addMultiOption($c-city_id, $c-city_name); } $this-addElement( $city); Does anyone have a complete example of this? I used this example to get it up and going: http://techchorus.net/autocomplete-example-zenddojoformelementfilteringselect-and-zenddojodata With the change located in the comments: div dojoType=dojo.data.ItemFileReadStore url=/strain/list jsId=strainStore/div but I am having trouble trying to do dependent drop downs. Any good references out there, or is this too early to attempt with Zend Dojo? -- View this message in context: http://www.nabble.com/How-to-set-up-dependant-dropdowns-in-form-tp20907379p23259776.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] .htaccess (view helper $this-url) question
My application's url is something like this: http://localhost/zend/AppName We use Oracle's Policy manager for our single sign-on environment. If i go to the url above in my preDispatch method, it checks to see whether a session is set. If it is not, I forward it to the single sign-on page which passes it though some additional code which gets me back to my application, but now using a url like this: http://signle-sign-on.com/VCP/zend/AppName. When using this policy manager, this url (http://signle-sign-on.com/VCP) really just translates into this one: http://localhost/zend/ So for each one I just have to add the AppName at the end. Here is my issue: When I use the view url helper now, it make the url look like this: (http://signle-sign-on.com/zend/AppName This url does not work because it leaves off the VCP I was thinking I could possibly change this line of the .htaccess: RewriteBase /VCP/zend/ Current .htacess RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteBase /zend/ RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] The only problem with that is hat http://localhost/zend/AppName will not not work at all. I know my last result is to have it where I only access the site this way: http://signle-sign-on.com/VCP/AppName but I was hoping for a happy medium. -- View this message in context: http://www.nabble.com/.htaccess---%28view-helper-%24this-%3Eurl%29-question-tp23175477p23175477.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] .htaccess (view helper $this-url) question
411161 wrote: My application's url is something like this: http://localhost/zend/AppName We use Oracle's Policy manager for our single sign-on environment. If i go to the url above in my preDispatch method, it checks to see whether a session is set. If it is not, I forward it to the single sign-on page which passes it though some additional code which gets me back to my application, but now using a url like this: http://signle-sign-on.com/VCP/zend/AppName. When using this policy manager, this url (http://signle-sign-on.com/VCP) really just translates into this one: http://localhost/zend/ So for each one I just have to add the AppName at the end. Here is my issue: When I use the view url helper now, it make the url look like this: (http://signle-sign-on.com/zend/AppName This url does not work because it leaves off the VCP I was thinking I could possibly change this line of the .htaccess: RewriteBase /VCP/zend/ Current .htacess RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteBase /zend/ RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] The only problem with that is hat http://localhost/zend/AppName will not not work at all. I know my last result is to have it where I only access the site this way: http://signle-sign-on.com/VCP/AppName but I was hoping for a happy medium. Ok, I have a little more sense of this now. Here is what I want to do: For all urls that hit the .htaccess file I want them to still use my index.php but via one particular url. So if I go in like this (http://localhost/zend/AppName), it will still forward (or rewrite) it like this: http://signle-sign-on.com/VCP/AppName -- View this message in context: http://www.nabble.com/.htaccess---%28view-helper-%24this-%3Eurl%29-question-tp23175477p23175813.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] security/Zend Session
If I have some code that checks to see if a user is logged in and I want to do this for every page where is the best place to do this? I use modules and just want to do it for a particular module, does that change things? -- View this message in context: http://www.nabble.com/security-Zend-Session-tp22419047p22419047.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Dojo and tabs and panes
I have a form on one of my panes in Dojo. It is not the first pane. How can I show the second pane after hitting submit if I have an error on the form and I want the user to correct it? my phtml looks like this. ?php $this-dojo()-enable(); // Container with tabs $this-tabContainer()-captureStart('tab1', array(), array('style' = 'width:800px;height:500px;')); // First tab Upload Adjustments $this-contentPane()-captureStart('pane1', array(), array('title' = 'Upload Adjustments')); echo $this-form1; echo $this-contentPane()-captureEnd('pane1'); // First tab Upload Revenue $this-contentPane()-captureStart('pane2', array(), array('title' = 'Upload Revenue File')); echo $this-revnueUploadForm; echo $this-contentPane()-captureEnd('pane2'); echo $this-tabContainer()-captureEnd('tab1'); ? -- View this message in context: http://www.nabble.com/Dojo-and-tabs-and-panes-tp22334351p22334351.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Looking for a complete Complete Zend_Paginator example
That helped a lot. Now I get this message with your code and even with my own code: Notice: Undefined index: zend_paginator_row_count in /usr/local/apache2-development/htdocs/zend/library/Zend/Paginator/Adapter/DbSelect.php on line 107 Anyone have any idea why? I did not get it with my code before and as I far as I know I did not change anything. monk.e.boy wrote: 411161 wrote: This is what I have so far. I threw up this tutorial: http://teethgrinder.co.uk/perm.php?a=Zend-Framework-MySQL-DB-Pagination-Tutorial hope it helps. monk.e.boy -- View this message in context: http://www.nabble.com/Looking-for-a-complete-Complete-Zend_Paginator-example-tp19731530p20215637.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Zend Framework Dojo
http://lampcomputing.com/add-cool-zend-dojo-date-picker-form-element-without-writing-single-line-javascript This tutorial got me up and running. -- View this message in context: http://www.nabble.com/Zend-Framework---Dojo-tp19537547p20156892.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Looking for a complete Complete Zend_Paginator example
I don't understand Matt. Could you provide an example? controller: public function paginateAction() { $select= $this-db-select()-from( 'runz_miles', 'EMPL_NO')-where('empl_no = ?', 31713); $this-view-result = $this-db-fetchAll($sql); $paginator = Zend_Paginator::factory($this-view-result); $paginator-setCurrentPageNumber(15); $this-view-paginator = $paginator; } Everytime I clock on a link it will come back to this action. Right? SO what prevents it from not calling the sql again? Matthew Ratzloff wrote: Use a Zend_Db_Select object for your query and pass the instance to factory(). If that doesn't suit your needs for some reason, you can easily write your own adapter by implementing Zend_Paginator_Adapter_Interface or extending Zend_Paginator_Adapter_DbSelect. Hope that helps, -Matt On Tue, Sep 30, 2008 at 8:13 AM, 411161 [EMAIL PROTECTED] wrote: Thanks. For some reason, I must have missed all that when I first looked at the reference guide. So what I have done now is, changed my view to add the following: ?= $this-paginationControl($this-paginator2, 'Sliding', 'p.phtml'); ? And in the p.phtml I have added the code from http://framework.zend.com/manual/en/zend.paginator.usage.html under the heading: Item pagination What I am still unsure of is how I can not go to the db each time I click one of my links(first, last). I can't seem to find that in the documentation. Not sure if this is where sessions come in or what. But I was hoping to see an example. 411161 wrote: I have it working, but I am not sure how to create links for next, last, first, previous, numbers, etc.. I am also not sure how to handle links in my controller. This is what I have so far. controller: public function paginateAction() { $sql = 'SELECT * FROM runz_miles WHERE empl_no = 31713'; $this-view-result = $this-db-fetchAll($sql); $paginator = Zend_Paginator::factory($this-view-result); $paginator-setCurrentPageNumber(15); $this-view-paginator = $paginator; } in my view I have: table ? foreach($this-paginator as $key = $row){ echo trtd .$row['EMPL_NO'] . /td\n; echo td .$row['PRISM_ORG_CODE'] . /td/tr\n; } ? /table How do I create the links and I how do I handle the action so that it will not try and call the sql again? -- View this message in context: http://www.nabble.com/Looking-for-a-complete-Complete-Zend_Paginator-example-tp19731530p19744120.html Sent from the Zend Framework mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Looking-for-a-complete-Complete-Zend_Paginator-example-tp19731530p19764012.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Looking for a complete Complete Zend_Paginator example
Thanks. For some reason, I must have missed all that when I first looked at the reference guide. So what I have done now is, changed my view to add the following: ?= $this-paginationControl($this-paginator2, 'Sliding', 'p.phtml'); ? And in the p.phtml I have added the code from http://framework.zend.com/manual/en/zend.paginator.usage.html under the heading: Item pagination What I am still unsure of is how I can not go to the db each time I click one of my links(first, last). I can't seem to find that in the documentation. Not sure if this is where sessions come in or what. But I was hoping to see an example. 411161 wrote: I have it working, but I am not sure how to create links for next, last, first, previous, numbers, etc.. I am also not sure how to handle links in my controller. This is what I have so far. controller: public function paginateAction() { $sql = 'SELECT * FROM runz_miles WHERE empl_no = 31713'; $this-view-result = $this-db-fetchAll($sql); $paginator = Zend_Paginator::factory($this-view-result); $paginator-setCurrentPageNumber(15); $this-view-paginator = $paginator; } in my view I have: table ? foreach($this-paginator as $key = $row){ echo trtd .$row['EMPL_NO'] . /td\n; echo td .$row['PRISM_ORG_CODE'] . /td/tr\n; } ? /table How do I create the links and I how do I handle the action so that it will not try and call the sql again? -- View this message in context: http://www.nabble.com/Looking-for-a-complete-Complete-Zend_Paginator-example-tp19731530p19744120.html Sent from the Zend Framework mailing list archive at Nabble.com.
[fw-general] Zend Framework Dojo
I have a really simple question. Since Zend integrates Dojo, do I still have to download Dojo and is there a good tutorial on how to use them together? -- View this message in context: http://www.nabble.com/Zend-Framework---Dojo-tp19537547p19537547.html Sent from the Zend Framework mailing list archive at Nabble.com.