[fw-general] Zend_Form Decorator options

2008-08-06 Thread enportugal

Hi,

I'm trying to split a form in several parts. Something like sections. The
form is big so first I want tho show only the required fields, and then in a
new separator with the optionals fields.

I don't want Ajax, I want to user JS to alter the display between block and
none.

My problem is that, although I know that exists, I can't find any example
for how to set a Htmltag to open only and to close only.

Anyone has an example?

Regards,


-- 
View this message in context: 
http://www.nabble.com/Zend_Form-Decorator-options-tp18864112p18864112.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] is there an example application for Zend_Auth & Zend_Acl & Zend_Session ??

2008-08-06 Thread SteveWilhelm

Matthew,

Thank you for the slides. I find Zend very useful and powerful.

Unfortunately, the slides seem to be another example of how Zend provides
incomplete snippets of code in its documentation in lieu of a simple,
complete working example that includes the major components (MVC, DB, and
Auth/Acl/Session) necessary for any web-based application.

- Steve W.


Matthew Weier O'Phinney-3 wrote:
> 
> -- SteveWilhelm <[EMAIL PROTECTED]> wrote
> (on Wednesday, 06 August 2008, 03:09 PM -0700):
>> Steven,
>> 
>> Did you ever find a good example. I am looking for one as well.
> 
> You might want to look at my ZF workshop slides from the Dutch PHP
> Conference:
> 
> http://www.slideshare.net/weierophinney/zend-framework-workshop/
> 
> They provide some basics on Zend_Auth and Zend_Acl and how to persist
> identity and check rights per request.
> 
>> Truppe Steven wrote:
>> > 
>> > 
>> > i'm searching for a full example that shows how all these core
>> > components (Zend_Auth, Zend_Acl and Zend_Session) work together in an
>> > working example.
>> > 
>> > most tutorials seems out dated.
>> > 
>> > I want to save the acl and the username/password in a mysql table with
>> > digest authentication, because this seems to be the most secure way, so
>> > there is no password send in cleartext.
>> > 
>> > i hope there is a demo application for this.
> 
> -- 
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend Framework   | http://framework.zend.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/is-there-an-example-application-for-Zend_Auth---Zend_Acl---Zend_Sessiontp12353860p18864100.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] is there an example application for Zend_Auth & Zend_Acl & Zend_Session ??

2008-08-06 Thread Matthew Weier O'Phinney
-- SteveWilhelm <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 03:09 PM -0700):
> Steven,
> 
> Did you ever find a good example. I am looking for one as well.

You might want to look at my ZF workshop slides from the Dutch PHP
Conference:

http://www.slideshare.net/weierophinney/zend-framework-workshop/

They provide some basics on Zend_Auth and Zend_Acl and how to persist
identity and check rights per request.

> Truppe Steven wrote:
> > 
> > 
> > i'm searching for a full example that shows how all these core
> > components (Zend_Auth, Zend_Acl and Zend_Session) work together in an
> > working example.
> > 
> > most tutorials seems out dated.
> > 
> > I want to save the acl and the username/password in a mysql table with
> > digest authentication, because this seems to be the most secure way, so
> > there is no password send in cleartext.
> > 
> > i hope there is a demo application for this.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] is there an example application for Zend_Auth & Zend_Acl & Zend_Session ??

2008-08-06 Thread SteveWilhelm

Steven,

Did you ever find a good example. I am looking for one as well.

- Steve W.


Truppe Steven wrote:
> 
> 
> i'm searching for a full example that shows how all these core
> components (Zend_Auth, Zend_Acl and Zend_Session) work together in an
> working example.
> 
> most tutorials seems out dated.
> 
> I want to save the acl and the username/password in a mysql table with
> digest authentication, because this seems to be the most secure way, so
> there is no password send in cleartext.
> 
> i hope there is a demo application for this.
> 
> best regards,
> Truppe Steven
> 
> 

-- 
View this message in context: 
http://www.nabble.com/is-there-an-example-application-for-Zend_Auth---Zend_Acl---Zend_Sessiontp12353860p18860587.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Form fieldset ID attribute keeps changing. Make up your mind!

2008-08-06 Thread Codiac

Matthew,

Fortunately I'm still developing :). I try to stay as close as possible to
the latest changes, until I'm ready to publish. I know it's a risk, but I'm
fine with that.

Good to see this will be latest change for this.

Regards, TJ.
-- 
View this message in context: 
http://www.nabble.com/Zend_Form-fieldset-ID-attribute-keeps-changing.-Make-up-your-mind%21-tp18857209p18858942.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Form fieldset ID attribute keeps changing. Make up your mind!

2008-08-06 Thread Matthew Weier O'Phinney
-- Codiac <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 11:43 AM -0700):
> Since my latest Zend Framework Core update I found out the rendering of the
> fieldset id attribute in a form has once again changed. That's three times
> now in the past few months.
> 
> It went from (in my case):
> 
> buttons (my original displayGroup name)
> 
> to
> 
> buttons-fieldset

The above was in a release candidate...

> to
> 
> fieldset-buttons

...and this was due to bugs filed against the release candidate and is
in current trunk. 

The reason for the change in the first place was to prevent duplicate
ids being generated (for instance, so the form and the fieldset it
defines as a decorator do not share the same id). The reason it switched
from appending to prepending was so to ensure they never start with
integers (which violates DOM).

> It's driving me nuts! %-| I've got dozens of forms where I let Zend_Form
> render the fieldset id attribute and I have to keep changing my CSS files.
> Make up your mind! :teeth:

The above will be the final change. One note: you may not want to track
trunk for projects that you're going to release to production; that way
you can change _once_ when you switch to a stable release tag.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


[fw-general] Zend_Loader_PluginLoader static values.

2008-08-06 Thread Haroldo Mitsumi Murata

Hi.

I want know how to get back values static stored on 
Zend_Loader_PluginLoader in another instance.


$loader = new Zend_Loader_PluginLoader(
  array( 'Foo_View_Helper'  => 
'application/modules/foo/views/helpers'),

  'foo'
);

How to create another instace to get 'foo' values back?

thanks

--
Haroldo Mitsumi Murata [K33]




Re: [fw-general] Zend_Db PDO/OCI/Oracle + RETURNING clause

2008-08-06 Thread Bill Karwin



Philip G wrote:
> 
> As I know it, sequences aren't affected by your transactions nor are they
> limited to your current session.
> 

Kind of both.  The sequence state is in the schema, it's outside of the
scope of your current session.  It has to do this so the database server can
guarantee that no value will be allocated to multiple clients.  

But CURRVAL is scoped to your current session, because it reports the last
value _you_ generated during your current session, not the last value
generated by the sequence for any client.  Note that CURRVAL reports nothing
(or an error) if you call it before you've called NEXTVAL during the current
session.

Sequences are totally outside transaction scope.

If you think about it, this is the only way that makes sense for sequences
to work.  All brands of database should implement auto-generation mechanisms
in this way.

I'm focusing on this topic because I think your earlier statements indicate
that you think there's a concurrency issue with using sequences in a
high-volume environment.  I don't think you need to worry, sequences are
designed to solve this issue.  You can talk to your DBA to confirm this.

Regards,
Bill Karwin
-- 
View this message in context: 
http://www.nabble.com/Zend_Db-PDO-OCI-Oracle-%2B-RETURNING-clause-tp18852478p18857613.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Form fieldset ID attribute keeps changing. Make up your mind!

2008-08-06 Thread Codiac

Since my latest Zend Framework Core update I found out the rendering of the
fieldset id attribute in a form has once again changed. That's three times
now in the past few months.

It went from (in my case):

buttons (my original displayGroup name)

to

buttons-fieldset

to

fieldset-buttons

It's driving me nuts! %-| I've got dozens of forms where I let Zend_Form
render the fieldset id attribute and I have to keep changing my CSS files.
Make up your mind! :teeth:

Regards, TJ.
-- 
View this message in context: 
http://www.nabble.com/Zend_Form-fieldset-ID-attribute-keeps-changing.-Make-up-your-mind%21-tp18857209p18857209.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Db PDO/OCI/Oracle + RETURNING clause

2008-08-06 Thread Philip G
On Wed, Aug 6, 2008 at 12:23 PM, Bill Karwin <[EMAIL PROTECTED]> wrote:

>
>
>
> Philip G wrote:
> >
> > As for using lastSequenceId(), bad mojo. Using Zend_Db's default
> > auto-commit
> > settings, it's extremely easy to get sequence ids crossed during heavy
> > loads, and thus causing all sorts of problems.
> >
>
> I'm not sure I understand this statement.
>
> I'm pretty sure CURRVAL is limited to the scope of the current database
> session; that's the only way it would be useful.  That is, if I generate a
> value 1234 with NEXTVAL, then CURRVAL will continue to report 1234 to me
> repeatedly during my session, even if you continue to use NEXTVAL to
> advance
> the sequence in your session.  CURRVAL will report different numbers; it's
> always the number we each last generated in our respective sessions.
>
> Also, sequences are not affected by transactions.  You cannot roll back a
> call to NEXTVAL and "return" a value to the sequence.  Also if I generate a
> value 1234, then you generate a value, you will get 1235 regardless of
> whether I have committed or not, and regardless of the transaction
> isolation
> mode either of us are using.  Sequences must ignore transaction scope, in
> order to maintain uniqueness.
>
> But perhaps there's something else that I don't know about your situation.
> I'm curious to hear about it, since I'm not an Oracle expert specifically.
>
>
As I know it, sequences aren't affected by your transactions nor are they
limited to your current session. Unless .NEXTVAL goes outside of your
session to grab the next id, leaving .CURRVAL in the current session only, I
don't see how .CURRVAL wouldn't be affected by somebody else's NEXTVAL nor
do I see how NEXTVAL wouldn't insure somebody else's NEXTVAL gets the next
number after yours.

The way I see it, CURRVAL and NEXTVAL would be stateless (I was mistake
about the auto-commit requirement. ha), that way there isn't any numerical
over laps between mutiple sessions altering the sequence value.

As with you, I could be mistaken to. I'm by no means a DBA.  I know Oracle
only from limited exposure writing stored procs back in the day.

---
Philip
[EMAIL PROTECTED]
http://www.gpcentre.net/


Re: [fw-general] Zend_Mail_Part::getHeader() and optional mail headers

2008-08-06 Thread boipster

The easiest thing to do is wrap it in try catch blocks.  Extending the
Zend_Mail components is no trivial task.  See my messeage 
http://www.nabble.com/Extending-Zend_Mail_Part-for-Reading-p18641268.html
Extending Zend_Mail_Part for Reading  to get an idea of what is required to
extend.



Guillaume Rossolini wrote:
> 
> Hi,
> 
> I just noticed that Zend_Mail_Message::getHeader() throws an exception
> when
> I try to get a header that is not there.  For instance, the "reply-to"
> header isn't mandatory.
> Do you think I should put try/catch blocks in my code? Or maybe
> subclassing
> Zend_Mail_Message to return a false boolean would be a more sensible
> approach?
> 
> Thanks,
> 
> --
> Guillaume Rossolini
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Mail_Part%3A%3AgetHeader%28%29-and-optional-mail-headers-tp18809984p18856297.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Db PDO/OCI/Oracle + RETURNING clause

2008-08-06 Thread Bill Karwin



Philip G wrote:
> 
> As for using lastSequenceId(), bad mojo. Using Zend_Db's default
> auto-commit
> settings, it's extremely easy to get sequence ids crossed during heavy
> loads, and thus causing all sorts of problems. 
> 

I'm not sure I understand this statement.

I'm pretty sure CURRVAL is limited to the scope of the current database
session; that's the only way it would be useful.  That is, if I generate a
value 1234 with NEXTVAL, then CURRVAL will continue to report 1234 to me
repeatedly during my session, even if you continue to use NEXTVAL to advance
the sequence in your session.  CURRVAL will report different numbers; it's
always the number we each last generated in our respective sessions.

Also, sequences are not affected by transactions.  You cannot roll back a
call to NEXTVAL and "return" a value to the sequence.  Also if I generate a
value 1234, then you generate a value, you will get 1235 regardless of
whether I have committed or not, and regardless of the transaction isolation
mode either of us are using.  Sequences must ignore transaction scope, in
order to maintain uniqueness.

But perhaps there's something else that I don't know about your situation. 
I'm curious to hear about it, since I'm not an Oracle expert specifically.

Regards,
Bill Karwin
-- 
View this message in context: 
http://www.nabble.com/Zend_Db-PDO-OCI-Oracle-%2B-RETURNING-clause-tp18852478p18855926.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Db PDO/OCI/Oracle + RETURNING clause

2008-08-06 Thread Philip G
That's what I was afraid up. Looking in the code, I didn't see any
functionality pointing to that.

As for using lastSequenceId(), bad mojo. Using Zend_Db's default auto-commit
settings, it's extremely easy to get sequence ids crossed during heavy
loads, and thus causing all sorts of problems. nextSequenceId() is the
prefered method; however, that still causes issues due to the autocreates of
our sequences.

I'll just write out the statement then. Old schoolin' it.

---
Philip
[EMAIL PROTECTED]
http://www.gpcentre.net/


On Wed, Aug 6, 2008 at 11:30 AM, Bill Karwin <[EMAIL PROTECTED]> wrote:

>
>
>
> Philip G wrote:
> >
> > I don't suppose there's anyway to use the RETURNING clause within
> > Zend_Db's
> > architecture without writing out the full statement myself and using
> > parameter bindings?
> >
>
> You're on your own here.  Zend_Db has no special support for RETURNING.  If
> you can do it by writing your own query and binding return parameters,
> great.  You may also have to write your own custom version of
> Zend_Db_Table::insert() to support this method of returning the id.
>
>
> Philip G wrote:
> >
> > I'd expect Zend_Db_Adapter_Abstract::insert() would support something of
> > this nature for Oracle databases. It's probably the only way to easily
> get
> > back a primary key on tables that are setup to "mimic" auto_increment. On
> > top of that, I'm having one hell of a time battling with our DBAs to gain
> > access to even view the sequence to pop it.
> >
>
> Sorry, you're going to have to persuade the DBA to give you that access.
> Zend_Db has the lastSequenceId() function, which in turn queries "SELECT
> sequencename.CURRVAL FROM dual" (given a sequence called "sequencename").
> But of course this requires that you have the privilege to call the
> function
> on the sequence.
>
> Regards,
> Bill Karwin
> --
> View this message in context:
> http://www.nabble.com/Zend_Db-PDO-OCI-Oracle-%2B-RETURNING-clause-tp18852478p18854992.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] confused by dojo isEnabled

2008-08-06 Thread Matthew Weier O'Phinney
-- Dimitri van Hees <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 05:34 PM +0200):
> i've been trying out Zend_Dojo today, but to me one thing is still not  
> clear. let me explain the situation. i have one layout file  
> (default.phtml) in which i have to include the following code:
>
> if ($this->dojo()->isEnabled()):
>$this->dojo()->setLocalPath('/js/dojo/dojo.js')
> ->addStyleSheetModule('dijit.themes.tundra');
>echo $this->dojo();
>
> my problem is simple: on pages without javascript but with the same  
> layout, i get a fatal error because $this->dojo() isn't there. i'm not  
> sure whether Zend_Dojo::enableView($view) does this for pages where i  
> use dojo, in that case perhaps doing this in my bootstrap file is the  
> solution. however, as it is not needed in 95% of my pages, this doesn't  
> look right to me.
>
> any suggestions anyone? and is setting $this->dojo()->enable() manually  
> right in case i want to use my own javascript instead of zf's generated 
> js?

You should call Zend_Dojo::enableView($view) in your bootstrap,
regardless of whether your given action will be utilizing it. By
default, the dojo() view helper is still disabled -- it is only when you
actually manually enable it or utilize dijit form elements that it will
be marked as enabled.

The dojo() view helper sets up your dojo environment for you -- so if
your own JS depends on dojo, you should definitely enable it in such
situations using enable() -- otherwise dojo.js will not be included on
your page, and you'll run into all sorts of other issues.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Zend Form id attrib rendering error

2008-08-06 Thread Dario Zamuner

Good! 
Next time I will definitely check the svn first.

Regards
Dario


Matthew Weier O'Phinney-3 wrote:
> 
> 
> This is already fixed in current trunk and the 1.6 release branch.
> 
> 
> -- 
> Matthew Weier O'Phinney
> Software Architect   | [EMAIL PROTECTED]
> Zend Framework   | http://framework.zend.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend-Form-id-attrib-rendering-error-tp18847554p18855074.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Db PDO/OCI/Oracle + RETURNING clause

2008-08-06 Thread Bill Karwin



Philip G wrote:
> 
> I don't suppose there's anyway to use the RETURNING clause within
> Zend_Db's
> architecture without writing out the full statement myself and using
> parameter bindings?
> 

You're on your own here.  Zend_Db has no special support for RETURNING.  If
you can do it by writing your own query and binding return parameters,
great.  You may also have to write your own custom version of
Zend_Db_Table::insert() to support this method of returning the id.


Philip G wrote:
> 
> I'd expect Zend_Db_Adapter_Abstract::insert() would support something of
> this nature for Oracle databases. It's probably the only way to easily get
> back a primary key on tables that are setup to "mimic" auto_increment. On
> top of that, I'm having one hell of a time battling with our DBAs to gain
> access to even view the sequence to pop it.
> 

Sorry, you're going to have to persuade the DBA to give you that access. 
Zend_Db has the lastSequenceId() function, which in turn queries "SELECT
sequencename.CURRVAL FROM dual" (given a sequence called "sequencename"). 
But of course this requires that you have the privilege to call the function
on the sequence.

Regards,
Bill Karwin
-- 
View this message in context: 
http://www.nabble.com/Zend_Db-PDO-OCI-Oracle-%2B-RETURNING-clause-tp18852478p18854992.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] How are you using Zend_Pdf?

2008-08-06 Thread Sasa Ebach

Hi Bryce,

> Since the FDF is easy to write, and separated from the PDF,
> it's pretty easy to populate even complex, multi-page forms.

That is very cool. I didn't know about FDF. Thanks for the tip and the link. I 
will investigate this further.


--
sasa






[fw-general] confused by dojo isEnabled

2008-08-06 Thread Dimitri van Hees

hi there,

i've been trying out Zend_Dojo today, but to me one thing is still not 
clear. let me explain the situation. i have one layout file 
(default.phtml) in which i have to include the following code:


if ($this->dojo()->isEnabled()):
   $this->dojo()->setLocalPath('/js/dojo/dojo.js')
->addStyleSheetModule('dijit.themes.tundra');
   echo $this->dojo();

my problem is simple: on pages without javascript but with the same 
layout, i get a fatal error because $this->dojo() isn't there. i'm not 
sure whether Zend_Dojo::enableView($view) does this for pages where i 
use dojo, in that case perhaps doing this in my bootstrap file is the 
solution. however, as it is not needed in 95% of my pages, this doesn't 
look right to me.


any suggestions anyone? and is setting $this->dojo()->enable() manually 
right in case i want to use my own javascript instead of zf's generated js?


thanks in advance,

dimitri


Re: [fw-general] Zend_Db PDO/OCI/Oracle + RETURNING clause

2008-08-06 Thread Roberto A. Ramirez Q.
According to the manual:

Zend_Db_Adapter_Abstract::insert (line 461)

Inserts a table row with specified data.

* return: The number of affected rows.
* access: public

int insert (mixed $table,  $bind)

* mixed $table: The table to insert data into.
* array $bind: Column-value pairs.


As the manual says, insert is not intended to return the generated key...


Please read:
http://framework.zend.com/manual/en/zend.db.html#zend.db.adapter.adapter-notes.pdo-oci

You should use:

Zend_Db_Adapter_Abstract::lastSequenceId (line 953)

Return the most recent value from the specified sequence in the database.

This is supported only on RDBMS brands that support sequences (e.g.
Oracle, PostgreSQL, DB2). Other RDBMS brands return null.

* access: public

string lastSequenceId (string $sequenceName)

* string $sequenceName





> I don't suppose there's anyway to use the RETURNING clause within
> Zend_Db's
> architecture without writing out the full statement myself and using
> parameter bindings?
>
> I'd expect Zend_Db_Adapter_Abstract::insert() would support something of
> this nature for Oracle databases. It's probably the only way to easily get
> back a primary key on tables that are setup to "mimic" auto_increment. On
> top of that, I'm having one hell of a time battling with our DBAs to gain
> access to even view the sequence to pop it. (not to mention we have a lot
> of
> auto-generated sequences that don't get created until first insert --
> please, don't ask. Even some of our current DBAs are baffled).
>
>
> ---
> Philip
> [EMAIL PROTECTED]
> http://www.gpcentre.net/
>




Re: [fw-general] view helper inclusion leads to blank view

2008-08-06 Thread Bram Vogelaar

thanks Matthew

Oh man i feel like such a muppet now, your analysis was bang on the  
money. I wasnt sure what could be the problem
so i just poored everything into an email hoping it would make someone  
else that wasnt staring at it for hours.


bram

On Aug 6, 2008, at 3:47 PM, Matthew Weier O'Phinney wrote:


Lots of environmental information -- thanks, as it helps provided
context. However, as a result, I'm going to top-post to get right to  
the

heart of the issue: you never registered your custom view helper path.
You have the following line:

   Zend_Controller_Action_HelperBroker::addPrefix('core_Helper_View');

but that's registering the prefix with the _ACTION_ helper broker, not
the view. You need to add the following line:

   $view->addHelperPath('core/Helper/View/', 'core_Helper_View');

in your Initialize class' initView() method. I'd also remove that  
action

helper broker registration, as you almost certainly didn't intend for
that.

-- Bram Vogelaar <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 10:59 AM +0200):

Dear All

I currently trying to get a view helper to work  and as soon as i
include a custom view helper in a view using >MyNewViewHelper

?>
the resulting rendered view is empty/blank. I would really  
appreciate if
someone could shed  some light on what i am doing wrong as  I have  
tried

to use v1.53, v1.6 RC1 and standard\branches\release-1.6. of the
framework and I can t get any to work and no errors show up in the
apache or php log.

with regards
Bram

i am  currently utilizing the following project layout on OS X 10.5.4
using xampp 0.7.2 with /path/to/php, /path/to/pear, /path/to/ 
Library and

/path/to/application as included folders

htdocs
|-> index.php


   require_once('Zend/Loader.php');

   Zend_Loader::registerAutoload();

   $front = Zend_Controller_Front::getInstance();
   $front->registerPlugin(new core_Initialize());
   $front->dispatch();


Library
|->Zend
application
|->modules
|->default
|->controllers
|->IndexController.php
|->models
|->views
|>scripts
|->index
|->index.phtml
|->core
|->config
|->tmp
|->logs
|->Acl
|->Plugin
|->Helper
|>View
|-> MyNewViewHelper.php
|->Theme
|->layout.phtml
|->initialize.php


class IndexController extends Zend_Controller_Action
{
   public function indexAction()
   {
   $this->view->headTitle('Dashboard');
   }
}



hello world



  headTitle() ?>
  MyNewViewHelper() ?>
  layout()->content ?>


 (which is a copy of Zend_View_Helper_Url)

class core_Helper_View_MyNewViewHelper {

   public function url(array $urlOptions = array(), $name = null,
$reset = false, $encode = true)
   {
   $router = Zend_Controller_Front::getInstance()->getRouter();
   return $router->assemble($urlOptions, $name, $reset, $encode);
   }

}




$this->_root = realpath(dirname(__FILE__) . '/../../');

public function routeStartup()
   {
   $this->initHelpers();
   $this->initView();
   $this->initControllers();

   $this->_front->throwExceptions(false);
   }

   public function initHelpers()
   {

Zend_Controller_Action_HelperBroker::addPrefix('core_Helper_View');
   }

   public function initView()
   {
   // Setup View
   $view = new Zend_View();

   // Set view in ViewRenderer
   $viewRenderer =
Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
   $viewRenderer->setView($view);

   Zend_Layout::startMvc($this->_root . '/application/core/ 
Theme');

   $request = Zend_Controller_Front::getInstance()->getRequest();
   }

   public function initControllers()
   {
   $this->_front->addModuleDirectory($this->_root . '/
application/modules/');
   }




--
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/




[fw-general] Zend_Db PDO/OCI/Oracle + RETURNING clause

2008-08-06 Thread Philip G
I don't suppose there's anyway to use the RETURNING clause within Zend_Db's
architecture without writing out the full statement myself and using
parameter bindings?

I'd expect Zend_Db_Adapter_Abstract::insert() would support something of
this nature for Oracle databases. It's probably the only way to easily get
back a primary key on tables that are setup to "mimic" auto_increment. On
top of that, I'm having one hell of a time battling with our DBAs to gain
access to even view the sequence to pop it. (not to mention we have a lot of
auto-generated sequences that don't get created until first insert --
please, don't ask. Even some of our current DBAs are baffled).


---
Philip
[EMAIL PROTECTED]
http://www.gpcentre.net/


Re: [fw-general] Zend_Dojo_Form_Element_CheckBox issues

2008-08-06 Thread Matthew Weier O'Phinney
-- Jan Wagner-Rosenkranz <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 02:33 PM +0200):
> Zend_Dojo_Form_Element_CheckBox generates an invalid id (in array  
> notation) when used in subform (i.e. terminal[new] instead of  
> terminal-new). Besides that it generates an option attribute with value  
> "0 1". Both issues are not XHTML compliant.

Please open issues in the tracker for both of these.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Zend_Dojo_Subform generates name attribute for tabContainer ContentPane

2008-08-06 Thread Matthew Weier O'Phinney
-- Jan Wagner-Rosenkranz <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 02:30 PM +0200):
> Zend_Dojo_Subform generates a name attribute for the surrounding  
> tabContainer-contentPane-div, which is not XHTML compliant. I guess the  
> decorator just takes the value from the Subform.

Please open an issue in the tracker for this.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Zend_Test_PHPUnit and hashed form elements

2008-08-06 Thread Matthew Weier O'Phinney
-- Milchbazi <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 05:22 AM -0700):
> 
> This issue has been added to Zend Framework Issue Tracker. See 
> http://framework.zend.com/issues/browse/ZF-3869
> http://framework.zend.com/issues/browse/ZF-3869 

Excellent, thanks. I'll see if I can address it today; if not, at the
latest we'll likely have a mini-release in a week or so after the 1.6.0
final release.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] Zend Form id attrib rendering error

2008-08-06 Thread Matthew Weier O'Phinney
-- Dario Zamuner <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 02:38 AM -0700):
> Using Zend Framework 1.6.0 RC 1 if I add an hidden element to a form with the
> 'id' name, it's rendered (and escaped) inside the id attrib of the form too.

This is already fixed in current trunk and the 1.6 release branch.


> Example:
> 
> class TestForm extends Zend_Form
> {
>   public function __construct()
>   {
>   parent::__construct();
>   
>   $elem = new Zend_Form_Element_Hidden('id');
> 
>   $this->addElements(array($elem));
>   }
> }
> 
> 
> The HTML output is
> 
>  action="" method="post">
> 
> 
> 

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] MSIE error with Zend_Dojo_View_Helper_Dojo_Container

2008-08-06 Thread Matthew Weier O'Phinney
-- Jan Wagner-Rosenkranz <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 11:04 AM +0200):
> as stated once here on the mailing list, there is a small bug with dojo  
> on MSIE. The jscript error with undefined is a result of the onload  
> zendDijit function. The error goes away if I replace
>
> if (null !== n) {
>
> with
>
> if (null != n) {
>
> in Zend/Dojo/View/Helper/Dojo/Container.php:736

Thanks for the report; I've fixed this in trunk and the 1.6 release
branch now.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] view helper inclusion leads to blank view

2008-08-06 Thread Matthew Weier O'Phinney
Lots of environmental information -- thanks, as it helps provided
context. However, as a result, I'm going to top-post to get right to the
heart of the issue: you never registered your custom view helper path.
You have the following line:

Zend_Controller_Action_HelperBroker::addPrefix('core_Helper_View');

but that's registering the prefix with the _ACTION_ helper broker, not
the view. You need to add the following line:

$view->addHelperPath('core/Helper/View/', 'core_Helper_View');

in your Initialize class' initView() method. I'd also remove that action
helper broker registration, as you almost certainly didn't intend for
that.

-- Bram Vogelaar <[EMAIL PROTECTED]> wrote
(on Wednesday, 06 August 2008, 10:59 AM +0200):
> Dear All
>
> I currently trying to get a view helper to work  and as soon as i  
> include a custom view helper in a view using MyNewViewHelper 
> ?>
> the resulting rendered view is empty/blank. I would really appreciate if 
> someone could shed  some light on what i am doing wrong as  I have tried
>  to use v1.53, v1.6 RC1 and standard\branches\release-1.6. of the  
> framework and I can t get any to work and no errors show up in the  
> apache or php log.
>
> with regards
> Bram
>
> i am  currently utilizing the following project layout on OS X 10.5.4  
> using xampp 0.7.2 with /path/to/php, /path/to/pear, /path/to/Library and 
> /path/to/application as included folders
>
> htdocs
>   |-> index.php
>
> 
> require_once('Zend/Loader.php');
>
> Zend_Loader::registerAutoload();
>
> $front = Zend_Controller_Front::getInstance();
> $front->registerPlugin(new core_Initialize());
> $front->dispatch();
> 
>
> Library
>   |->Zend
> application
>   |->modules
>   |->default
>   |->controllers
>   |->IndexController.php
>   |->models
>   |->views
>   |>scripts
>   |->index
>   |->index.phtml
>   |->core
>   |->config
>   |->tmp
>   |->logs
>   |->Acl
>   |->Plugin
>   |->Helper
>   |>View
>   |-> MyNewViewHelper.php
>   |->Theme
>   |->layout.phtml
>   |->initialize.php
>
> 
> class IndexController extends Zend_Controller_Action
> {
> public function indexAction()
> {
> $this->view->headTitle('Dashboard');
> }
> }
> 
>
> 
> hello world
> 
>   
> 
>headTitle() ?>
>MyNewViewHelper() ?>
>layout()->content ?>
> 
>
>  (which is a copy of Zend_View_Helper_Url)
>
> class core_Helper_View_MyNewViewHelper {
>
> public function url(array $urlOptions = array(), $name = null,  
> $reset = false, $encode = true)
> {
> $router = Zend_Controller_Front::getInstance()->getRouter();
> return $router->assemble($urlOptions, $name, $reset, $encode);
> }
>
> }
> 
>
> 
>
> $this->_root = realpath(dirname(__FILE__) . '/../../');
>
> public function routeStartup()
> {
> $this->initHelpers();
> $this->initView();
> $this->initControllers();
>
> $this->_front->throwExceptions(false);
> }
>
> public function initHelpers()
> {
>  
> Zend_Controller_Action_HelperBroker::addPrefix('core_Helper_View');
> }
>
> public function initView()
> {
> // Setup View
> $view = new Zend_View();
>
> // Set view in ViewRenderer
> $viewRenderer =  
> Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');
> $viewRenderer->setView($view);
>
> Zend_Layout::startMvc($this->_root . '/application/core/Theme');
> $request = Zend_Controller_Front::getInstance()->getRequest();
> }
>
> public function initControllers()
> {
> $this->_front->addModuleDirectory($this->_root . '/ 
> application/modules/');
> }
> 
>

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] What's up with changeset 10523?

2008-08-06 Thread Matthew Weier O'Phinney
-- Willie Alberty <[EMAIL PROTECTED]> wrote
(on Tuesday, 05 August 2008, 07:37 PM -0700):
> According to FishEye, everything in standard/trunk has been deleted:
>
> http://framework.zend.com/code/changelog/Zend_Framework?cs=10523
>
> Has the trunk moved again? I couldn't find anything in the list  
> archive...

No, trunk has not moved again.

This was a wierd situation that was a result of a bad merge in my local
svk repo (not svn). Fisheye is actually reporting a ton of changes that
never actually occurred or which were reverted.

All code is present and accounted for with current revisions.

-- 
Matthew Weier O'Phinney
Software Architect   | [EMAIL PROTECTED]
Zend Framework   | http://framework.zend.com/


Re: [fw-general] How are you using Zend_Pdf?

2008-08-06 Thread Martijn Korse


Bryce Lohr-2 wrote:
> 
> Hi Martijn,
> [...]
> Just FYI, the non-ZF package DomPDF 
> (http://www.digitaljunkies.ca/dompdf/) can convert HTML to PDF. It has 
> some limitations, but is still useful for many common situations.
> 

Yea, i know, but as you said: it's not ZF :-)
What i meant was that it would just be a nice to have, as you can choose to
first create the layout in HTML and then convert it, which could speed up
the creation proces.
If i would want to convert existing HTML pages to PDF i would probably not
use something like ZF or DOMPDF at all, but a standalone server-side
application that can do this for me.

-
http://devshed.excudo.net http://devshed.excudo.net 
-- 
View this message in context: 
http://www.nabble.com/How-are-you-using-Zend_Pdf--tp18767550p18851075.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] How are you using Zend_Pdf?

2008-08-06 Thread Bryce Lohr

Hi Sasa,

I've got similarly complex financial assistance forms I need to produce. 
Until Zend_Pdf has features for easily filling PDF templates, the 
solution I use is to author the form PDF document completely inside 
Adobe LiveCycle, making sure to define each fillable field as a real PDF 
form field (complete with field name, size, etc.). Then, I use PHP to 
dynamically create a FDF document which basically contains just the 
field names and values and a URL reference to the original PDF document. 
When Acrobat Reader opens the FDF, it downloads the PDF and 
automatically populates all the form fields with the dynamic values from 
the FDF. Since the FDF is easy to write, and separated from the PDF, 
it's pretty easy to populate even complex, multi-page forms.


See this URL for more info: http://www.tgreer.com/fdfServe.html

Regards,
Bryce Lohr

Sasa Ebach wrote:

Hey Willie,

nice to see Zend_Pdf progressing.

I use it to pre fill an insurance form. Here ist the template:

http://www.rosa-kautionsversicherung.de/kautionsversicherung-premium-antrag/antrag.pdf 



It is quite a beast. Many fields. It is a lot of work to find all the 
coordinates of the fields, so I create a little tool the creates a 
grid on top of a PDF.


grid.php
+++
require_once 'Zend/Pdf.php';

$file = $argv[1];
$pagenumber = isset($argv[2]) ? intval($argv[2]) : 1;
$dest = str_replace('.pdf', '', $file) . "-grid-$pagenumber.pdf";

$pdf = Zend_Pdf::load($file);

$page = $pdf->pages[$pagenumber-1];
$width  = $page->getWidth();
$height = $page->getHeight();

$style = new Zend_Pdf_Style();
$style->setFillColor(new Zend_Pdf_Color_Html('#aa'));
$style->setLineColor(new Zend_Pdf_Color_Html('#a73e3a'));
$style->setLineWidth(.2);
$style->setLineDashingPattern(array(1, 2, 1, 2), .1);
$style->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 
4);


$page->setStyle($style);

for ($i = 20; $i < $height - 20; $i+=10)
{
  $page->drawLine(20, $i, $width-20, $i);
  $page->drawText($i, 11, $i);
  $page->drawText($i, $width-20, $i);
}

for ($i = 20; $i < $width - 20; $i+=10)
{
  $page->drawLine($i, 20, $i, $height-20);
  $page->drawText($i, $i, 15);
  $page->drawText($i, $i, $height-20);
}

puts("$file ($pagenumber) -> $dest\nw: $width, h: $height");
$pdf->save($dest);
+++

But still, it is a *lot* of work (takes hours) to find all coordinates 
of the above mentioned PDF. This is how I fill out the forms after all 
fields are validated:


+++
# just an excerpt
  $pdffelder[3] = array(
'Grundbesitz/Immobilien ja' => array('X', 345, 780),
'Grundbesitz/Immobilien nein' => array('X', 373, 780),
'Vermietungfirma ja' => array('X', 345, 760),
'Vermietungfirma nein' => array('X', 373, 760),
'Teile Anlagevermögen' => 
array($f['Teile_des_Anlagevermoegens_der_Gesellschaft'], 305, 741),
'Art Immobilien' => array($f['Art_der_Grundstuecke_und_Gebaeude'], 
195, 721),
'Wert Immobilien' => 
array($f['Wert_der_Grundstuecke_und_Gebaeude'], 200, 701),

# it goes on like this, and later

$style = new Zend_Pdf_Style();
$style->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_COURIER), 
8);


foreach ($pdffelder as $pagenumber => $pdfdata)
{
  $page = $pdf->pages[$pagenumber];
  $page->setStyle($style);
  foreach ($pdfdata as $k => $v)
  {
$page->drawText($v[0], $v[1], $v[2], 'UTF-8');
  }
}

$pdf->save('antrag.pdf');
+++

So, what would be a killer feature for me, would be the ability two 
define fields and coordinates in Acrobat. ID those and just write text 
to those IDs. I believe other packages are able to do this. This would 
also get rid of another problem of mine: line breaks or multiline 
fields and page breaks etc.


Thanks a lot for your work so far.

-sasa ebach


Re: [fw-general] How are you using Zend_Pdf?

2008-08-06 Thread Bryce Lohr

Hi Martijn,

Martijn Korse wrote:

2. ability to convert HTML to PDF. This would be a nice to have, since it
wouldn't create new possiblities, only an easier way to create PDFs. But of
course, for that the Zend-Framework would need something like an
HTML-parser. (I've been thinking about submitting it as a feature request,
since other modules would be able to benefit from it too)
  


Just FYI, the non-ZF package DomPDF 
(http://www.digitaljunkies.ca/dompdf/) can convert HTML to PDF. It has 
some limitations, but is still useful for many common situations.



Are large amounts of text currently automatically divided over multiple
pages? If not, that would also be a nice feature.
  


+1 for this.


Regards,
Bryce Lohr



Re: [fw-general] How are you using Zend_Pdf?

2008-08-06 Thread Sasa Ebach

Hey Willie,

nice to see Zend_Pdf progressing.

I use it to pre fill an insurance form. Here ist the template:

http://www.rosa-kautionsversicherung.de/kautionsversicherung-premium-antrag/antrag.pdf

It is quite a beast. Many fields. It is a lot of work to find all the 
coordinates of the fields, so I create a little tool the creates a grid on top 
of a PDF.


grid.php
+++
require_once 'Zend/Pdf.php';

$file = $argv[1];
$pagenumber = isset($argv[2]) ? intval($argv[2]) : 1;
$dest = str_replace('.pdf', '', $file) . "-grid-$pagenumber.pdf";

$pdf = Zend_Pdf::load($file);

$page = $pdf->pages[$pagenumber-1];
$width  = $page->getWidth();
$height = $page->getHeight();

$style = new Zend_Pdf_Style();
$style->setFillColor(new Zend_Pdf_Color_Html('#aa'));
$style->setLineColor(new Zend_Pdf_Color_Html('#a73e3a'));
$style->setLineWidth(.2);
$style->setLineDashingPattern(array(1, 2, 1, 2), .1);
$style->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_HELVETICA), 4);

$page->setStyle($style);

for ($i = 20; $i < $height - 20; $i+=10)
{
  $page->drawLine(20, $i, $width-20, $i);
  $page->drawText($i, 11, $i);
  $page->drawText($i, $width-20, $i);
}

for ($i = 20; $i < $width - 20; $i+=10)
{
  $page->drawLine($i, 20, $i, $height-20);
  $page->drawText($i, $i, 15);
  $page->drawText($i, $i, $height-20);
}

puts("$file ($pagenumber) -> $dest\nw: $width, h: $height");
$pdf->save($dest);
+++

But still, it is a *lot* of work (takes hours) to find all coordinates of the 
above mentioned PDF. This is how I fill out the forms after all fields are 
validated:


+++
# just an excerpt
  $pdffelder[3] = array(
'Grundbesitz/Immobilien ja' => array('X', 345, 780),
'Grundbesitz/Immobilien nein' => array('X', 373, 780),
'Vermietungfirma ja' => array('X', 345, 760),
'Vermietungfirma nein' => array('X', 373, 760),
'Teile Anlagevermögen' => 
array($f['Teile_des_Anlagevermoegens_der_Gesellschaft'], 305, 741),

'Art Immobilien' => array($f['Art_der_Grundstuecke_und_Gebaeude'], 195, 
721),
'Wert Immobilien' => array($f['Wert_der_Grundstuecke_und_Gebaeude'], 200, 
701),

# it goes on like this, and later

$style = new Zend_Pdf_Style();
$style->setFont(Zend_Pdf_Font::fontWithName(Zend_Pdf_Font::FONT_COURIER), 8);

foreach ($pdffelder as $pagenumber => $pdfdata)
{
  $page = $pdf->pages[$pagenumber];
  $page->setStyle($style);
  foreach ($pdfdata as $k => $v)
  {
$page->drawText($v[0], $v[1], $v[2], 'UTF-8');
  }
}

$pdf->save('antrag.pdf');
+++

So, what would be a killer feature for me, would be the ability two define 
fields and coordinates in Acrobat. ID those and just write text to those IDs. 
I believe other packages are able to do this. This would also get rid of 
another problem of mine: line breaks or multiline fields and page breaks etc.


Thanks a lot for your work so far.

-sasa ebach


[fw-general] Zend_Dojo_Form_Element_CheckBox issues

2008-08-06 Thread Jan Wagner-Rosenkranz

Hi there,

Zend_Dojo_Form_Element_CheckBox generates an invalid id (in array 
notation) when used in subform (i.e. terminal[new] instead of 
terminal-new). Besides that it generates an option attribute with value 
"0 1". Both issues are not XHTML compliant.


Cheers Jan


[fw-general] Zend_Dojo_Subform generates name attribute for tabContainer ContentPane

2008-08-06 Thread Jan Wagner-Rosenkranz

Hi there,

Zend_Dojo_Subform generates a name attribute for the surrounding 
tabContainer-contentPane-div, which is not XHTML compliant. I guess the 
decorator just takes the value from the Subform.


Cheers Jan


Re: [fw-general] Zend_Test_PHPUnit and hashed form elements

2008-08-06 Thread Milchbazi

This issue has been added to Zend Framework Issue Tracker. See 
http://framework.zend.com/issues/browse/ZF-3869
http://framework.zend.com/issues/browse/ZF-3869 


-- 
View this message in context: 
http://www.nabble.com/Zend_Test_PHPUnit-and-hashed-form-elements-tp18796568p18850004.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] New ZFWiki release available

2008-08-06 Thread Robert Castley
Today sees the public 'alpha' release of ZFWiki.  A lot has happened over
the last few weeks and she is turning into something useful and usable (at
last!).
 
I am really happy with everything so far and the support on this list has
been a major help in getting ZFWiki this far.
 
Download:
http://zfwiki.googlecode.com/files/zfwiki-r332.zip
 
 
Discussion:
http://groups.google.com/group/zfwiki
 
 
Bugs/Issues:
http://code.google.com/p/zfwiki/issues/list
 
 
Installation:
http://code.google.com/p/zfwiki/wiki/Installation
 
 
Live Demo:
http://rcastley.plus.com   (you can log in as any
username with no password)
 
Best Regards,
 
- Robert
 



This email has been scanned for all known viruses by the MessageLabs Email 
Security Service and the Macro 4 plc internal virus protection system.


Re: [fw-general] How are you using Zend_Pdf?

2008-08-06 Thread Martijn Korse

Recently i have been using it to create flyers via a CMS. All data is loaded
from a database and relevant pictures are looked up on the HardDisk.
In the past i've used fpdf (or extended versions of it) a lot for:
- creating invoices
- creating profile-pages
(both based on database-data);

Two features come to mind:
1. support for nested tables. This one is on the top of my wishlist when it
comes to creating PDFs. For some projects they are simply critical.
2. ability to convert HTML to PDF. This would be a nice to have, since it
wouldn't create new possiblities, only an easier way to create PDFs. But of
course, for that the Zend-Framework would need something like an
HTML-parser. (I've been thinking about submitting it as a feature request,
since other modules would be able to benefit from it too)

Are large amounts of text currently automatically divided over multiple
pages? If not, that would also be a nice feature.

-
http://devshed.excudo.net http://devshed.excudo.net 
-- 
View this message in context: 
http://www.nabble.com/How-are-you-using-Zend_Pdf--tp18767550p18848907.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend Form id attrib rendering error

2008-08-06 Thread Dario Zamuner

Using Zend Framework 1.6.0 RC 1 if I add an hidden element to a form with the
'id' name, it's rendered (and escaped) inside the id attrib of the form too.

Example:

class TestForm extends Zend_Form
{
public function __construct()
{
parent::__construct();

$elem = new Zend_Form_Element_Hidden('id');

$this->addElements(array($elem));
}
}


The HTML output is






-- 
View this message in context: 
http://www.nabble.com/Zend-Form-id-attrib-rendering-error-tp18847554p18847554.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Incubator location?

2008-08-06 Thread Simone Carletti
http://framework.zend.com/svn/framework/standard/incubator/

-- Simone


On Wed, Aug 6, 2008 at 11:21 AM, Andrew Yager <[EMAIL PROTECTED]> wrote:

> Hi,
>
> Can someone please inform me as to the current location of the incubator
> files? I seem to be unable to find them...
>
> Thanks!
>
> Andrew
>
> --
> Andrew Yager, Managing Director   (MACS BCompSc MCP)
> Real World Technology Solutions Pty Ltd
> ph: 1300 798 718 or (02) 9037 0500
> fax: (02) 9037 0591 mob: 0405 152 568
> http://www.rwts.com.au/ or http://www.stonebridgecomputing.com.au/
>
>


[fw-general] Incubator location?

2008-08-06 Thread Andrew Yager

Hi,

Can someone please inform me as to the current location of the  
incubator files? I seem to be unable to find them...


Thanks!

Andrew

--
Andrew Yager, Managing Director   (MACS BCompSc MCP)
Real World Technology Solutions Pty Ltd
ph: 1300 798 718 or (02) 9037 0500
fax: (02) 9037 0591 mob: 0405 152 568
http://www.rwts.com.au/ or http://www.stonebridgecomputing.com.au/



[fw-general] Zend_Validate_Float with locale filtering

2008-08-06 Thread Jan Wagner-Rosenkranz

Hi there,

Zend_Validate_Float does not seem to validate right with locales
set. The function isValid() uses localeconv() to replace the thousands
separator and decimal point. But this only works if I have setup the php
locale with setlocale(). But if I do that, floatval() later on will
return a localized float value and so the validation fails.

I have fixed that for know with a custom float validator that uses a
global Zend_Locale object from Zend_Registry and falls back to the old
behavior if not set.

try {
$locale = Zend_Registry::get('Zend_Locale');
$valueFiltered = Zend_Locale_Format::getFloat(
$valueString, array('locale' => $locale)
);
} catch (Exception $e) {
$locale = localeconv();
$valueFiltered = str_replace($locale['thousands_sep'], '',
$valueString);
$valueFiltered = str_replace($locale['decimal_point'], '.',
$valueFiltered);
}

Cheers Jan





[fw-general] MSIE error with Zend_Dojo_View_Helper_Dojo_Container

2008-08-06 Thread Jan Wagner-Rosenkranz

Hi there,

as stated once here on the mailing list, there is a small bug with dojo 
on MSIE. The jscript error with undefined is a result of the onload 
zendDijit function. The error goes away if I replace


if (null !== n) {

with

if (null != n) {

in Zend/Dojo/View/Helper/Dojo/Container.php:736

Cheers Jan



[fw-general] view helper inclusion leads to blank view

2008-08-06 Thread Bram Vogelaar

Dear All

I currently trying to get a view helper to work  and as soon as i  
include a custom view helper in a view using >MyNewViewHelper ?>
the resulting rendered view is empty/blank. I would really appreciate  
if someone could shed  some light on what i am doing wrong as  I have  
tried
 to use v1.53, v1.6 RC1 and standard\branches\release-1.6. of the  
framework and I can t get any to work and no errors show up in the  
apache or php log.


with regards
Bram

i am  currently utilizing the following project layout on OS X 10.5.4  
using xampp 0.7.2 with /path/to/php, /path/to/pear, /path/to/Library  
and /path/to/application as included folders


htdocs
|-> index.php


require_once('Zend/Loader.php');

Zend_Loader::registerAutoload();

$front = Zend_Controller_Front::getInstance();
$front->registerPlugin(new core_Initialize());
$front->dispatch();


Library
|->Zend
application
|->modules
|->default
|->controllers
|->IndexController.php
|->models
|->views
|>scripts
|->index
|->index.phtml
|->core
|->config
|->tmp
|->logs
|->Acl
|->Plugin
|->Helper
|>View
|-> MyNewViewHelper.php
|->Theme
|->layout.phtml
|->initialize.php


class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
$this->view->headTitle('Dashboard');
}
}



hello world



   headTitle() ?>
   MyNewViewHelper() ?>
   layout()->content ?>


 (which is a copy of Zend_View_Helper_Url)

class core_Helper_View_MyNewViewHelper {

public function url(array $urlOptions = array(), $name = null,  
$reset = false, $encode = true)

{
$router = Zend_Controller_Front::getInstance()->getRouter();
return $router->assemble($urlOptions, $name, $reset, $encode);
}

}




$this->_root = realpath(dirname(__FILE__) . '/../../');

public function routeStartup()
{
$this->initHelpers();
$this->initView();
$this->initControllers();

$this->_front->throwExceptions(false);
}

public function initHelpers()
{
 
Zend_Controller_Action_HelperBroker::addPrefix('core_Helper_View');

}

public function initView()
{
// Setup View
$view = new Zend_View();

// Set view in ViewRenderer
$viewRenderer =  
Zend_Controller_Action_HelperBroker::getStaticHelper('ViewRenderer');

$viewRenderer->setView($view);

Zend_Layout::startMvc($this->_root . '/application/core/ 
Theme');

$request = Zend_Controller_Front::getInstance()->getRequest();
}

public function initControllers()
{
$this->_front->addModuleDirectory($this->_root . '/ 
application/modules/');

}