<?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><![CDATA[Zend Framework Forum - Installation & Configuration]]></title>
		<link>http://www.zfforums.com/</link>
		<description />
		<language>en</language>
		<lastBuildDate>Thu, 09 Sep 2010 23:29:15 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://www.zfforums.com/images/misc/rss.png</url>
			<title><![CDATA[Zend Framework Forum - Installation & Configuration]]></title>
			<link>http://www.zfforums.com/</link>
		</image>
		<item>
			<title>MAMP include_path problem</title>
			<link>http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/mamp-include_path-problem-5501.html</link>
			<pubDate>Tue, 07 Sep 2010 23:00:36 GMT</pubDate>
			<description>Hi 
Im just starting my first Zend project but im having some problems with MAMP! 
 
i have the Zend Framework library/ folder installed in the root...</description>
			<content:encoded><![CDATA[<div>Hi<br />
Im just starting my first Zend project but im having some problems with MAMP!<br />
<br />
i have the Zend Framework library/ folder installed in the root of my project<br />
<br />
and have the php.ini include path set to <br />
<br />
(my project is helloworld)<br />
<br />
include_path = &quot;.:/Applications/MAMP/bin/php5.3/lib/php/:/Applications/MAMP/htdocs/helloworld/library/&quot;<br />
<br />
when i run the MAMP phpinfo() the include path for both local and master values says<br />
&quot;.:/Applications/MAMP/bin/php5.3/lib/php/:/Applications/MAMP/htdocs/helloworld/library/&quot;<br />
<br />
im sure when i have set up 2 dirs in the include path in the past it comes up with <br />
/Applications/MAMP/htdocs/helloworld/library/ for local value<br />
<br />
and<br />
.:/Applications/MAMP/bin/php5.3/lib/php/: for master value<br />
<br />
when i run the Zend_tool.... zf show version<br />
i get the following error:<br />
<br />
&quot;In order to run the zf command, you need to ensure that Zend Framework<br />
is inside your include_path.  &quot;<br />
<br />
anone come across this before and solved it?<br />
<br />
cheers</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/"><![CDATA[Installation & Configuration]]></category>
			<dc:creator>Bloodylyons</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/mamp-include_path-problem-5501.html</guid>
		</item>
		<item>
			<title>Can I install Zend Framework with PHP version 5.1?</title>
			<link>http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/can-i-install-zend-framework-php-version-5-1-a-5489.html</link>
			<pubDate>Wed, 01 Sep 2010 23:33:46 GMT</pubDate>
			<description>My hosting provider (shared linux environment) has no idea what Zend Framework is (they keep referring to Zend Optimizer - yeah I know), but they are...</description>
			<content:encoded><![CDATA[<div>My hosting provider (shared linux environment) has no idea what Zend Framework is (they keep referring to Zend Optimizer - yeah I know), but they are running PHP version 5.1:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Quote:</div>
	<div class="bbcode_quote printable">
		<hr />
		
			-bash-3.2$ php -v<br />
PHP 5.1.6 (cli) (built: Jan  4 2010 10:45:24) <br />
Copyright (c) 1997-2006 The PHP Group<br />
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies<br />
    with Zend Extension Manager v1.2.0, Copyright (c) 2003-2007, by Zend Technologies<br />
    with Zend Optimizer v3.2.6, Copyright (c) 1998-2007, by Zend Technologies
			
		<hr />
	</div>
</div> The Zend Framework documentation says:<br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Quote:</div>
	<div class="bbcode_quote printable">
		<hr />
		
			Zend recommends the most current release of PHP for critical security and performance enhancements, and currently supports PHP 5.2.4 or later. 
			
		<hr />
	</div>
</div> When I run zend tool I get this error:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Quote:</div>
	<div class="bbcode_quote printable">
		<hr />
		
			-bash-3.2$ ./zf.sh --help<br />
PHP Fatal error:  Cannot access self:: when no class scope is active in /vservers/davidhaskins/zend2/ZendFramework-1.10.8-minimal/library/Zend/Tool/Framework/Provider/Signature.php on line 355<br />
<br />
Fatal error: Cannot access self:: when no class scope is active in /vservers/davidhaskins/zend2/ZendFramework-1.10.8-minimal/library/Zend/Tool/Framework/Provider/Signature.php on line 355
			
		<hr />
	</div>
</div> <br />
I'm wondering if it has something to do with the version of PHP?  Is there anything else I can test?<br />
<br />
Thanks!</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/"><![CDATA[Installation & Configuration]]></category>
			<dc:creator>david_g17</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/can-i-install-zend-framework-php-version-5-1-a-5489.html</guid>
		</item>
		<item>
			<title>Wamp Problem</title>
			<link>http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/wamp-problem-5488.html</link>
			<pubDate>Wed, 01 Sep 2010 19:28:51 GMT</pubDate>
			<description><![CDATA[Hi there, 
 
I've been developing a website using the zend framework on zend server community edition, also I tried to use the zend framework in...]]></description>
			<content:encoded><![CDATA[<div>Hi there,<br />
<br />
I've been developing a website using the zend framework on zend server community edition, also I tried to use the zend framework in another server (wamp) and I put the package Zend at the library folder in the main folder of my project.<br />
<br />
The problem is that when I try to access the content of the model in a view by the foreach, the special characters (like ã,ó,ã) aren't shown, just the other common characters.<br />
<br />
I thought that could be a problem of charset, but the mysql is set using utf-8, the application.ini has this resources.db.params.charset = &quot;utf-8&quot;, and the archive of the view also is set as utf-8.<br />
<br />
Below there are the images of the view and the image of the screen with problem:<br />
<br />
<a href="http://www.zfforums.com/attachments/zend-framework-general-discussions-1/installation-configuration-3/wamp-problem-89-view.jpg"  title="Name:  
Views: 
Size:  ">Attachment 89</a><a href="http://www.zfforums.com/attachments/zend-framework-general-discussions-1/installation-configuration-3/wamp-problem-90-tela.jpg"  title="Name:  
Views: 
Size:  ">Attachment 90</a><br />
<br />
here is the code of my controller:<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">public function mininewsAction()<br />
&nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  try {<br />
&nbsp; &nbsp; &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;headMeta()-&gt;appendHttpEquiv('Content-Type',<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  'text/html; charset=UTF-8')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;appendHttpEquiv('Content-Language', 'pt-BR');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $agenda = new Application_Model_Agenda();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $mapper = new Application_Model_AgendaMapper();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;view-&gt;agenda = $mapper-&gt;fetchAll(5);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  } catch (Zend_Exception $e) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo $e-&gt;getMessage();<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;getHelper('layout')-&gt;disableLayout();<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; }</code><hr />
</div> <br />
SomeOne could help-me please?!! :(<br />
<br />
I discovered that this problem is related to the database mysql. But I don't know yet what is wrong!</div>


	<div style="padding:10px">

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
			<ul>
			<li>
	<img class="inlineimg" src="/jpg.gif" alt="File Type: jpg" />
	<a href="http://www.zfforums.com/attachments/zend-framework-general-discussions-1/installation-configuration-3/wamp-problem-89d1283368874-view.jpg">view.JPG</a> 
(43.1 KB)
</li> <li>
	<img class="inlineimg" src="/jpg.gif" alt="File Type: jpg" />
	<a href="http://www.zfforums.com/attachments/zend-framework-general-discussions-1/installation-configuration-3/wamp-problem-90d1283368885-tela.jpg">tela.JPG</a> 
(18.9 KB)
</li> 
			</ul>
			</fieldset>
	

	

	</div>
 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/"><![CDATA[Installation & Configuration]]></category>
			<dc:creator>ThiagoHCPrudente</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/wamp-problem-5488.html</guid>
		</item>
		<item>
			<title>Zend_Tool only works in home dir</title>
			<link>http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/zend_tool-only-works-home-dir-5479.html</link>
			<pubDate>Sun, 29 Aug 2010 21:04:32 GMT</pubDate>
			<description>Hi,  
 
I work on a MacBook with Snow Leopard.  
I setup Zend_Tool CLI like in the ZF Manual.  
zf show version gives me the right version.  
I made...</description>
			<content:encoded><![CDATA[<div>Hi, <br />
<br />
I work on a MacBook with Snow Leopard. <br />
I setup Zend_Tool CLI like in the ZF Manual. <br />
zf show version gives me the right version. <br />
I made a subdir in my home dir to house all my projects, but when I do zf create project &quot;name&quot; I get the error <br />
&quot;Context by name providersDirectory does not exist in the registry&quot;. <br />
<br />
When I run it from the home dir, there is no problem. <br />
Anyone knows what's going on?</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/"><![CDATA[Installation & Configuration]]></category>
			<dc:creator>vrxj</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/zend_tool-only-works-home-dir-5479.html</guid>
		</item>
		<item>
			<title>Configuring path to APP_ROOT/library</title>
			<link>http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/configuring-path-app_root-library-5301.html</link>
			<pubDate>Fri, 13 Aug 2010 11:36:49 GMT</pubDate>
			<description><![CDATA[Hello, 
 
I am a newbee and I'm not able to set my ZF based application's path to APP_ROOT/library directory. 
 
I implemented a class 
 
Code:...]]></description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I am a newbee and I'm not able to set my ZF based application's path to APP_ROOT/library directory.<br />
<br />
I implemented a class<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">class App_Model_Test<br />
{<br />
&nbsp; ...<br />
}</code><hr />
</div> and I inserted it to the directory APP_ROOT/library/App/Model and called the file Test.php.<br />
<br />
I generated basic app structure by Zend_Tool, so there is following code in APP_ROOT/public/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 />
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));<br />
<br />
// Define application environment<br />
defined('APPLICATION_ENV')<br />
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));<br />
<br />
// Ensure library/ is on include_path<br />
set_include_path(implode(PATH_SEPARATOR, <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  array(realpath(APPLICATION_PATH . '/../library'),<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  get_include_path())));</code><hr />
</div> So I think path to the APP_ROOT/library is defined in application.<br />
<br />
But the problem is, that it shows me an error <b>Class not found</b> when I call class App_Model_Test in some controller.<br />
<br />
Second thing, I wolud like to show classes defined in this library directory in eclipse's autocompleter...<br />
<br />
How can I resolve these?<br />
Thanks for help!</div>

 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/"><![CDATA[Installation & Configuration]]></category>
			<dc:creator>xmikul28</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/configuring-path-app_root-library-5301.html</guid>
		</item>
		<item>
			<title>Zend_Form Problem with Dojo Elements</title>
			<link>http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/zend_form-problem-dojo-elements-5298.html</link>
			<pubDate>Fri, 13 Aug 2010 08:11:06 GMT</pubDate>
			<description><![CDATA[Hello everybody, 
 
i have some Problems with the Dojo_Elements. Maybe someone can help me out, because i didn't get the Problem. 
 
So first of all,...]]></description>
			<content:encoded><![CDATA[<div>Hello everybody,<br />
<br />
i have some Problems with the Dojo_Elements. Maybe someone can help me out, because i didn't get the Problem.<br />
<br />
So first of all, we don't use a mvc structure, we only use Zend as a Component-Lib and i want to write a formhandling class on top of zend_form.<br />
<br />
All is going well, i can create form-elements and add them to my viewscript, but i didn't get dojo enabled and dojo Elements are shown as normal elements and no javascript actions are attached.:confused:<br />
<br />
Maybe that's a stupid question, but i was reading the Documentation over and over again and i didn't found a solution.:(<br />
<br />
Has anyone please a solution for me, or a usefull tipp?<br />
<br />
best regards cfreak<br />
<br />
I attached a screenshot and my scripts and classes above for a better understanding, because my english is not the best. :D<br />
<br />
<b>For example the last form-element in this script (TimeTextBox):</b><br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code">$form = new form_processor();<br />
$form-&gt;setAction('')-&gt;setMethod('post');<br />
<br />
$vorname = $form-&gt;createElement('text', 'vorname')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('alnum')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('regex', false, array('/^[a-z-]+/'))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setRequired(true)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setLabel('Vorname')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setErrorMessages(array(&quot;Bitte geben Sie nur Buschstaben [a-Z] oder - ein.&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setDescription(&quot;Beschreibung des Vornamens&quot;);<br />
<br />
$nachname = $form-&gt;createElement('text', 'nachname')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('alnum')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('regex', false, array('/^[a-z-]+/'))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setRequired(true)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setLabel('Nachname')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setErrorMessages(array(&quot;Bitte geben Sie nur Buschstaben [a-Z] oder - ein.&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setDescription(&quot;Beschreibung des Nachnamens&quot;);<br />
<br />
$geburtsdatum = $form-&gt;createElement('text', 'geburtsdatum')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('date', &quot;dd.MM.YYYY&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setRequired(true)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setLabel('Geburtsdatum')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setErrorMessages(array(&quot;Bitte geben Sie ein gültiges Geburtsdatum ein.&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setDescription(&quot;Beschreibung des Geburtsdatums&quot;);<br />
<br />
$strasse = $form-&gt;createElement('text', 'strasse')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('alnum')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('regex', false, array('/^[a-z-.]+/'))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setRequired(true)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setLabel('Strasse')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setErrorMessages(array(&quot;Bitte geben Sie nur Buschstaben [a-Z] oder folgende Zeichen -,. ein.&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setDescription(&quot;Beschreibung der Strasse&quot;);<br />
<br />
$nationalitaet = $form-&gt;createElement('text', 'nationalitaet')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('alnum')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('regex', false, array('/^[a-z-.]+/'))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setRequired(true)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setLabel('Nationalität')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setErrorMessages(array(&quot;Bitte geben Sie nur Buschstaben [a-Z] oder folgende Zeichen -,. ein.&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setDescription(&quot;Beschreibung der Nationalität&quot;);<br />
<br />
$geschlecht = $form-&gt;createElement('radio', 'geschlecht')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setRequired(true)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setLabel('Geschlecht')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addMultiOption('male', &quot;männlich&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addMultiOption('female', &quot;weiblich&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setErrorMessages(array(&quot;Bitte Männlich oder Weiblich auswählen&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setDescription(&quot;Beschreibung der Geschlecht&quot;);<br />
<br />
$taetigkeit = $form-&gt;createElement('text', 'taetigkeit')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('alnum')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addValidator('regex', false, array('/^[a-z-.]+/'))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setRequired(true)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setLabel('Tätigkeit')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setErrorMessages(array(&quot;Bitte geben Sie nur Buschstaben [a-Z] oder folgende Zeichen -,. ein.&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setDescription(&quot;Beschreibung der Tätigkeit&quot;);<br />
<br />
$arbeitsstatus = $form-&gt;createElement('radio', 'arbeitsstatus')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setRequired(true)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setLabel('Arbeitsverhältnis')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addMultiOption('angestellt', &quot;angestellt&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addMultiOption('selbstständig', &quot;selbstständig&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addMultiOption('beamter', &quot;Beamter&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setErrorMessages(array(&quot;Bitte Männlich oder Weiblich auswählen&quot;))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setDescription(&quot;Beschreibung des Arbeitsverhältnis&quot;);<br />
<br />
$test = $form-&gt;createElement('TimeTextBox','foobar')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;setOptions(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'am.pm'&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&gt; false,<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'visibleIncrement' =&gt; 'T00:05:00', <br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'visibleRange'&nbsp; &nbsp;  =&gt; 'T02:00:00', <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; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 'size' =&gt; 10,<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; &nbsp; &nbsp; &nbsp; &nbsp; )<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -&gt;setLabel('DojoTest');<br />
<br />
<br />
<br />
$submit = $form-&gt;createElement('submit', 'submit')<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setValue('Login');<br />
<br />
// Add elements to form:<br />
$form-&gt;addElement($vorname)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addElement($nachname)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addElement($geburtsdatum)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addElement($strasse)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addElement($nationalitaet)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addElement($geschlecht)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addElement($taetigkeit)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addElement($arbeitsstatus)<br />
&nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addElement($test)<br />
&nbsp; &nbsp;  -&gt;addElement($submit);<br />
<br />
$form-&gt;build_form();</code><hr />
</div> <b>And thats the Class:</b><br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code"> <br />
class form_processor extends Zend_Dojo_Form<br />
{<br />
&nbsp; &nbsp; &nbsp; &nbsp; /**<br />
&nbsp; &nbsp; &nbsp; &nbsp;  * @var zend_view object $view<br />
&nbsp; &nbsp; &nbsp; &nbsp;  */<br />
&nbsp; &nbsp; &nbsp; &nbsp; public $tpl = null;<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; function __construct()<br />
&nbsp; &nbsp; &nbsp; &nbsp; {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; parent::__construct();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;tpl = new Zend_View();<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Zend_Dojo::enableView($this-&gt;tpl);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;tpl-&gt;setEncoding('ISO-8859-1');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;tpl-&gt;doctype('XHTML1_TRANSITIONAL');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;tpl-&gt;setScriptPath(FW_CONFIG_DATA_PATH.'/assekuranz/krankenversicherung/risikovoranfrage/');<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;tpl-&gt;addHelperPath(FW_CONFIG_LIB_PATH.'/3rd/ZendFramework/library/Zend/Dojo/View/Helper/', 'Zend_Dojo_View_Helper');<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; function build_form() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;tpl-&gt;form = $this;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; function createElement($type, $name, $options = null) {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ret_element = parent::createElement($type, $name, $options);<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ret_element-&gt;setView($this-&gt;tpl);<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Only a short fix, because i don't have a TimeTextBox.phtml yet<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if($type != 'TimeTextBox') {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ret_element-&gt;viewScript = $type.'.phtml';<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $ret_element-&gt;setDecorators(array(array('ViewScript', array('class' =&gt; 'form field_element'))));<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return $ret_element;<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; function&nbsp; render() {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return $this-&gt;tpl-&gt;render('risikovoranfrage.phtml');<br />
&nbsp; &nbsp; &nbsp; &nbsp; }<br />
}</code><hr />
</div> <b>and thats the Viewscript:</b><br />
<br />
<div class="bbcode_container">
	<div class="bbcode_description">Code:</div>
	<hr /><code class="bbcode_code"><br />
&lt;form class=&quot;zend_form&quot; action=&quot;&lt;?= $this-&gt;escape($this-&gt;form-&gt;getAction()) ?&gt;&quot; method=&quot;&lt;?= $this-&gt;escape($this-&gt;form-&gt;getMethod()) ?&gt;&quot;&gt;<br />
<br />
&lt;?php if ($this-&gt;dojo()-&gt;isEnabled()){<br />
&nbsp; &nbsp; $this-&gt;dojo()<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;setCdnBase(Zend_Dojo::CDN_BASE_GOOGLE)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  -&gt;addStyleSheetModule('dijit.themes.tundra');<br />
&nbsp;  echo $this-&gt;dojo();<br />
&nbsp; &nbsp; } else {<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; echo &quot;No Dojo&quot;;<br />
&nbsp;  }<br />
?&gt;<br />
<br />
&lt;?php<br />
//foreach($this-&gt;form-&gt;getMessages() as $error_msg) {<br />
//&nbsp; &nbsp; &nbsp; &nbsp; echo $this-&gt;formErrors($error_msg);<br />
//}<br />
//var_dump($this-&gt;form);<br />
?&gt;<br />
<br />
&lt;?php echo $this-&gt;form-&gt;vorname ?&gt;<br />
&lt;?php echo $this-&gt;form-&gt;nachname ?&gt;<br />
&lt;?php echo $this-&gt;form-&gt;geburtsdatum ?&gt;<br />
&lt;?php echo $this-&gt;form-&gt;strasse ?&gt;<br />
&lt;?php echo $this-&gt;form-&gt;nationalitaet ?&gt;<br />
&lt;?php echo $this-&gt;form-&gt;geschlecht ?&gt;<br />
&lt;?php echo $this-&gt;form-&gt;foobar ?&gt;<br />
&lt;?php echo $this-&gt;form-&gt;submit ?&gt;<br />
&lt;/form&gt;</code><hr />
</div> </div>


	<div style="padding:10px">

	

	

	
		<fieldset class="fieldset">
			<legend>Attached Images</legend>
			<ul>
			<li>
	<img class="inlineimg" src="/jpg.gif" alt="File Type: jpg" />
	<a href="http://www.zfforums.com/attachments/zend-framework-general-discussions-1/installation-configuration-3/zend_form-problem-dojo-elements-88d1281945371-2010-08-13-10-01-46.jpg">2010-08-13 10 01 46.jpg</a> 
(17.4 KB)
</li> 
			</ul>
			</fieldset>
	

	

	</div>
 ]]></content:encoded>
			<category domain="http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/"><![CDATA[Installation & Configuration]]></category>
			<dc:creator>cfreak</dc:creator>
			<guid isPermaLink="true">http://www.zfforums.com/zend-framework-general-discussions-1/installation-configuration-3/zend_form-problem-dojo-elements-5298.html</guid>
		</item>
	</channel>
</rss>
