<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>Zend Framework Forum - Model-View-Controller (MVC)</title>
		<link>http://www.zfforums.com/</link>
		<description>Zend_Application, Zend_Application_Bootstrap, Zend_Application_Module, Zend_Application_Resource
Zend_Controller_Front, Zend_Controller_Action, Zend_Controller_Dispatcher, Zend_Controller_Plugin, Zend_Controller_Router
Zend_Form
Zend_Layout, Zend_View, Zend_View_Filter, Zend_View_Helper</description>
		<language>en</language>
		<lastBuildDate>Thu, 09 Sep 2010 22:41:55 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.zfforums.com/images/misc/rss.png</url>
			<title>Zend Framework Forum - Model-View-Controller (MVC)</title>
			<link>http://www.zfforums.com/</link>
		</image>
		<item>
			<title>Filtering non-numeric characters</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/filtering-non-numeric-characters-5508.html</link>
			<pubDate>Thu, 09 Sep 2010 17:46:10 GMT</pubDate>
			<description><![CDATA[Hi, 
 
I'm pretty new to ZF and I'm struggling to get my head around filtering and validation. I have a field in a form for entering telephone...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I'm pretty new to ZF and I'm struggling to get my head around filtering and validation. I have a field in a form for entering telephone numbers (UK only, 11 digits). What I'd like is for all white space and non-numeric characters to be filtered out, then for it to be validated to check if it is 11 digits long, so it would be stored in the database as a string of 11 digits regardless of how the user enters it. For example, if the user enters (1234) 567 8901 then it will be filtered to 12345678901, which would then pass the validation as it is 11 digits long. What I have so far:<br />
<br />
Controller<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">$data&nbsp; = $request-&gt;getPost();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
if ($form-&gt;isValid($data))<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; $data = $form-&gt;getValues();</code><hr />
</div> Form<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">$telephone&nbsp; -&gt; setLabel('Telephone Number')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; addFilter(new Zend_Filter_PregReplace(array('match'=&gt;'/^ $/', 'replace'=&gt;'')))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; addValidator(new Zend_Validate_StringLength(11,11))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt; addErrorMessage(&quot;Please enter a valid telephone number&quot;);</code><hr />
</div> Thanks for any help.</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>JR1</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/filtering-non-numeric-characters-5508.html</guid>
		</item>
		<item>
			<title>Problème de balises php qui disparaissent dans la views</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/probl-me-de-balises-php-qui-disparaissent-dans-la-views-5504.html</link>
			<pubDate>Thu, 09 Sep 2010 09:45:03 GMT</pubDate>
			<description><![CDATA[Bonjour, 
 
j'ai un problème très récent avec Zend, j'ai réinstaller Xampp sur window xp pour avoir la dernière version d'apache, php... 
...]]></description>
			<content:encoded><![CDATA[<div>Bonjour,<br />
<br />
j'ai un problème très récent avec Zend, j'ai réinstaller Xampp sur window xp pour avoir la dernière version d'apache, php...<br />
<br />
Désormais, lorsque je visualise une page sur mon navigateur, les balises de <acronym title="Page Ranking">pr</acronym>ésentes dans mes views : &lt;? &lt;?= &lt;?php disparaissent, ce qui m'affiche un code tel que :<br />
<br />
doctype() ?&gt; headTitle(); ?&gt; headScript(); ?&gt; headStyle(); ?&gt;<br />
<br />
ce qui est assez génant, vous n'en douterez pas ^^<br />
<br />
Je viens, en effet de re-paramétrer les configs apache pour avoir le virtual host, un nom de domaine en local personnalisé, une ssl sur mon phpmadmin ....  <br />
<br />
Avant le reparamétrage de xampp et zend, tout fonctionnait correctement, donc je suppose que ça ne vient pas d'une erreur dans mon code.<br />
<br />
D'où cela peut'il venir ?</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>ariden</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/probl-me-de-balises-php-qui-disparaissent-dans-la-views-5504.html</guid>
		</item>
		<item>
			<title>how to get dynamic URL like mydomain.com/username using zend framework</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/how-get-dynamic-url-like-mydomain-com-username-using-zend-framework-5503.html</link>
			<pubDate>Thu, 09 Sep 2010 06:45:32 GMT</pubDate>
			<description>Hello guys 
 
I am developing an application using zend framework. In the application I have to provide a URL for each user like...</description>
			<content:encoded><![CDATA[<div>Hello guys<br />
<br />
I am developing an application using zend framework. In the application I have to provide a URL for each user like mydomain.com/[username] then public will be able to view his profile. [username] is the username of the particular user<br />
<br />
But how can I achieve this ? I think in ZF mydomain.com/username tries to get the controller with name username, but I should show user profiles in this URL and it must goes to the right controller if something else comein like mydomain.com/controller1<br />
<br />
Please help<br />
<br />
Thanks a lot</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>dev_joy</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/how-get-dynamic-url-like-mydomain-com-username-using-zend-framework-5503.html</guid>
		</item>
		<item>
			<title>Display form validation error in view</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/display-form-validation-error-view-5492.html</link>
			<pubDate>Thu, 02 Sep 2010 16:40:35 GMT</pubDate>
			<description><![CDATA[Hi 
 
I have a complicated form so I can't use 
<?= $this->form ?> 
instead o this i do 
<dl> 
  <?= $this->form->Name ?> 
  <?= $this->form->Pass ?>...]]></description>
			<content:encoded><![CDATA[<div>Hi<br />
<br />
I have a complicated form so I can't use<br />
&lt;?= $this-&gt;form ?&gt;<br />
instead o this i do<br />
&lt;dl&gt;<br />
  &lt;?= $this-&gt;form-&gt;Name ?&gt;<br />
  &lt;?= $this-&gt;form-&gt;Pass ?&gt;<br />
&lt;/dl&gt;<br />
&lt;dl&gt;<br />
  &lt;?= $this-&gt;form-&gt;OtherStuff ?&gt;<br />
&lt;/dl&gt;<br />
<br />
But this approach doesn't display validation error after form submit.<br />
Is there an easy/clean way to do this?</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>payonk</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/display-form-validation-error-view-5492.html</guid>
		</item>
		<item>
			<title>Dispatching and overriding of controllers and views</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/dispatching-overriding-controllers-views-5490.html</link>
			<pubDate>Thu, 02 Sep 2010 00:37:11 GMT</pubDate>
			<description><![CDATA[Hi everybody, 
 
I wanted to get your opinion(s) on how you would develop this... 
 
I'm trying to create a file override system, similar to the...]]></description>
			<content:encoded><![CDATA[<div>Hi everybody,<br />
<br />
I wanted to get your opinion(s) on how you would develop this...<br />
<br />
I'm trying to create a file override system, similar to the approach used by Joomla for example, where controllers and views can be overridden.<br />
<br />
For example, say this is found in the <b>application</b> folder<br />
<br />
blog<blockquote>controllers</blockquote><blockquote><blockquote>ItemController.php</blockquote></blockquote><blockquote>views</blockquote><blockquote><blockquote>scripts</blockquote></blockquote><blockquote><blockquote><blockquote>item</blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>index.phtml</blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>add.phtml</blockquote></blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>edit.phtml</blockquote></blockquote></blockquote></blockquote>Now let's say for example, this was delivered in a packaged solution. But somewhere along the way, the user decided to change the display listings of the blog for their solution only.<br />
<br />
Ideally, rather than change the main index.phtml file, I'd like them to create another folder, perhaps called <b>custom</b> or something, with the same file and folder structure....<br />
<br />
blog<blockquote>controllers</blockquote><blockquote>views</blockquote><blockquote><blockquote>scripts</blockquote></blockquote><blockquote><blockquote><blockquote>item</blockquote></blockquote></blockquote><blockquote><blockquote><blockquote><blockquote>index.phtml</blockquote></blockquote></blockquote></blockquote>Now, here's what I want the Zend MVC to do...<br />
<br />
If the view file exists in the <b>custom</b> folder, then render that. Otherwise, fall back to the main <b>application</b> folder.<br />
<br />
This may sound fairly simple, but here's where it gets complex...<br />
<br />
I would ALSO like controllers to behave in the same way... defaulting to the <b>custom</b> folder before checking the <b>application</b> folder.<br />
<br />
Basically, the scripts are interchangeable.<br />
<br />
Also, the controller should not have to redefine every action. If I just wanted to override the index action for example, it should allow me to do this in the <b>custom</b> ItemController.php file, without having to redefine the add or edit action as well.<br />
<br />
Also, if I wanted to add a custom action to the <b>custom</b> ItemController.php, say for example, searchAction, I can extend the class as required, adding the new searchAction to the <b>custom</b> controller and view folders.<br />
<br />
This will allow the end user to tweak the application all they want, without compromising the original code.<br />
<br />
Any thoughts? Has anybody seen / done this before?</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>oomta</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/dispatching-overriding-controllers-views-5490.html</guid>
		</item>
		<item>
			<title>How can I get my Zend Form to escape output?</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/how-can-i-get-my-zend-form-escape-output-5474.html</link>
			<pubDate>Fri, 27 Aug 2010 13:59:00 GMT</pubDate>
			<description><![CDATA[Hi, regarding XSS my form does not escape the output. I was under the impression that Zend_Form automatically escapes all output. 
 
I've posted this...]]></description>
			<content:encoded><![CDATA[<div>Hi, regarding XSS my form does not escape the output. I was under the impression that Zend_Form automatically escapes all output.<br />
<br />
I've posted this on <a href="http://stackoverflow.com/questions/3584073/how-to-prevent-xss-attack-with-zend-form-using" target="_blank">stackoverflow</a>, but did not really solve the issue except that the problem was my form's output. Considering that output is done via <div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;?= $this-&gt;form ?&gt;</code><hr />
</div>  how can I escape it?</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>tjorriemorrie</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/how-can-i-get-my-zend-form-escape-output-5474.html</guid>
		</item>
		<item>
			<title>Zend_form + AJAX</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/zend_form-ajax-5471.html</link>
			<pubDate>Thu, 26 Aug 2010 15:36:33 GMT</pubDate>
			<description><![CDATA[Greetings everyone :) 
 
I have just started to work with this great framework, and I believe that it's awesome. Although the learning curve is a bit...]]></description>
			<content:encoded><![CDATA[<div>Greetings everyone :)<br />
<br />
I have just started to work with this great framework, and I believe that it's awesome. Although the learning curve is a bit high :), I think I'm doing fine.<br />
<br />
Here is my problem, which is explain in this image:<br />
<a href="http://img839.imageshack.us/i/image0.png/" target="_blank"><img src="http://img839.imageshack.us/img839/8421/image0.th.png" border="0" alt="" /></a><br />
<br />
I'll try to explain again:<br />
The menu on the left DIV add content to &quot;panels&quot; DIV via AJAX (jQUERY). One of the option is to load a form to register users, as in the image below.<br />
<a href="http://img163.imageshack.us/i/image1v.png/" target="_blank"><img src="http://img163.imageshack.us/img163/4668/image1v.th.png" border="0" alt="" /></a><br />
<br />
 It is loaded perfectly, but when I submit the info the entire page is refreshed, reloading the action /settings/adduser in the entire page, as in this image:<br />
<a href="http://img823.imageshack.us/i/image2d.png/" target="_blank"><img src="http://img823.imageshack.us/img823/3787/image2d.th.png" border="0" alt="" /></a><br />
<br />
And I'd like to load the form with the errors/feedback in the same &quot;panels&quot; div, like this image (a made up image):<br />
<a href="http://img828.imageshack.us/i/image3c.png/" target="_blank"><img src="http://img828.imageshack.us/img828/4767/image3c.th.png" border="0" alt="" /></a><br />
<br />
I know how to do it without using a Zend_Form, but I'm becoming very frustrated because of not getting the same effect with a Zend_Form. I use Zend_form because of its easy ways to Validate/Filtrate input data.<br />
<br />
index.php<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">// Define path to application directory<br />
defined('APPLICATION_PATH')<br />
&nbsp; &nbsp; || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));<br />
<br />
// Define application environment<br />
defined('APPLICATION_ENV')<br />
&nbsp; &nbsp; || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));<br />
<br />
// Ensure library/ is on include_path<br />
set_include_path(implode(PATH_SEPARATOR, array(<br />
&nbsp; &nbsp; realpath(APPLICATION_PATH . '/../library'),<br />
&nbsp; &nbsp; get_include_path(),<br />
)));<br />
<br />
/** Zend_Application */<br />
require_once 'Zend/Application.php';&nbsp; <br />
<br />
// Create application, bootstrap, and run<br />
$application = new Zend_Application(<br />
&nbsp; &nbsp; APPLICATION_ENV,<br />
&nbsp; &nbsp; APPLICATION_PATH . '/configs/application.ini'<br />
);<br />
$application-&gt;bootstrap()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;run();</code><hr />
</div> Bootstrap.php<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">class Bootstrap extends Zend_Application_Bootstrap_Bootstrap<br />
{<br />
&nbsp; &nbsp; protected function _initModuleAutoloader ()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; $al = new Zend_Application_Module_Autoloader(array('namespace' =&gt; 'App' , 'basePath' =&gt; dirname(__FILE__)));<br />
<br />
<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; protected function _initView (){<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Initialize view<br />
&nbsp; &nbsp; &nbsp; &nbsp; $view = new Zend_View();<br />
&nbsp; &nbsp; &nbsp; &nbsp; $view-&gt;doctype('XHTML1_STRICT');<br />
&nbsp; &nbsp; &nbsp; &nbsp; $view-&gt;headTitle('BrainSINS Analytics');<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Add it to the ViewRenderer<br />
&nbsp; &nbsp; &nbsp; &nbsp; $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');<br />
&nbsp; &nbsp; &nbsp; &nbsp; $viewRenderer-&gt;setView($view);<br />
&nbsp; &nbsp; &nbsp; &nbsp; // Return it, so that it can be stored by the bootstrap<br />
&nbsp; &nbsp; &nbsp; &nbsp; return $view;<br />
&nbsp; &nbsp; }<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected function _initSession (){<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; $options = $this-&gt;getOptions();<br />
&nbsp; &nbsp; &nbsp; &nbsp; $session = new Zend_Session_Namespace($options['resources']['session']['namespace']);<br />
&nbsp; &nbsp; &nbsp; &nbsp; Zend_Registry::set('session', $session);<br />
&nbsp; &nbsp; }</code><hr />
</div> application.ini<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">[production]<br />
phpSettings.display_startup_errors = 0<br />
phpSettings.display_errors = 0<br />
phpSettings.date.timezone = &quot;Europe/Madrid&quot;<br />
<br />
includePaths.library = APPLICATION_PATH &quot;/../library&quot;<br />
<br />
bootstrap.path = APPLICATION_PATH &quot;/Bootstrap.php&quot;<br />
bootstrap.class = &quot;Bootstrap&quot;<br />
<br />
resources.frontController.controllerDirectory = APPLICATION_PATH &quot;/controllers&quot;<br />
<br />
resources.layout.layout = &quot;layout&quot;<br />
resources.layout.layoutPath = APPLICATION_PATH &quot;/layouts&quot;<br />
<br />
resources.frontController.plugins[] = &quot;App_Plugin_SessionCheck&quot;<br />
resources.frontController.plugins[] = &quot;App_Plugin_LangSelector&quot;<br />
<br />
<br />
<br />
<br />
<br />
<br />
[staging : production]<br />
<br />
[testing : production]<br />
phpSettings.display_startup_errors = 1<br />
phpSettings.display_errors = 1<br />
<br />
[development : production]<br />
phpSettings.display_startup_errors = 1<br />
phpSettings.display_errors = 1</code><hr />
</div> /setttings/adduser<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">public function adduserAction(){<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($this-&gt;getRequest()-&gt;isPost()){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $form = new App_Form_AddUser();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $request = $this-&gt;getRequest();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (!$form-&gt;isValid($request-&gt;getPost())) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;view-&gt;form = $form;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return $this-&gt;render('adduser');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;It's OK&quot;;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }else{<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $flash = $this-&gt;_helper-&gt;getHelper('flashMessenger');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ajaxContext = $this-&gt;_helper-&gt;getHelper('AjaxContext');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ajaxContext-&gt;addActionContext('adduser', 'html')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;initContext();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ($flash-&gt;hasMessages()) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;view-&gt;message = $flash-&gt;getMessages();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;view-&gt;form = new App_Form_AddUser();<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;render('adduser');&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; }</code><hr />
</div> App_Form_AddUser (init function)<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code"> public function init (){<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //Zend_Form::setDefaultTranslator(Zend_Registry::get('Zend_Translate'));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;setTranslator(Zend_Registry::get('Zend_Translate'));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;setName('adduser');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;setAction('adduser');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;setMethod('post');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;setAttrib('id', 'adduser');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;addElement('text', 'first_name', array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'label'&nbsp; &nbsp; &nbsp; =&gt; $this-&gt;getView()-&gt;translate('First name:'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'required'&nbsp;  =&gt; true,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'validators' =&gt; array('Alpha',<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array('StringLength', false, array(0,32))),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'filters' =&gt; array('StripTags','StringTrim'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ));<br />
&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;addElement('submit','submit', array (<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'label'&nbsp; &nbsp; &nbsp; =&gt; $this-&gt;getView()-&gt;translate('Register')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; ));<br />
}<br />
}</code><hr />
</div> adduser.phtml<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">&lt;?php<br />
<br />
$this-&gt;headScript()-&gt;appendFile('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js','text/javascript');<br />
//$this-&gt;headScript()-&gt;appendFile('http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js','text/javascript');<br />
//$this-&gt;headScript()-&gt;appendFile('../javascript/scripts_adduser.js','text/javascript');<br />
//$this-&gt;headLink()-&gt;appendStylesheet('../css/jquery-ui-1.8.2.custom.css');<br />
//$this-&gt;headLink()-&gt;appendStylesheet('../css/adduser.css');<br />
<br />
?&gt;<br />
<br />
&lt;?php <br />
/*if (!empty($this-&gt;message)) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; echo $this-&gt;escape($this-&gt;message[0]);<br />
}*/<br />
?&gt;<br />
&lt;div id=&quot;resultados&quot;&gt;&lt;/div&gt;<br />
&lt;?php<br />
<br />
echo $this-&gt;form; <br />
<br />
<br />
?&gt;</code><hr />
</div> If you need to see more code just tell me, I've put what I think is affected by this issue.<br />
<br />
Thanks in advance.</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>conti</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/zend_form-ajax-5471.html</guid>
		</item>
		<item>
			<title>Multi row forms</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/multi-row-forms-5465.html</link>
			<pubDate>Tue, 24 Aug 2010 07:19:26 GMT</pubDate>
			<description>Hi, 
 
I want to create form that enables editing of more then one element from table. 
 
For example I have a Invoice form on which I have 1 or more...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I want to create form that enables editing of more then one element from table.<br />
<br />
For example I have a Invoice form on which I have 1 or more products.<br />
I should be able to change data for all product at the same page.<br />
<br />
What is the best way to do it ?<br />
<br />
I've found this article <a href="http://davidcaylor.com/2008/03/24/building-table-based-forms-in-zend_form/" target="_blank">Building table based forms in Zend_Form « David&amp;#039;s Tech Blog</a><br />
But it seams too complicated.</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>payonk</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/multi-row-forms-5465.html</guid>
		</item>
		<item>
			<title>linking to other controller/action</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/linking-other-controller-action-5331.html</link>
			<pubDate>Sun, 22 Aug 2010 15:44:10 GMT</pubDate>
			<description>Hi, 
I saw an exmaple of code for redirecting from one page to another page which is under a different controller. so i tried and used this code: 
...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
I saw an exmaple of code for redirecting from one page to another page which is under a different controller. so i tried and used this code:<br />
<br />
&lt;a href=&quot;&lt;?php echo $this-&gt;url(array('controller' =&gt; 'instructor', <br />
													     'action' =&gt; 'comments',<br />
													     'username' =&gt; $userData-&gt;username)); ?&gt;&quot;&gt;&lt;?php echo $userData-&gt;username?&gt;&lt;/a&gt;<br />
<br />
however it seems to add the parameter and its value (e.g. '/username/bob1') to the end of the URL in the browser. Is there a way to choose not to display it, or to redirect using a link in a different way?<br />
<br />
Cheers<br />
<br />
Nadav</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>nadav</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/linking-other-controller-action-5331.html</guid>
		</item>
		<item>
			<title>Extending Controllers</title>
			<link>http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/extending-controllers-5313.html</link>
			<pubDate>Fri, 20 Aug 2010 12:14:57 GMT</pubDate>
			<description>Hello! 
 
There are three controllers in /application/controllers: AController, BController and CController. I want the controllers B and C to extend...</description>
			<content:encoded><![CDATA[<div>Hello!<br />
<br />
There are three controllers in /application/controllers: AController, BController and CController. I want the controllers B and C to extend A, also:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">class BController extends AController {<br />
&nbsp; &nbsp; ...<br />
}</code><hr />
</div> and<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">class CController extends AController {<br />
&nbsp; &nbsp; ...<br />
}</code><hr />
</div> All these controllers have to stay in the folder &quot;/application/controllers&quot;.<br />
<br />
How can I do it?<br />
<br />
Thanks</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/">Model-View-Controller (MVC)</category>
			<dc:creator>automatix</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-components-13/model-view-controller-mvc-21/extending-controllers-5313.html</guid>
		</item>
	</channel>
</rss>
