2008年9月30日星期二

Re: [fw-mvc] Zend_Form_Captcha_Image and GD Font path problem

-- S?ébastien Cramatte <scramatte@zensoluciones.com> wrote
(on Tuesday, 30 September 2008, 07:21 PM +0200):
> Hello,
>
> I'm running ZF 1.6 and I would like to test Zend_Form_Captcha_Image.
> My server runs debian lenny and php 5.2.3 with GD
>
> When I call the form with captcha element I obtain these error
>
> Warning: imageftbbox() [function.imageftbbox]: Could not find/open font
> in /home/vhosts/d/default/library/Zend/Captcha/Image.php on line 388
> Warning: imagefttext() [function.imagefttext]: Could not find/open font
> in /home/vhosts/d/default/library/Zend/Captcha/Image.php on line 391
>
>
> --- ZEND FORM extract ---
> ...
> $elt = new Zend_Form_Element_Captcha('foo', array(
> 'label' => "Please verify you're a human",
> 'captcha' => array(
> 'captcha' => 'Image',
> 'font' => 'arial',
> 'imgDir' => './share/img/captchas/',
> 'wordLen' => 6,
> 'timeout' => 300,
> ),
> ));
>
> $this->addElement($elt);
> ...
> ---
>
> I've installed arial.ttf in my www root and I've setup GDFONTPATH env
> variable to point to this dir.
> Unfortunately doesn't works

You need to specify the font file's extension (i.e., 'arial.ttf', not
just 'arial'); if that still doesn't work, you may need to specify the
full path to the font.

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

Re: [fw-mvc] Zend_Paginator Partial

Yea I looked on the docs and didn't see it,   thanks for the info.

On Tue, Sep 30, 2008 at 5:00 PM, Daniel Skinner <skinner@destiny-denied.co.uk> wrote:
http://framework.zend.com/issues/browse/ZF-4430

Kind Regards,

*Daniel Skinner*



Daniel Skinner wrote:
In your view script:

<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination_control.phtml', array('specification' => $this->currentSpecificationUID)); ?>

The method signature is:

paginationControl(Zend_Paginator $paginator, $paginationType, $paginationPartialScript, Array $partialParameters = array);

So In my above example I passed the 'specification' parameter and it's available in the pagination control partial as $this->specification.

I think this should be noted in the documentation on Zend_Paginator somewhere. Shall I create an issue?

Kind Regards,

*Daniel Skinner*

*Tel:* 01977 87 80 22
*Fax:* 08455 08 36 15
*Mobile:* 07791 360 230
skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>
www.destiny-denied.co.uk <http://www.destiny-denied.co.uk/>



Gabriel Baez wrote:
Could you give an example on how   you would  pass the search parameters to the pagination control helper?  thanks.

On Sun, Sep 28, 2008 at 4:28 AM, Daniel Skinner <skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>> wrote:

   Thanks Matt, I didn't realise that you could pass parameters to
   the PaginationControl partial - I should have looked at the API
   docs in more detail.

   Daniel

   Matthew Ratzloff wrote:

       One way to do it:

       1. Submit form as GET
       2. Controller looks at Request object to pull appropriate
       search parameters
       2. Uses search parameters to create SQL query, which it
       passes to paginator
       3. Passes paginator and search parameters (including current
       page number) to PaginationControl helper

       -Matt

       On Wed, Sep 24, 2008 at 2:39 PM, Daniel Skinner
       <skinner@destiny-denied.co.uk
       <mailto:skinner@destiny-denied.co.uk>
       <mailto:skinner@destiny-denied.co.uk
       <mailto:skinner@destiny-denied.co.uk>>> wrote:

          I am using Zend_Paginator in a very standard setup.

          My index action of the controller produces a form. Also,
       if the
          form is filled in (i.e. is valid), it (the same index action)
          proceeds to generate a collection of objects filtered by
          information entered into the form. This collection of
       objects in
          then paginated and all is well for the first page of results.

          When I click onto the next page, the form data is not sent
       and so
          there is no model for the paginator to work with.

          My immediate idea was to add an additional parameter to the
          first/next/last/prev links which could be used to
       regenerate the
          same model as the paginator was using with page 1.

          The problem is that the pagination control is a partial
       and I cant
          figure out how to pass global view variables to it.

          Is there a way to do this or is my general approach (i.e.
       adding
          query strings to the paginator URI's) wrong?

          --
          Kind Regards,

          *Daniel Skinner*

          *Tel:* 01977 87 80 22
          *Fax:* 08455 08 36 15
          *Mobile:* 07791 360 230
          skinner@destiny-denied.co.uk
       <mailto:skinner@destiny-denied.co.uk>
       <mailto:skinner@destiny-denied.co.uk
       <mailto:skinner@destiny-denied.co.uk>>
          <mailto:skinner@destiny-denied.co.uk
       <mailto:skinner@destiny-denied.co.uk>
          <mailto:skinner@destiny-denied.co.uk
       <mailto:skinner@destiny-denied.co.uk>>>
          www.destiny-denied.co.uk <http://www.destiny-denied.co.uk>
       <http://www.destiny-denied.co.uk>
          <http://www.destiny-denied.co.uk/>






Re: [fw-mvc] Zend_Paginator Partial

http://framework.zend.com/issues/browse/ZF-4430

Kind Regards,

*Daniel Skinner*

Daniel Skinner wrote:
> In your view script:
>
> <?php echo $this->paginationControl($this->paginator, 'Sliding',
> 'pagination_control.phtml', array('specification' =>
> $this->currentSpecificationUID)); ?>
>
> The method signature is:
>
> paginationControl(Zend_Paginator $paginator, $paginationType,
> $paginationPartialScript, Array $partialParameters = array);
>
> So In my above example I passed the 'specification' parameter and it's
> available in the pagination control partial as $this->specification.
>
> I think this should be noted in the documentation on Zend_Paginator
> somewhere. Shall I create an issue?
>
> Kind Regards,
>
> *Daniel Skinner*
>
> *Tel:* 01977 87 80 22
> *Fax:* 08455 08 36 15
> *Mobile:* 07791 360 230
> skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>
> www.destiny-denied.co.uk <http://www.destiny-denied.co.uk/>
>
>
>
> Gabriel Baez wrote:
>> Could you give an example on how you would pass the search
>> parameters to the pagination control helper? thanks.
>>
>> On Sun, Sep 28, 2008 at 4:28 AM, Daniel Skinner
>> <skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>>
>> wrote:
>>
>> Thanks Matt, I didn't realise that you could pass parameters to
>> the PaginationControl partial - I should have looked at the API
>> docs in more detail.
>>
>> Daniel
>>
>> Matthew Ratzloff wrote:
>>
>> One way to do it:
>>
>> 1. Submit form as GET
>> 2. Controller looks at Request object to pull appropriate
>> search parameters
>> 2. Uses search parameters to create SQL query, which it
>> passes to paginator
>> 3. Passes paginator and search parameters (including current
>> page number) to PaginationControl helper
>>
>> -Matt
>>
>> On Wed, Sep 24, 2008 at 2:39 PM, Daniel Skinner
>> <skinner@destiny-denied.co.uk
>> <mailto:skinner@destiny-denied.co.uk>
>> <mailto:skinner@destiny-denied.co.uk
>> <mailto:skinner@destiny-denied.co.uk>>> wrote:
>>
>> I am using Zend_Paginator in a very standard setup.
>>
>> My index action of the controller produces a form. Also,
>> if the
>> form is filled in (i.e. is valid), it (the same index action)
>> proceeds to generate a collection of objects filtered by
>> information entered into the form. This collection of
>> objects in
>> then paginated and all is well for the first page of results.
>>
>> When I click onto the next page, the form data is not sent
>> and so
>> there is no model for the paginator to work with.
>>
>> My immediate idea was to add an additional parameter to the
>> first/next/last/prev links which could be used to
>> regenerate the
>> same model as the paginator was using with page 1.
>>
>> The problem is that the pagination control is a partial
>> and I cant
>> figure out how to pass global view variables to it.
>>
>> Is there a way to do this or is my general approach (i.e.
>> adding
>> query strings to the paginator URI's) wrong?
>>
>> --
>> Kind Regards,
>>
>> *Daniel Skinner*
>>
>> *Tel:* 01977 87 80 22
>> *Fax:* 08455 08 36 15
>> *Mobile:* 07791 360 230
>> skinner@destiny-denied.co.uk
>> <mailto:skinner@destiny-denied.co.uk>
>> <mailto:skinner@destiny-denied.co.uk
>> <mailto:skinner@destiny-denied.co.uk>>
>> <mailto:skinner@destiny-denied.co.uk
>> <mailto:skinner@destiny-denied.co.uk>
>> <mailto:skinner@destiny-denied.co.uk
>> <mailto:skinner@destiny-denied.co.uk>>>
>> www.destiny-denied.co.uk <http://www.destiny-denied.co.uk>
>> <http://www.destiny-denied.co.uk>
>> <http://www.destiny-denied.co.uk/>
>>
>>
>>
>>

Re: [fw-mvc] Zend_Form_Captcha_Image and GD Font path problem

Hello,

It works ! I've specified the path and fix somes permissionss on filesystem.
What happens now is that i can see the captcha more 2 fields and when
I try to validate alway tell me that captcha value is invalid

Regards

Hector Virgen escribió:
> Try setting 'font' to 'arial.ttf'. I believe the GD library needs a
> path to the font, not a font name.
>
> -Hector
>
> On Tue, Sep 30, 2008 at 10:21 AM, SŽébastien Cramatte
> <scramatte@zensoluciones.com <mailto:scramatte@zensoluciones.com>> wrote:
>
> Hello,
>
> I'm running ZF 1.6 and I would like to test Zend_Form_Captcha_Image.
> My server runs debian lenny and php 5.2.3 with GD
>
> When I call the form with captcha element I obtain these error
>
> Warning: imageftbbox() [function.imageftbbox]: Could not find/open
> font in /home/vhosts/d/default/library/Zend/Captcha/Image.php on
> line 388
> Warning: imagefttext() [function.imagefttext]: Could not find/open
> font in /home/vhosts/d/default/library/Zend/Captcha/Image.php on
> line 391
>
>
> --- ZEND FORM extract ---
> ...
> $elt = new Zend_Form_Element_Captcha('foo', array(
> 'label' => "Please verify you're a human",
> 'captcha' => array(
> 'captcha' => 'Image',
> 'font' => 'arial',
> 'imgDir' => './share/img/captchas/',
> 'wordLen' => 6,
> 'timeout' => 300,
> ),
> ));
>
> $this->addElement($elt);
> ...
> ---
>
> I've installed arial.ttf in my www root and I've setup
> GDFONTPATH env variable to point to this dir.
> Unfortunately doesn't works
>
>
> Thank you for your help
>
> Best regards
>
>
>
>

Re: [fw-mvc] Zend_Paginator Partial

In your view script:

<?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination_control.phtml', array('specification' => $this->currentSpecificationUID)); ?>

The method signature is:

paginationControl(Zend_Paginator $paginator, $paginationType, $paginationPartialScript, Array $partialParameters = array);

So In my above example I passed the 'specification' parameter and it's available in the pagination control partial as $this->specification.

I think this should be noted in the documentation on Zend_Paginator somewhere. Shall I create an issue?

Kind Regards,

Daniel Skinner

Tel: 01977 87 80 22
Fax: 08455 08 36 15
Mobile: 07791 360 230
skinner@destiny-denied.co.uk
www.destiny-denied.co.uk



Gabriel Baez wrote:
Could you give an example on how   you would  pass the search parameters to the pagination control helper?  thanks.

On Sun, Sep 28, 2008 at 4:28 AM, Daniel Skinner <skinner@destiny-denied.co.uk> wrote:
Thanks Matt, I didn't realise that you could pass parameters to the PaginationControl partial - I should have looked at the API docs in more detail.

Daniel

Matthew Ratzloff wrote:
One way to do it:

1. Submit form as GET
2. Controller looks at Request object to pull appropriate search parameters
2. Uses search parameters to create SQL query, which it passes to paginator
3. Passes paginator and search parameters (including current page number) to PaginationControl helper

-Matt

On Wed, Sep 24, 2008 at 2:39 PM, Daniel Skinner <skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>> wrote:

   I am using Zend_Paginator in a very standard setup.

   My index action of the controller produces a form. Also, if the
   form is filled in (i.e. is valid), it (the same index action)
   proceeds to generate a collection of objects filtered by
   information entered into the form. This collection of objects in
   then paginated and all is well for the first page of results.

   When I click onto the next page, the form data is not sent and so
   there is no model for the paginator to work with.

   My immediate idea was to add an additional parameter to the
   first/next/last/prev links which could be used to regenerate the
   same model as the paginator was using with page 1.

   The problem is that the pagination control is a partial and I cant
   figure out how to pass global view variables to it.

   Is there a way to do this or is my general approach (i.e. adding
   query strings to the paginator URI's) wrong?

   --
   Kind Regards,

   *Daniel Skinner*

   *Tel:* 01977 87 80 22
   *Fax:* 08455 08 36 15
   *Mobile:* 07791 360 230
   skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>
   <mailto:skinner@destiny-denied.co.uk
   <mailto:skinner@destiny-denied.co.uk>>
   www.destiny-denied.co.uk <http://www.destiny-denied.co.uk>
   <http://www.destiny-denied.co.uk/>




Re: [fw-mvc] Zend_Paginator Partial

Could you give an example on how   you would  pass the search parameters to the pagination control helper?  thanks.

On Sun, Sep 28, 2008 at 4:28 AM, Daniel Skinner <skinner@destiny-denied.co.uk> wrote:
Thanks Matt, I didn't realise that you could pass parameters to the PaginationControl partial - I should have looked at the API docs in more detail.

Daniel

Matthew Ratzloff wrote:
One way to do it:

1. Submit form as GET
2. Controller looks at Request object to pull appropriate search parameters
2. Uses search parameters to create SQL query, which it passes to paginator
3. Passes paginator and search parameters (including current page number) to PaginationControl helper

-Matt

On Wed, Sep 24, 2008 at 2:39 PM, Daniel Skinner <skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>> wrote:

   I am using Zend_Paginator in a very standard setup.

   My index action of the controller produces a form. Also, if the
   form is filled in (i.e. is valid), it (the same index action)
   proceeds to generate a collection of objects filtered by
   information entered into the form. This collection of objects in
   then paginated and all is well for the first page of results.

   When I click onto the next page, the form data is not sent and so
   there is no model for the paginator to work with.

   My immediate idea was to add an additional parameter to the
   first/next/last/prev links which could be used to regenerate the
   same model as the paginator was using with page 1.

   The problem is that the pagination control is a partial and I cant
   figure out how to pass global view variables to it.

   Is there a way to do this or is my general approach (i.e. adding
   query strings to the paginator URI's) wrong?

   --
   Kind Regards,

   *Daniel Skinner*

   *Tel:* 01977 87 80 22
   *Fax:* 08455 08 36 15
   *Mobile:* 07791 360 230
   skinner@destiny-denied.co.uk <mailto:skinner@destiny-denied.co.uk>
   <mailto:skinner@destiny-denied.co.uk
   <mailto:skinner@destiny-denied.co.uk>>
   www.destiny-denied.co.uk <http://www.destiny-denied.co.uk>
   <http://www.destiny-denied.co.uk/>




Re: [fw-mvc] Zend_View_Helper_HeadTitle - how to unset previously set title?

Hi,

On 30.9.2008 18:04, temuri wrote:
> I thought that doing this would clear page title:
>
> $viewRenderer->view->headTitle(NULL,
> Zend_View_Helper_Placeholder_Container_Abstract::SET);
>
> But it does not.
>
> Any idea how it can be done without extending/overriding... ?

This is how I do it:

$viewRenderer->view->headTitle()->getContainer()->exchangeArray(array());

Regards,
Marian

Re: [fw-mvc] [Zend_Form] Bad adress in

Silver Zachara wrote:
>
> Hi all,
>
> now I'm playing and testing example from
>
http://framework.zend.com/docs/quickstart/ (so official quickstart), bud
> I have problem now.
>
> When I try post form, so I get error message that
> guestbook/sign(controller/action) isn't right.
>
> The URI to the public direcoty of my example is
> http://localhost/mvc-zend-test/public/index.php
>
> Of course I have set up:
> $frontController->setBaseUrl('/mvc-zend-test/public');
>
>
> And I have tried:
> $this->setMethod('post')
> ->setAction('different addresses');
>
> And in my .htaccess, which is in directory /mvc-zend-test/public/ I have
> set up this too:
> RewriteBase /mvc-zend-test/public
>
> I except, that Zend_From take over the base address from which is set in
> Zend_Controller_Front,
> Ocekaval jsem, ze Zend_Form se zaridi podle adresy nastavene ve
> Zend_Controller_Front which would be logical behavior, but he ignores it.
>
> How can I resolve this problem ?
>
>

The solution is:
// $form->setAction($this->_helper->url('sign'));
$form->setAction($this->_helper->url->url());

So the the Oficial Quickstart could by adjusted.

--
View this message in context: http://www.nabble.com/-Zend_Form--Bad-adress-in-%3Cform-action%3D%22%22-tp19746329p19749548.html
Sent from the Zend MVC mailing list archive at Nabble.com.

Re: [fw-mvc] Integrating non MVC code with Route_Regex?

I want to thank Matthew Weier O'Phinney for solving this problem in
another thread!

His response on the "Re: [fw-mvc] OT - Rewrite rule for Zend" thread
is all the clue I needed to answer my question. After updating to
the latest ModRewrite configuration, I have successfully removed all
of my "Old World" support modules on my laptop, and my only holdback
on the live server appears to be a lingering ModRewrite bug in its
older version of Apache. When my Apache is updated, all evidence
seems to show that the new ModRewrite commands will allow me to run
my old code entirely unimpeded by the new ZF support!

You guys are brilliant! Keep up the good work!

Tim Stiles,
WatchMaker

On Sep 28, 2008, at 2:25 PM, Tim Stiles wrote:

> I'm getting pretty comfortable with ZF for new MVC work, and I've
> found a way to incorporate my existing modular CMS code, but I'm
> looking for less intrusive setup.
>
> In the old code, all deliverable pages resided in /html/
> (deliverable support files in /images/, /css/, etc.), while various
> modular support files for the system are Included from within
> folders such as /publish/, /banners/, /events/, etc.
>
> e.g.: A request for /html/home.htm will use PHP's include_once to
> call files such as /publish/publish.php and /event/events.php which
> contain methods that render content.
>
> In a ZF MVC setup, I have a Route configured for "html/*" that
> sends to a Controller which gets the $_SERVER['REQUEST_URI']
> string, verifies that the file actually exists, and then performs a
> PHP include for it within the Controller's View script. The end
> result is that the old systems work transparently under a ZF MVC
> setup, and that lets me easily incorporate new MVC based systems
> (until I can replace the old ones).
>
> The drawback is that I have to duplicate this exact Route/
> Controller code for each "old world" module folders the site runs:
> a new module and controller set up for each of "publish/*", "events/
> *", "banners/*", etc...
>
> Within each of these "old world" support Controllers, there are no
> specific references to files or paths - everything is built off of
> the REQUEST_URI string, so the code is identical, just repeated in
> multiple module setups.
>
> This is tedious to set up, and my gut instinct says that combining
> these multiple Routes may mean faster page delivery, even if it
> does include a regular expression.
>
>
>
> Can these standard Routes be consolidated into a single "Old World
> support" module using Zend_Controller_Router_Route_Regex?
> I've tried using routes such as "(html|publish|events)/(\d+)" and
> "(html|publish|events)/*" with no luck. They don't seem to
> identify the Route properly
>
> Tim Stiles,
> WatchMaker, Icomex.com
>
>
>

[fw-mvc] Zend_Form_Captcha_Image and GD Font path problem

Hello,

I'm running ZF 1.6 and I would like to test Zend_Form_Captcha_Image.
My server runs debian lenny and php 5.2.3 with GD

When I call the form with captcha element I obtain these error

Warning: imageftbbox() [function.imageftbbox]: Could not find/open font
in /home/vhosts/d/default/library/Zend/Captcha/Image.php on line 388
Warning: imagefttext() [function.imagefttext]: Could not find/open font
in /home/vhosts/d/default/library/Zend/Captcha/Image.php on line 391

--- ZEND FORM extract ---
...
$elt = new Zend_Form_Element_Captcha('foo', array(
'label' => "Please verify you're a human",
'captcha' => array(
'captcha' => 'Image',
'font' => 'arial',
'imgDir' => './share/img/captchas/',
'wordLen' => 6,
'timeout' => 300,
),
));

$this->addElement($elt);
...
---

I've installed arial.ttf in my www root and I've setup GDFONTPATH env
variable to point to this dir.
Unfortunately doesn't works


Thank you for your help

Best regards

[fw-mvc] Re: Zend MVC, Windows, Apache, SSPI

I figured out the problem,

I moved the
AuthName "LillyNet"
AuthType SSPI
SSPIAuth On
SSPIDomain "AM"
SSPIAuthoritative On
require valid-user

>From my <directory> inside httpd.conf and into my .htaccess and it
solved the problem of not being able to goto sub pages.

On Tue, Sep 30, 2008 at 10:56 AM, DJ Necrogami <djnecrogami@gmail.com> wrote:
> I am currently designing a system.
>
> I have Zend FW w/ MVC up and running and it'll be on a site that does
> automatic authentication for ease of use of the system. Basicly the
> system doesn't need authenticaion just needs to request information
> from the ldap server based on the user's login information to the
> domain.
>
> I'm using SSPI on Windows/Apache setup I can successfully get the
> username from the accessing computer.
> I get this error message: [Tue Sep 30 10:47:10 2008] [error] [client
> 127.0.0.1] File does not exist: D:/Apps/xampplite/web/public/dry,
> referer: http://localhost/
> the web root w/ the bootstrap index.php is
> D:/apps/xampplite/web/public but it's not redirecting to the index.php
> or .htaccess
>
> Any suggestions?
>
> --
> Anton C. Swartz IV
> PHPLogic Development Services http://www.phplogic.net - Co-Owner
> Necrogami http://www.necrogami.com - Personal Blog
> Based in Indianapolis, IN
>
> "The Opposite of war is not Peace it is Creation."
>
>
> "Yes," she murmured. "Wise enough to be afraid. To understand, at
> least in part. How does it feel, to know what you know, child?" My
> voice came out unsteady, and more quiet than I would have liked. "Sort
> of like Tokyo when Godzilla comes up on the beach."
>
> Don't let sin rule your body. After all, your body is bound to die, so
> dont obey its desires or let any part of it become slave to evil. Give
> yourselves to God, as people who have been raised from death to life.
> Make every part of your body a slavethat pleases God. Don't let sin
> keep ruling your lives.You are ruled by God's Kindness and not by the
> law.
> Romans 6:12-14
>

--
Anton C. Swartz IV
PHPLogic Development Services http://www.phplogic.net - Co-Owner
Necrogami http://www.necrogami.com - Personal Blog
Based in Indianapolis, IN

"The Opposite of war is not Peace it is Creation."


"Yes," she murmured. "Wise enough to be afraid. To understand, at
least in part. How does it feel, to know what you know, child?" My
voice came out unsteady, and more quiet than I would have liked. "Sort
of like Tokyo when Godzilla comes up on the beach."

Don't let sin rule your body. After all, your body is bound to die, so
dont obey its desires or let any part of it become slave to evil. Give
yourselves to God, as people who have been raised from death to life.
Make every part of your body a slavethat pleases God. Don't let sin
keep ruling your lives.You are ruled by God's Kindness and not by the
law.
Romans 6:12-14

[fw-mvc] [Zend_Form] Bad adress in

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org

iEYEARECAAYFAkjiW9AACgkQsxtAFVfnNCTYRwCg4cDvMNHZhAicIFz+hV6kIwfx
W8YAnRpK/66fm4H+TOqhJbj2aw17MqZa
=d3a6
-----END PGP SIGNATURE-----
Hi all,

now I'm playing and testing example from
http://framework.zend.com/docs/quickstart/ (so official quickstart), bud
I have problem now.

When I try post form, so I get error message that
guestbook/sign(controller/action) isn't right.

The URI to the public direcoty of my example is
http://localhost/mvc-zend-test/public/index.php

Of course I have set up:
$frontController->setBaseUrl('/mvc-zend-test/public');


And I have tried:
$this->setMethod('post')
->setAction('different addresses');

And in my .htaccess, which is in directory /mvc-zend-test/public/ I have
set up this too:
RewriteBase /mvc-zend-test/public

I except, that Zend_From take over the base address from which is set in
Zend_Controller_Front,
Ocekaval jsem, ze Zend_Form se zaridi podle adresy nastavene ve
Zend_Controller_Front which would be logical behavior, but he ignores it.

How can I resolve this problem ?

Thank You for advises and suggestions.

--
-------------------------------------------------------------------
--== Silver Zachara ==--
- pgp - http://radeonvmod.ic.cz/keys/silver.zachara@gmail.com.asc -

Re: [fw-mvc] Current Action in ViewHelper

-- Daniel Skinner <skinner@destiny-denied.co.uk> wrote
(on Tuesday, 30 September 2008, 05:01 PM +0100):
> What is the most correct way of obtaining the current action name in a
> ViewHelper?

<? $action = Zend_Controller_Front::getInstance()->getRequest()->getActionName() ?>

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

[fw-mvc] Zend_View_Helper_HeadTitle - how to unset previously set title?

Hi all,

Page title was set previously as:

$viewRenderer->view->headTitle('MyPage');

I thought that doing this would clear page title:

$viewRenderer->view->headTitle(NULL,
Zend_View_Helper_Placeholder_Container_Abstract::SET);

But it does not.

Any idea how it can be done without extending/overriding... ?

Thank you in advance,
Temuri
--
View this message in context: http://www.nabble.com/Zend_View_Helper_HeadTitle---how-to-unset-previously-set-title--tp19745187p19745187.html
Sent from the Zend MVC mailing list archive at Nabble.com.

[fw-mvc] Current Action in ViewHelper

What is the most correct way of obtaining the current action name in a ViewHelper?

--

Kind Regards,

Daniel Skinner

Re: [fw-mvc] dojo and helper: no such file or directory

thank you for your help
--
View this message in context: http://www.nabble.com/dojo-and-helper%3A-no-such-file-or-directory-tp19725048p19745075.html
Sent from the Zend MVC mailing list archive at Nabble.com.

Re: [fw-mvc] Changelog

-- Silver Zachara <silver.zachara@gmail.com> wrote
(on Tuesday, 30 September 2008, 05:15 PM +0200):
> I want to ask whwre can I find chagelog for ZF. It was on
> http://framework.zend.com/changelog but isn't there now.
>
> Thanks for reaction.

http://framework.zend.com/issues/browse/ZF?report=com.atlassian.jira.plugin.system.project:changelog-panel

The issue tracker maintains our change log, so you can always find it
there.


--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

[fw-mvc] Changelog

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjiQpQACgkQsxtAFVfnNCSduQCgxNMiwykTh5RDhK5E9Y/vY4b1
ccEAnj9itRfs99mfm/K8HdOHyFw1Ws7b
=QPe2
-----END PGP SIGNATURE-----
hi all,

I want to ask whwre can I find chagelog for ZF. It was on
http://framework.zend.com/changelog but isn't there now.

Thanks for reaction.

--
-------------------------------------------------------------------
--== Silver Zachara ==--
- pgp - http://radeonvmod.ic.cz/keys/silver.zachara@gmail.com.asc -

Re: [fw-mvc] Using Zend_Form with table rows

Why not create your own extension to zend form / the decorator and extend it
so you display a header and a footer to your table. Then these methods
simply output the start of the form with the action, method etc. then call
the footer to output </form>. Not ideal maybe but saves you wrapping the
whole table up. Or you could create a new render element to pass it the
content of your table and apply the form decorators to that content.

-----
Simon

http://www.ajb007.co.uk/
--
View this message in context: http://www.nabble.com/Using-Zend_Form-with-table-rows-tp19739144p19744110.html
Sent from the Zend MVC mailing list archive at Nabble.com.

[fw-core] Zend_Json_Expr Proposal. Ready for Review

Just to comment that the proposal: Zend_Json_Expr has been "tagged"
Ready for Review. Any suggestions, comments and/or discussions are
welcome.

Thanks.
Oscar Reales.

[fw-mvc] Zend MVC, Windows, Apache, SSPI

I am currently designing a system.

I have Zend FW w/ MVC up and running and it'll be on a site that does
automatic authentication for ease of use of the system. Basicly the
system doesn't need authenticaion just needs to request information
from the ldap server based on the user's login information to the
domain.

I'm using SSPI on Windows/Apache setup I can successfully get the
username from the accessing computer.
I get this error message: [Tue Sep 30 10:47:10 2008] [error] [client
127.0.0.1] File does not exist: D:/Apps/xampplite/web/public/dry,
referer: http://localhost/
the web root w/ the bootstrap index.php is
D:/apps/xampplite/web/public but it's not redirecting to the index.php
or .htaccess

Any suggestions?

--
Anton C. Swartz IV
PHPLogic Development Services http://www.phplogic.net - Co-Owner
Necrogami http://www.necrogami.com - Personal Blog
Based in Indianapolis, IN

"The Opposite of war is not Peace it is Creation."


"Yes," she murmured. "Wise enough to be afraid. To understand, at
least in part. How does it feel, to know what you know, child?" My
voice came out unsteady, and more quiet than I would have liked. "Sort
of like Tokyo when Godzilla comes up on the beach."

Don't let sin rule your body. After all, your body is bound to die, so
dont obey its desires or let any part of it become slave to evil. Give
yourselves to God, as people who have been raised from death to life.
Make every part of your body a slavethat pleases God. Don't let sin
keep ruling your lives.You are ruled by God's Kindness and not by the
law.
Romans 6:12-14

Re: [fw-mvc] Zend_Form - Displaying Error Messages

I need to do this with one of my project as well. What I intend to do is to
disable the Errors decorator and then use the hasErrors, getErrors and/or
getMessages methods of Zend_Form to display the error messages above the
form.

I believe there is a method to disable just the Errors decorator but I'm
unable to find it at the moment. Of course you can remove the decorator on
individual elements with $element->removeDecorator('Errors').

If you haven't already read Matthew's form decorators article on DevZone, it
is highly recommended:

http://devzone.zend.com/article/3450-Decorators-with-Zend_Form

Hope that helps.


log2e wrote:
>
> Hi!
>
> I'm using Zend_Form and decorators for setting up my forms. Is there a way
> to group all error messages (from validators) at the top of the form
> instead
> of displaying them below each single input field?
>
> Thanks in advance.
>
> Stefan
>
>
>
>

--
View this message in context: http://www.nabble.com/Zend_Form---Displaying-Error-Messages-tp19740982p19741802.html
Sent from the Zend MVC mailing list archive at Nabble.com.

Re: [fw-mvc] Zend_Form - Displaying Error Messages

-- Stefan Schmalhaus <info@log2e.com> wrote
(on Tuesday, 30 September 2008, 02:24 PM +0200):
> I'm using Zend_Form and decorators for setting up my forms. Is there a
> way to group all error messages (from validators) at the top of the form
> instead of displaying them below each single input field?

You can remove the Errors decorator from each element, and then attach a
decorator to the form for aggregating error messages. Currently, there
is not a shipped decorator that can do this, however, so you'll need to
create one.

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

Re: [fw-mvc] OT - Rewrite rule for Zend

On 30/09/2008 13:18, "Matthew Weier O'Phinney" <matthew@zend.com> wrote:
> Does that help clarify things? The main thing to understand is that the
> rules mean: "serve the file if it exists, otherwise use the ZF MVC."

That certainly helps. A little bit more reading on my part, and I'd say a
slightly more novice pseudo code of those 6 lines are:

Switch on mod_rewrite
IF url is a non-empty file OR a symlink OR a directory THEN
rewrite the url to exactly the same and stop here
ENDIF
Rewrite everything to index.php

Another way to do this would, I suppose, be:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-s [AND]
RewriteCond %{REQUEST_FILENAME} !-l [AND]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [NC,L]

Thanks,

GTG

[fw-mvc] Zend_Form - Displaying Error Messages

Hi!

I'm using Zend_Form and decorators for setting up my forms. Is there a way
to group all error messages (from validators) at the top of the form instead
of displaying them below each single input field?

Thanks in advance.

Stefan

Re: [fw-mvc] OT - Rewrite rule for Zend

-- Gordon Ross <gr306@ucs.cam.ac.uk> wrote
(on Tuesday, 30 September 2008, 12:06 PM +0100):
> I'm trying to understand that Apache re-write rules, necessary to support
> Zend ('cause I want to make changes to support having some URL paths that
> are static and so should not get sent into Zend)
>
> The recommended re-write setup is:
>
> RewriteEngine On
> RewriteCond %{REQUEST_FILENAME} -s [OR]
> RewriteCond %{REQUEST_FILENAME} -l [OR]
> RewriteCond %{REQUEST_FILENAME} -d
> RewriteRule ^.*$ - [NC,L]
> RewriteRule ^.*$ index.php [NC,L]
>
> The first line is self explanatory.
>
> The next three lines (the RewriteCond ones) detail the things we're going to
> re-write (files, links & directories) Fine, got no problems here.
>
> The final line says re-write to index.php (and hence force everything
> through the front controller. I can handle this.
>
> I have two problems/questions:
>
> 1) The penultimate line:
>
> RewriteRule ^.*$ - [NC,L]
>
> In a previous message (
> http://www.nabble.com/Re%3A--fw-general--Using-the-Dojo-shipped-with-ZF-1.6.
> 0---Important-Note-p19422433.html) Matthew says that it means use the
> original path.
>
> But we're in .htaccess, so the original path is implicitly used unless
> explicitly overridden. From
> http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html
>
> "However, in per-directory configuration files, the per-directory prefix
> (which always is the same for a specific directory) is automatically removed
> for the pattern matching and automatically added after the substitution has
> been done"
>
> 2) We're in .htaccess, so we'd catch access to things like /view.html, etc
> But surely it wouldn't catch /controller/action, would it ?

Let me break it down. Let's say you have the following structure in your
public directory tree:

public/
.htaccess
index.php
xmlrpc.php
js/
foo.js
css/
foo.css
static/
foo.html

The first rewrite rule, what you call the "penultimate" one, is
conditional: if the file or symlink exists with a non-zero size, we
serve it _exactly as requested_, without rewriting. What that means is
this:

http://example.com/js/foo.js -> serves js/foo.js
http://example.com/css/foo.css -> serves css/foo.css
http://example.com/static/foo.html -> serves static/foo.html
http://example.com/xmlrpc.php -> serves xmlrpc.html

If the conditions are NOT met -- i.e., no file or symlink matches, then
we drop to the *next* rewrite rule, which says to rewrite to index.php.

Does that help clarify things? The main thing to understand is that the
rules mean: "serve the file if it exists, otherwise use the ZF MVC."

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

Re: [fw-mvc] Using Zend_Form with table rows

> <table class="datagrid" summary="<?php echo
> $this->currentModel->details; ?>" cellspacing="0">
> <caption><?php echo $this->currentModel->details; ?></caption>
> <tr>
> <th scope="col">Date</th>
> <th scope="col">Time</th>
> <th scope="col">Destination</th>
> <th scople="col">Tag</th>
> </tr>
> <?php
> foreach ($this->calls as $call):?>
> <tr>
> <th scope="row"><?php echo date('Y-m-d',
> strtotime($call->timestamp)); ?></th>
> <td><?php echo date('H:i:s', strtotime($call->timestamp)); ?></td>
> <td><?php echo $call->sourceNo; ?></td>
> <td><?php echo $call->destination; ?></td>
> <td>*<?php echo
> $this->taggingForm->getElement($call->id)->render($this); ?>*</td>
> </tr>
> <?php endforeach; ?>
> </table>
>
> Where does the $this->taggingForm->render(); call go to wrap the above
> table?

Ok, I've figured out a working solution. Any ideas on how to improve it
further?

I captured the part of the view script I wanted to wrap, then simply
rendered the Form decorator with the captured content as the argument:

<?php ob_start(); ?>
<table>
...
</table>
<?php echo $this->taggingForm->renderForm(ob_get_clean()); ?>

It gives the desired result. Is there anything that can be done to
improve the code?

Kind Regards,

*Daniel Skinner*


Daniel Skinner wrote:
> I don't see how that will help encapsulate the table within <form>
> tags. My view scripts is like:
>
> <table class="datagrid" summary="<?php echo
> $this->currentModel->details; ?>" cellspacing="0">
> <caption><?php echo $this->currentModel->details; ?></caption>
> <tr>
> <th scope="col">Date</th>
> <th scope="col">Time</th>
> <th scope="col">Destination</th>
> <th scople="col">Tag</th>
> </tr>
> <?php
> foreach ($this->calls as $call):?>
> <tr>
> <th scope="row"><?php echo date('Y-m-d',
> strtotime($call->timestamp)); ?></th>
> <td><?php echo date('H:i:s', strtotime($call->timestamp)); ?></td>
> <td><?php echo $call->sourceNo; ?></td>
> <td><?php echo $call->destination; ?></td>
> <td>*<?php echo
> $this->taggingForm->getElement($call->id)->render($this); ?>*</td>
> </tr>
> <?php endforeach; ?>
> </table>
>
> Where does the $this->taggingForm->render(); call go to wrap the above
> table?
>
> What I really didn't want to do was be forced to put all the
> presentation and table markup into the form as RawText elements as
> it's really not the place and I want to keep the table markup in the
> view script.
>
> Kind Regards,
>
> *Daniel Skinner*
>
>
>
> Matthew Weier O'Phinney wrote:
>> -- Daniel Skinner <skinner@destiny-denied.co.uk> wrote
>> (on Tuesday, 30 September 2008, 10:51 AM +0100):
>>
>>> I am looking to create a Zend_Form which displays and processes
>>> checkboxes for a dynamic data table:
>>>
>>> Date Time
>>> Destination Tag
>>> 2008-09-14 13:20:02 London [
>>> X ]
>>> 2008-09-14 10:42:14 London [
>>> X ]
>>> 2008-09-05 10:50:20 Hemel Hempstead [ X ]
>>>
>>>
>>> { Submit }
>>>
>>> How do you achieve this with Zend_Form? It must be a fairly common
>>> use case.
>>>
>>> What I have done so far is:
>>>
>>> x Create a form with a checkbox element for each table row:
>>>
>>> $form = new Zend_Form();
>>> foreach ($row)
>>> {
>>> $form->addElement('checkbox', $row->id);
>>> }
>>> $form->setElementDecorators(array(
>>> 'ViewHelper',
>>> 'Label'
>>> ));
>>> $form->setDecorators(array(
>>> 'Form'
>>> ));
>>> return $form;
>>> x Render elements individually in the view script whilst
>>> looping through data:
>>>
>>> <td><?php echo
>>> $this->taggingForm->getElement($row->id)->render($this); ?></td>
>>>
>>> What I cannot figure out how to do is wrap the form element around
>>> the entire table.
>>>
>>> Any ideas?
>>>
>>
>> Change your $form->setDecorators() statement to:
>>
>> $form->setDecorators(array(
>> array('HtmlTag', array('tag' => 'table')),
>> 'Form',
>> ));
>>
>>
>

Re: [fw-mvc] Using Zend_Form with table rows

I don't see how that will help encapsulate the table within <form> tags.
My view scripts is like:

<table class="datagrid" summary="<?php echo
$this->currentModel->details; ?>" cellspacing="0">
<caption><?php echo $this->currentModel->details; ?></caption>
<tr>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Destination</th>
<th scople="col">Tag</th>
</tr>
<?php
foreach ($this->calls as $call):?>
<tr>
<th scope="row"><?php echo date('Y-m-d',
strtotime($call->timestamp)); ?></th>
<td><?php echo date('H:i:s', strtotime($call->timestamp)); ?></td>
<td><?php echo $call->sourceNo; ?></td>
<td><?php echo $call->destination; ?></td>
<td>*<?php echo
$this->taggingForm->getElement($call->id)->render($this); ?>*</td>
</tr>
<?php endforeach; ?>
</table>

Where does the $this->taggingForm->render(); call go to wrap the above
table?

What I really didn't want to do was be forced to put all the
presentation and table markup into the form as RawText elements as it's
really not the place and I want to keep the table markup in the view script.

Kind Regards,

*Daniel Skinner*

Matthew Weier O'Phinney wrote:
> -- Daniel Skinner <skinner@destiny-denied.co.uk> wrote
> (on Tuesday, 30 September 2008, 10:51 AM +0100):
>
>> I am looking to create a Zend_Form which displays and processes
>> checkboxes for a dynamic data table:
>>
>> Date Time Destination
>> Tag
>> 2008-09-14 13:20:02 London [ X ]
>> 2008-09-14 10:42:14 London [ X ]
>> 2008-09-05 10:50:20 Hemel Hempstead [ X ]
>>
>>
>> { Submit }
>>
>> How do you achieve this with Zend_Form? It must be a fairly common use case.
>>
>> What I have done so far is:
>>
>> x Create a form with a checkbox element for each table row:
>>
>> $form = new Zend_Form();
>> foreach ($row)
>> {
>> $form->addElement('checkbox', $row->id);
>> }
>> $form->setElementDecorators(array(
>> 'ViewHelper',
>> 'Label'
>> ));
>> $form->setDecorators(array(
>> 'Form'
>> ));
>> return $form;
>>
>> x Render elements individually in the view script whilst looping
>> through data:
>>
>> <td><?php echo
>> $this->taggingForm->getElement($row->id)->render($this); ?></td>
>>
>> What I cannot figure out how to do is wrap the form element around the
>> entire table.
>>
>> Any ideas?
>>
>
> Change your $form->setDecorators() statement to:
>
> $form->setDecorators(array(
> array('HtmlTag', array('tag' => 'table')),
> 'Form',
> ));
>
>

[fw-mvc] OT - Rewrite rule for Zend

I'm trying to understand that Apache re-write rules, necessary to support
Zend ('cause I want to make changes to support having some URL paths that
are static and so should not get sent into Zend)

The recommended re-write setup is:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

The first line is self explanatory.

The next three lines (the RewriteCond ones) detail the things we're going to
re-write (files, links & directories) Fine, got no problems here.

The final line says re-write to index.php (and hence force everything
through the front controller. I can handle this.

I have two problems/questions:

1) The penultimate line:

RewriteRule ^.*$ - [NC,L]

In a previous message (
http://www.nabble.com/Re%3A--fw-general--Using-the-Dojo-shipped-with-ZF-1.6.
0---Important-Note-p19422433.html) Matthew says that it means use the
original path.

But we're in .htaccess, so the original path is implicitly used unless
explicitly overridden. From
http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

"However, in per-directory configuration files, the per-directory prefix
(which always is the same for a specific directory) is automatically removed
for the pattern matching and automatically added after the substitution has
been done"

2) We're in .htaccess, so we'd catch access to things like /view.html, etc
But surely it wouldn't catch /controller/action, would it ?

Thanks,

GTG

Re: [fw-mvc] Using Zend_Form with table rows

-- Daniel Skinner <skinner@destiny-denied.co.uk> wrote
(on Tuesday, 30 September 2008, 10:51 AM +0100):
> I am looking to create a Zend_Form which displays and processes
> checkboxes for a dynamic data table:
>
> Date Time Destination
> Tag
> 2008-09-14 13:20:02 London [ X ]
> 2008-09-14 10:42:14 London [ X ]
> 2008-09-05 10:50:20 Hemel Hempstead [ X ]
>
>
> { Submit }
>
> How do you achieve this with Zend_Form? It must be a fairly common use case.
>
> What I have done so far is:
>
> x Create a form with a checkbox element for each table row:
>
> $form = new Zend_Form();
> foreach ($row)
> {
> $form->addElement('checkbox', $row->id);
> }
> $form->setElementDecorators(array(
> 'ViewHelper',
> 'Label'
> ));
> $form->setDecorators(array(
> 'Form'
> ));
> return $form;
>
> x Render elements individually in the view script whilst looping
> through data:
>
> <td><?php echo
> $this->taggingForm->getElement($row->id)->render($this); ?></td>
>
> What I cannot figure out how to do is wrap the form element around the
> entire table.
>
> Any ideas?

Change your $form->setDecorators() statement to:

$form->setDecorators(array(
array('HtmlTag', array('tag' => 'table')),
'Form',
));

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

[fw-mvc] Using Zend_Form with table rows

I am looking to create a Zend_Form which displays and processes
checkboxes for a dynamic data table:

Date Time Destination
Tag
2008-09-14 13:20:02 London [ X ]
2008-09-14 10:42:14 London [ X ]
2008-09-05 10:50:20 Hemel Hempstead [ X ]


{ Submit }

How do you achieve this with Zend_Form? It must be a fairly common use case.

What I have done so far is:

x Create a form with a checkbox element for each table row:

$form = new Zend_Form();
foreach ($row)
{
$form->addElement('checkbox', $row->id);
}
$form->setElementDecorators(array(
'ViewHelper',
'Label'
));
$form->setDecorators(array(
'Form'
));
return $form;

x Render elements individually in the view script whilst looping
through data:

<td><?php echo
$this->taggingForm->getElement($row->id)->render($this); ?></td>

What I cannot figure out how to do is wrap the form element around the
entire table.

Any ideas?

Thanks

*Daniel Skinner*

2008年9月29日星期一

Re: [fw-mvc] Problem with Zend_Form and ajax select box.

I had the same problem a while back. The solution is to disable the
array vlidator in your first select:

$selectOne->setRegisterInArrayValidator(false)


Hope that helps,


Ernesto

On Mon, Sep 29, 2008 at 1:43 PM, Gabriel Baez <sheik316@gmail.com> wrote:
> I have a weird problem with my Zend Form,
>
> I have two select boxes, the second box is empty, I have a java script
> that populates the second select box when a option is selected on the
> first box.
> When I submit the form, zend form is giving an error that a value was not
> selected for the second box.
>
>
> This is what I see on FireBug when I submit the ajax form: as you can see
> there is data for ipoweraccount element
>
> build2.8.4.12
> build20.0.0.1
> company1
> datatotal+95M -rwxr--r--++++1+ipbuild++ipbuild+++++++54M+Aug++5+16:20+ip.jar
> -rwxr--r--++++1+ipbuild++ipbuild+++++++40M+Aug++5+17:30+ipower.ear
> data2
> env 2
> env23
> id181
> ipoweraccount
> 2
> jobERROR
> path/u01/home/ipbuild/PROD_Stage/SR284
> release_id61
> reltype1
> software_id1
>
> This is the responce I get from the server:
>
> {"ipoweraccount":["Please select a Account."]}
>
>
>
>
> This is what I currently have in my controller:
>
> public function relnotejobviewAction()
> {
> try {
> $auth = Zend_Auth::getInstance();
>
> if ($auth->hasIdentity()):
>
> $email = $auth->getIdentity();
> $id = $this->user->getuserid($email);
> $role = $this->user->checkrole($id);
>
> if($this->acl->isAllowed($role, 'admin', 'relnotejobview' )):
>
> $job_id =
> Zend_Filter::get($this->getRequest()->get('jobid'),'StripTags');
> $this->db->setFetchMode(Zend_Db::FETCH_OBJ);
> $select = $this->db->select()
> ->from(array('p' => 'SOFTWARE_DOC_QUE'),
>
>
> array('ID','TYPE_ID','SOFTWARE_ID','RELEASE_ID','HARDWARE_ID','ACCOUNT_ID','BUILD_ID',
>
> 'HARDWARE_ID2','ACCOUNT_ID2','PATH','BUILD_ID2','STATUS','COMPANY_ID',
>
>
> 'SOFTWARE_DATA','SOFTWARE_DATA2','CREATION_DATE','LAST_UPDATE'))
> ->where('p.ID= ?',$job_id);
>
>
> $result = $this->db->fetchRow($select);
> $this->view->date = $result->CREATION_DATE;
> $this->view->update = $result->LAST_UPDATE;
>
> $form = new RelJobForm();
> $form->job->setValue($result->STATUS);
> $form->company->setValue($result->COMPANY_ID);
> $form->reltype->setValue($result->TYPE_ID);
>
> $form->software_id->setValue($result->SOFTWARE_ID);
>
> $form->release_id->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p'
> => 'SOFTWARE_RELEASES'),array('RELEASE_ID',
> 'RELEASE_NAME'))->where('p.SOFTWARE_ID = ?',$result->SOFTWARE_ID)));
>
> $form->release_id->setValue($result->RELEASE_ID);
> $form->env->setValue($result->HARDWARE_ID);
>
> //$form->ipoweraccount->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p'
> => 'HARDWARE_ACCOUNTS'),array('ACCOUNT_ID',
> 'ACCOUNT'))->where('p.SOFTWARE_ID = ?',$result->SOFTWARE_ID)));
>
> $form->build->setValue($result->BUILD_ID);
> $form->data->setValue(stream_get_contents($result->SOFTWARE_DATA));
> $form->env2->setValue($result->HARDWARE_ID2);
> $form->path->setValue($result->PATH);
>
> $form->build2->setValue($result->BUILD_ID2);
> $form->id->setValue($result->ID);
> $form->data2->setValue(stream_get_contents($result->SOFTWARE_DATA2));
> $this->view->form = $form;
>
>
> $request = $this->getRequest();
>
>
> if($request->isPost()):
> $this->_helper->layout->disableLayout();
> $this->_helper->viewRenderer->setNoRender();
>
> $response = $form->processAjax($request->getPost());
> $this->getResponse()->setHeader('Content-Type',
> 'application/json')
> ->setBody($response);
>
>
> endif;
>
> else:
> $this->render('insufficient-permissions');
> endif;
> elseif(!$auth->hasIdentity()):
> $this->_redirect('/register');
> endif;
>
> }
> catch (Exception $e)
> {
> $msg = $e->getMessage();
> $this->log->info("Controller: Administrator Action: relnotejobview Error:
> $msg" );
> $this->render('error');
>
> }
>
> }
>
>
>
>
>
> This is the Form Class:
>
> class RelJobForm extends Zend_Form
> {
>
> protected $db;
>
> public function init()
> {
> $this->db = Zend_Registry::get('db');
>
> $this->db->setFetchMode(Zend_Db::FETCH_ASSOC);
> $this->setName('env_form');
> $this->setMethod('post');
> $allowedTags = array('p','strong','i','b','u');
>
> $allowedAttributes = array('class');
>
> $test = new Ems_Form_Element_Raw_RawText('test');
> $test->setValue('<h3>Job Information</h3>');
>
>
> $job = new Zend_Form_Element_Select('job');
> $job->setLabel('Job Status')
> ->setRequired(false)
> ->addFilter('StripTags')
> ->addFilter('StringTrim')
>
> ->addValidator('NotEmpty')
> ->setAttrib('id','job')
> ->addMultiOptions(array('' => '','PENDING' => 'Pending', 'ERROR'
> => 'Error', 'INPROGRESS' => 'In-Progress','COMPLETE' => 'Complete'))
>
> ->setAttrib('class','{required:true}')
> ->addErrorMessage('Please select and option')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
> $company = new Zend_Form_Element_Select('company');
> $company->setLabel('Customer')
> ->setRequired(true)
> ->addFilter('StripTags')
>
> ->addFilter('Digits')
> ->addFilter('StringTrim')
> ->addValidator('NotEmpty')
> ->setAttrib('id','customer')
>
> ->setAttrib('class','{required:true}')
> ->addErrorMessage('Please select a Customer.')
> ->addMultiOptions(array (''=> ''))
>
>
> ->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p'
> => 'COMPANY'),array('COMPANY_ID', 'COMPANY_NAME'))))
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
>
> $reltype = new Zend_Form_Element_Select('reltype');
> $reltype->setLabel('Release Type')
> ->setRequired(true)
> ->addFilter('StripTags')
>
> ->addFilter('Digits')
> ->addFilter('StringTrim')
> ->addValidator('NotEmpty')
> ->setAttrib('id','reltype')
>
> ->setAttrib('class','{required:true}')
> ->addMultiOptions(array('' => ''))
>
> ->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p'
> => 'SOFTWARE_RELEASE_TYPE'),array('TYPE_ID', 'TYPE_NAME'))))
>
> ->addErrorMessage('Please select a Release Type.')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
>
> $software = new Zend_Form_Element_Select('software_id');
> $software->setLabel('Software')
> ->setRequired(true)
> ->addFilter('StripTags')
>
> ->addFilter('Digits')
> ->addFilter('StringTrim')
> ->addValidator('NotEmpty')
> ->setAttrib('id','software_id')
>
> ->setAttrib('onchange','getData(this)')
> ->setAttrib('class','{required:true}')
> ->addMultiOptions(array (''=> ''))
>
>
> ->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p'
> => 'SOFTWARE'),array('SOFTWARE_ID', 'SOFTWARE_NAME'))))
> ->addErrorMessage('Please select a Software.')
>
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
>
> $release = new Zend_Form_Element_Select('release_id');
>
> $release->setLabel('Release')
> ->setRequired(true)
> ->addFilter('StripTags')
> ->addFilter('Digits')
> ->addFilter('StringTrim')
>
> ->addValidator('NotEmpty')
> ->setAttrib('id','release_id')
> ->setAttrib('class','{required:true}')
> ->addErrorMessage('Please select a Release.')
>
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
> $java = new Ems_Form_Element_Raw_RawText('java');
>
> $java->setValue('<h3>Java Environment Information</h3>');
>
> $env = new Zend_Form_Element_Select('env');
> $env->setLabel('Environment')
>
> ->setRequired(true)
> ->addFilter('StripTags')
> ->addFilter('Int')
> ->addFilter('StringTrim')
> ->addValidator('NotEmpty')
>
> ->setAttrib('id','env')
> ->setAttrib('class','{required:true}')
> ->setAttrib('onchange','getIPOWERData(this)')
> ->addMultiOptions(array('' => ''))
>
>
> ->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p'
> => 'HARDWARE'),array('HARDWARE_ID', 'NAME'))))
> ->addErrorMessage('Please select a Release.')
>
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
> $account = new Zend_Form_Element_Select('ipoweraccount');
>
> $account->setLabel('Account')
> ->setRequired(false)
> ->addFilter('StripTags')
> ->addFilter('Int')
> ->addFilter('StringTrim')
>
> ->addValidator('NotEmpty')
> ->setAttrib('id','ipoweraccount')
> ->setAttrib('class','{required:true}')
> ->addMultiOptions(array('' => ''))
>
> ->addErrorMessage('Please select a Account.')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
> $build = new Zend_Form_Element_Text('build');
>
> $build->setLabel('Build #')
> ->setRequired(true)
> ->addFilter('StripTags')
> ->addFilter('StringTrim')
> ->addValidator('NotEmpty')
>
> ->setAttrib('id','build')
> ->setAttrib('class','{required:true}')
> ->addErrorMessage('Please enter a Build #.')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
> $data = new Zend_Form_Element_Textarea('data');
> $data->setLabel('Data')
> ->setRequired(false)
> ->addFilter('StripTags')
> ->addFilter('StringTrim')
>
> ->addValidator('NotEmpty')
> ->setAttrib('id','data')
> ->setAttrib('rows','15')
> ->setAttrib('cols','25')
>
> ->setAttrib('class','{required:true}')
> ->addErrorMessage('Yea Ok.')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
>
> $host = new Ems_Form_Element_Raw_RawText('host');
> $host->setValue('<h3>Host Code Environment Information</h3>');
>
> $env2 = new Zend_Form_Element_Select('env2');
>
> $env2->setLabel('Environment')
> ->setRequired(false)
> ->addFilter('StripTags')
> ->addFilter('Digits')
> ->addFilter('StringTrim')
>
> ->addValidator('NotEmpty')
> ->setAttrib('id','account')
> ->setAttrib('class','{required:true}')
> ->setAttrib('onchange','getHOSTCODEData(this)')
>
> ->addMultiOptions(array('' => ''))
>
> ->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p'
> => 'HARDWARE'),array('HARDWARE_ID', 'NAME'))))
>
> ->addErrorMessage('Please select and Environment')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
> $account2 = new Zend_Form_Element_Select('hostcodeaccount');
> $account2->setLabel('Account')
> ->setRequired(false)
> ->addFilter('StripTags')
>
> ->addFilter('Digits')
> ->addFilter('StringTrim')
> ->addValidator('NotEmpty')
> ->setAttrib('id','hostcodeaccount')
>
> ->setAttrib('class','{required:false}')
> ->addErrorMessage('Please select and Account.')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
> $path = new Zend_Form_Element_Text('path');
> $path->setLabel('Host Code Path')
> ->setRequired(false)
> ->addFilter('StripTags')
> ->addFilter('StringTrim')
>
> ->addValidator('NotEmpty')
> ->setAttrib('id','path')
> ->setAttrib('class','{required:false}')
> ->addErrorMessage('Yea Ok.')
>
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
> $build2 = new Zend_Form_Element_Text('build2');
> $build2->setLabel('Build #')
>
> ->setRequired(false)
> ->addFilter('StripTags')
> ->addFilter('StringTrim')
> ->addValidator('NotEmpty')
> ->setAttrib('id','buildid2')
>
> ->setAttrib('class','{required:false}')
> ->addErrorMessage('Enter a Build #.')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
> $data2 = new Zend_Form_Element_Textarea('data2');
> $data2->setLabel('Data')
> ->setRequired(false)
> ->addFilter('StripTags')
> ->addFilter('StringTrim')
>
> ->addValidator('NotEmpty')
> ->setAttrib('id','data2')
> ->setAttrib('rows','15')
> ->setAttrib('cols','25')
>
> ->setAttrib('class','{required:false}')
> ->addErrorMessage('Yea Ok.')
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
>
>
> $id = new Zend_Form_Element_Hidden('id');
> $id->setRequired(false)
> ->addFilter('Digits')
> ->addFilter('StringTrim')
> ->addValidator('NotEmpty')
>
> ->addDecorator('Label',array('tag' => 'div', 'class' =>
> 'element'));
>
> $submit = new Zend_Form_Element_Submit('submit');
> $submit->setAttrib('id', 'submitbutton')
>
> ->setAttrib('class','inputSubmit');
>
>
> $this->addElements(array($id,$test,$job,$company,$reltype,$software,$release,$java,$env,$account,$build,$data,$host,$env2,$account2,$path,$build2,$data2,
> $submit));
>
> }
> }
>
>
>
>
>
>
>
>
>
>
>
>

[fw-mvc] Problem with Zend_Form and ajax select box.

I have a weird problem with my Zend Form,
 
 I have  two select boxes, the second box is empty,  I have a java script that  populates the second  select box when a option is selected on the first box.
 When  I submit the form, zend form is giving an error that a value was not selected for the second box.


This is what I see on FireBug when I submit the ajax form: as you can see there is data for  ipoweraccount  element

build2.8.4.12
build20.0.0.1
company1
datatotal+95M -rwxr--r--++++1+ipbuild++ipbuild+++++++54M+Aug++5+16:20+ip.jar -rwxr--r--++++1+ipbuild++ipbuild+++++++40M+Aug++5+17:30+ipower.ear
data2
env 2
env23
id181
ipoweraccount 
2
jobERROR
path/u01/home/ipbuild/PROD_Stage/SR284
release_id61
reltype1
software_id1


This is the responce I get  from the server:

{"ipoweraccount":["Please select a Account."]}




This is what I currently have in my controller:

public function relnotejobviewAction()
{
try {
$auth = Zend_Auth::getInstance();
if ($auth->hasIdentity()):

$email = $auth->getIdentity();
$id = $this->user->getuserid($email);
$role = $this->user->checkrole($id);

if($this->acl->isAllowed($role, 'admin', 'relnotejobview' )):
$job_id = Zend_Filter::get($this->getRequest()->get('jobid'),'StripTags');
$this->db->setFetchMode(Zend_Db::FETCH_OBJ);
$select = $this->db->select()
->from(array('p' => 'SOFTWARE_DOC_QUE'),
array('ID','TYPE_ID','SOFTWARE_ID','RELEASE_ID','HARDWARE_ID','ACCOUNT_ID','BUILD_ID',
'HARDWARE_ID2','ACCOUNT_ID2','PATH','BUILD_ID2','STATUS','COMPANY_ID',
'SOFTWARE_DATA','SOFTWARE_DATA2','CREATION_DATE','LAST_UPDATE'))
->where('p.ID= ?',$job_id);

$result = $this->db->fetchRow($select);
$this->view->date = $result->CREATION_DATE;
$this->view->update = $result->LAST_UPDATE;
$form = new RelJobForm();
$form->job->setValue($result->STATUS);
$form->company->setValue($result->COMPANY_ID);
$form->reltype->setValue($result->TYPE_ID);
$form->software_id->setValue($result->SOFTWARE_ID);
$form->release_id->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p' => 'SOFTWARE_RELEASES'),array('RELEASE_ID', 'RELEASE_NAME'))->where('p.SOFTWARE_ID = ?',$result->SOFTWARE_ID)));
$form->release_id->setValue($result->RELEASE_ID);
$form->env->setValue($result->HARDWARE_ID);
//$form->ipoweraccount->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p' => 'HARDWARE_ACCOUNTS'),array('ACCOUNT_ID', 'ACCOUNT'))->where('p.SOFTWARE_ID = ?',$result->SOFTWARE_ID)));
$form->build->setValue($result->BUILD_ID);
$form->data->setValue(stream_get_contents($result->SOFTWARE_DATA));
$form->env2->setValue($result->HARDWARE_ID2);
$form->path->setValue($result->PATH);
$form->build2->setValue($result->BUILD_ID2);
$form->id->setValue($result->ID);
$form->data2->setValue(stream_get_contents($result->SOFTWARE_DATA2));
$this->view->form = $form;

$request = $this->getRequest();


if($request->isPost()):
$this->_helper->layout->disableLayout();
$this->_helper->viewRenderer->setNoRender();
$response = $form->processAjax($request->getPost());
$this->getResponse()->setHeader('Content-Type', 'application/json')
->setBody($response);

endif;

else:
$this->render('insufficient-permissions');
endif;
elseif(!$auth->hasIdentity()):
$this->_redirect('/register');
endif;
}
catch (Exception $e)
{
$msg = $e->getMessage();
$this->log->info("Controller: Administrator Action: relnotejobview Error: $msg" );
$this->render('error');
}

}





This is the Form Class:

class RelJobForm extends Zend_Form
{

protected $db;

public function init()
{
$this->db = Zend_Registry::get('db');
$this->db->setFetchMode(Zend_Db::FETCH_ASSOC);
$this->setName('env_form');
$this->setMethod('post');
$allowedTags = array('p','strong','i','b','u');
$allowedAttributes = array('class');

$test = new Ems_Form_Element_Raw_RawText('test');
$test->setValue('<h3>Job Information</h3>');

$job = new Zend_Form_Element_Select('job');
$job->setLabel('Job Status')
->setRequired(false)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','job')
->addMultiOptions(array('' => '','PENDING' => 'Pending', 'ERROR' => 'Error', 'INPROGRESS' => 'In-Progress','COMPLETE' => 'Complete'))
->setAttrib('class','{required:true}')
->addErrorMessage('Please select and option')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$company = new Zend_Form_Element_Select('company');
$company->setLabel('Customer')
->setRequired(true)
->addFilter('StripTags')
->addFilter('Digits')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','customer')
->setAttrib('class','{required:true}')
->addErrorMessage('Please select a Customer.')
->addMultiOptions(array (''=> ''))
->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p' => 'COMPANY'),array('COMPANY_ID', 'COMPANY_NAME'))))
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));


$reltype = new Zend_Form_Element_Select('reltype');
$reltype->setLabel('Release Type')
->setRequired(true)
->addFilter('StripTags')
->addFilter('Digits')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','reltype')
->setAttrib('class','{required:true}')
->addMultiOptions(array('' => ''))
->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p' => 'SOFTWARE_RELEASE_TYPE'),array('TYPE_ID', 'TYPE_NAME'))))
->addErrorMessage('Please select a Release Type.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));


$software = new Zend_Form_Element_Select('software_id');
$software->setLabel('Software')
->setRequired(true)
->addFilter('StripTags')
->addFilter('Digits')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','software_id')
->setAttrib('onchange','getData(this)')
->setAttrib('class','{required:true}')
->addMultiOptions(array (''=> ''))
->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p' => 'SOFTWARE'),array('SOFTWARE_ID', 'SOFTWARE_NAME'))))
->addErrorMessage('Please select a Software.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));



$release = new Zend_Form_Element_Select('release_id');
$release->setLabel('Release')
->setRequired(true)
->addFilter('StripTags')
->addFilter('Digits')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','release_id')
->setAttrib('class','{required:true}')
->addErrorMessage('Please select a Release.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$java = new Ems_Form_Element_Raw_RawText('java');
$java->setValue('<h3>Java Environment Information</h3>');

$env = new Zend_Form_Element_Select('env');
$env->setLabel('Environment')
->setRequired(true)
->addFilter('StripTags')
->addFilter('Int')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','env')
->setAttrib('class','{required:true}')
->setAttrib('onchange','getIPOWERData(this)')
->addMultiOptions(array('' => ''))
->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p' => 'HARDWARE'),array('HARDWARE_ID', 'NAME'))))
->addErrorMessage('Please select a Release.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));


$account = new Zend_Form_Element_Select('ipoweraccount');
$account->setLabel('Account')
->setRequired(false)
->addFilter('StripTags')
->addFilter('Int')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','ipoweraccount')
->setAttrib('class','{required:true}')
->addMultiOptions(array('' => ''))
->addErrorMessage('Please select a Account.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$build = new Zend_Form_Element_Text('build');
$build->setLabel('Build #')
->setRequired(true)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','build')
->setAttrib('class','{required:true}')
->addErrorMessage('Please enter a Build #.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$data = new Zend_Form_Element_Textarea('data');
$data->setLabel('Data')
->setRequired(false)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','data')
->setAttrib('rows','15')
->setAttrib('cols','25')
->setAttrib('class','{required:true}')
->addErrorMessage('Yea Ok.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));


$host = new Ems_Form_Element_Raw_RawText('host');
$host->setValue('<h3>Host Code Environment Information</h3>');

$env2 = new Zend_Form_Element_Select('env2');
$env2->setLabel('Environment')
->setRequired(false)
->addFilter('StripTags')
->addFilter('Digits')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','account')
->setAttrib('class','{required:true}')
->setAttrib('onchange','getHOSTCODEData(this)')
->addMultiOptions(array('' => ''))
->addMultiOptions($this->db->fetchPairs($this->db->select()->from(array('p' => 'HARDWARE'),array('HARDWARE_ID', 'NAME'))))
->addErrorMessage('Please select and Environment')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$account2 = new Zend_Form_Element_Select('hostcodeaccount');
$account2->setLabel('Account')
->setRequired(false)
->addFilter('StripTags')
->addFilter('Digits')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','hostcodeaccount')
->setAttrib('class','{required:false}')
->addErrorMessage('Please select and Account.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$path = new Zend_Form_Element_Text('path');
$path->setLabel('Host Code Path')
->setRequired(false)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','path')
->setAttrib('class','{required:false}')
->addErrorMessage('Yea Ok.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$build2 = new Zend_Form_Element_Text('build2');
$build2->setLabel('Build #')
->setRequired(false)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','buildid2')
->setAttrib('class','{required:false}')
->addErrorMessage('Enter a Build #.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$data2 = new Zend_Form_Element_Textarea('data2');
$data2->setLabel('Data')
->setRequired(false)
->addFilter('StripTags')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->setAttrib('id','data2')
->setAttrib('rows','15')
->setAttrib('cols','25')
->setAttrib('class','{required:false}')
->addErrorMessage('Yea Ok.')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));


$id = new Zend_Form_Element_Hidden('id');
$id->setRequired(false)
->addFilter('Digits')
->addFilter('StringTrim')
->addValidator('NotEmpty')
->addDecorator('Label',array('tag' => 'div', 'class' => 'element'));

$submit = new Zend_Form_Element_Submit('submit');
$submit->setAttrib('id', 'submitbutton')
->setAttrib('class','inputSubmit');

$this->addElements(array($id,$test,$job,$company,$reltype,$software,$release,$java,$env,$account,$build,$data,$host,$env2,$account2,$path,$build2,$data2, $submit));
}
}