Re: [fw-general] Zend Framework 1.7 is now available!

2008-11-18 Thread mikaelkael

Hi,

I proposed on my site CHM and PDF versions of the documentation: 
http://www.mikaelkael.fr/zf-chm-pdf

They are available in English, French, German and only in CHM for Japanese.
CHM has syntax highlighting. PDF doesn't have table of contents.

Mickael.

Wil Sinclair a écrit :


Should be sometime later this week. We’re looking in to another option 
that would preserve the link in the PDF doc. I’ll announce it’s 
availability here and on fw-announce.


 


,Wil

 


*From:* Garri Santos [mailto:[EMAIL PROTECTED]
*Sent:* Tuesday, November 18, 2008 12:24 AM
*To:* fw-general@lists.zend.com
*Subject:* Re: [fw-general] Zend Framework 1.7 is now available!

 

When will the PDF Programmer Reference Guide for 1.7 available for 
download?


On Mon, Nov 17, 2008 at 10:38 PM, Wil Sinclair <[EMAIL PROTECTED] 
> wrote:


Zend Framework 1.7.0 is now available from the Zend Framework download
site: http://framework.zend.com/download/latest

This release introduces many new components and features, including:

* Zend_Amf with support for AMF0 and AMF3 protocols
* Dojo Toolkit 1.2.1
* Support for dijit editor available in the Dojo Toolkit
* Zend_Service_Twitter
* ZendX_JQuery in extras library
* Metadata API in Zend_Cache
* Google book search API in Zend_Gdata
* Preliminary support for GData Protocol v2 in Zend_Gdata
* Support for skip data processing in Zend_Search_Lucene
* Support for Open Office XML documents in Zend_Search_Lucene indexer
* Performance enhancements in Zend_Loader, Zend_Controller, and server
 components
* Zend_Mail_Storage_Writable_Maildir enhancements for mail delivery
* Zend_Tool in incubator
* Zend_Text_Table for formatting table using characters
* Zend_ProgressBar
* Zend_Config_Writer
* ZendX_Console_Unix_Process in the extras library
* Zend_Db_Table_Select support for Zend_Paginator
* Global parameters for routes
* Using Chain-Routes for Hostname-Routes via Zend_Config
* I18N improvements
   - Application wide locale for all classes
   - Data retrieving methods are now static
   - Additional cache handling methods in all I18N classes
   - Zend_Translate API simplified
* File transfer enhancements
   - Support for file elements in subforms
   - Support for multifile elements
   - Support for MAX_FILES_SIZE in form
   - Support for breaking validation chain
   - Support for translation of failure ,messages
   - New IsCompressed, IsImage, ExcludeMimeType, ExcludeExtension
validators
   - Support for FileInfo extension in MimeType validator
* Zend_Db_Table_Select adapater for Zend_Paginator
* Support for custom adapters in Zend_Paginator
* More flexible handling of complex types in Zend_Soap

In addition, almost three hundred bugs have been fixed:

http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=10
903

The Zend Framework team would like to thank everyone who made this
release possible. As always, our generous ZF community has provided
countless new features, bug fixes, documentation translations, etc. We'd
also like to thank Adobe Systems and Wade Arnold for contributing the
new Zend_Amf component. A big thanks to PHP Belgium and everyone who
participated in bug hunt day (http://www.bughuntday.org/) and/or the
Zend Framework bug hunt week. Finally, we'd like to thank all of those
whom we've forgotten to thank above. :) Once again, we're reminded that
Zend Framework is about much more than code, it is about community. See
y'all online.

,Wil




--
__
Garrizaldy R. Santos
Ubraa Developer
PHP User-Group Philippines Inc.
http://www.phpugph.com
[EMAIL PROTECTED] 






Re: [fw-general] [Zend_Paginator] Bug when using complex Zend_Db_Select

2008-11-18 Thread Iulian M


Yes, but it should be noted that it will not accept ANY Zend_Db_Select
object. The object passed to the setRowCount() must contain the
ROW_COUNT_COLUMN = 'zend_paginator_row_count', or else it will throw an
exception. 

In my opinion count function, that actually performs the count operation,
should wrap the Zend_Db_Select object that is passed to the
Zend_Paginator_Adapter_DbSelect with a select statement like :

 "SELECT count(*) as count from ( ...pased select) as select; "





Matthew Ratzloff wrote:
> 
> I just want to be clear that setRowCount() accepts either an integer or
> Zend_Db_Select object for the TOTAL row count.
> -Matt
> 
> On Tue, Nov 18, 2008 at 12:06 PM, Iulian M <[EMAIL PROTECTED]>
> wrote:
> 
>>
>>
>>
>> Thank you for your answer.
>>
>> I will consider the situation in which i will pass the calculated
>> rowCount.
>>
>>
>> Iulian
>>
>>
>> Matthew Ratzloff wrote:
>> >
>> > The easiest way to solve this is to pass in your own Zend_Db_Select
>> COUNT
>> > query to Zend_Paginator_Adapter_DbSelect::setRowCount().
>> >
>> http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Paginator/Adapter/DbSelect.php
>> >
>> > Hope that helps,
>> >
>> > -Matt
>> >
>> > On Tue, Nov 18, 2008 at 7:32 AM, Iulian M <[EMAIL PROTECTED]>
>> wrote:
>> >
>> >>
>> >> I am creating a Zend_Db_Select statement for this SQL :
>> >> SELECT  table1.a AS a
>> >> table1.b AS b
>> >> COUNT(table2.a) -1 as c
>> >> FROM table1
>> >> INNER JOIN table2 ON table1.a = table2.a
>> >> HAVING c = 1
>> >>
>> >> The select is tested and it worked as expected.
>> >>
>> >> The Zend_Db_Select will be used to paginate the result using
>> >> Zend_Paginator_Adapter_DbSelect.
>> >>
>> >>
>> >> Problem:
>> >> When Zend_Paginator_Adapter_DbSelect::count() method is executed, to
>> >> determine the total number of rows that the select will return, an
>> error
>> >> will be thrown:
>> >>
>> >> [message:protected] => SQLSTATE[42S22]: Column not found: 1054 Unknown
>> >> column 'c' in 'having clause'
>> >>
>> >> This is caused by Zend_Db_Select::setRowCount() that creates an
>> special
>> >> select based on the select defined in Zend_Paginator_Adapter_DbSelect.
>> >> setRowCount() alters the columns that will be used to run the select
>> and
>> >> when the fetch is issued the above error will be thrown.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20561842.html
>> >> Sent from the Zend Framework mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20567204.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20574556.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] setting style class of an element in navigation

2008-11-18 Thread Matthew Lurz

If I understand you correctly, here's how I've handled this:

http://www.paste2.org/p/103819

You can see that the view helper looks at the controller to determine which
item should be active. I'm using a YAML config file to store the menu
definition along with some additional meta data but if course this wouldn't
have to be the case.


Ace Paul wrote:
> 
> Is there a way that I can set a tab to have a class such as active from
> the controller?
> 
> So that the active tab would show as a different style?
> I know that this can be done with javascript, but I would like to know if
> it can be done within Zend framework for ease of use.
> 
> thanks for any help
> 

-- 
View this message in context: 
http://www.nabble.com/setting-style-class-of-an-element-in-navigation-tp20541245p20573407.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Seeking input on naming convention

2008-11-18 Thread Matthew Weier O'Phinney
-- Alex Howansky <[EMAIL PROTECTED]> wrote
(on Tuesday, 18 November 2008, 06:06 PM -0500):
>
> Let's say that I'm developing some extensions to ZF and I'm adopting the  
> documented coding standards. I'll use a namespace of NS, so my classes  
> will all be named NS_*. I'll be creating a class that implements an  
> existing and well-defined specification. Let's say I name this class  
> ABC_Spec. There are multiple versions of this specification in use,  
> let's call them revision 1.0, revision 2.0, and revision 2.5. I want to  
> be able to use the same interface regardless of which revision I need,  
> so I'll create one subclass of ABC_Spec for each revision. The question  
> is, if these already-established revision identifiers are numerical in  
> nature, but the ZF standards frown upon numerical names, what's the best  
> naming scheme for my subclasses?
>
> This seems just wrong:
> class NS_Spec_10 extends NS_Spec { }
> class NS_Spec_20 extends NS_Spec { }
> class NS_Spec_25 extends NS_Spec { }
>
> This seems rather vague:
> class NS_Spec_R10 extends NS_Spec { }
> class NS_Spec_R20 extends NS_Spec { }
> class NS_Spec_R25 extends NS_Spec { }
>
> This seems best:
> class NS_Spec_Revision10 extends NS_Spec { }
> class NS_Spec_Revision20 extends NS_Spec { }
> class NS_Spec_Revision25 extends NS_Spec { }

I'd go with this one (above); it could be shorted to NS_Spec_Rev10,
which is shorter, but not so short as R10.

> This seems a bit much:
> class NS_Spec_OnePointZero extends NS_Spec { }
> class NS_Spec_TwoPointZero extends NS_Spec { }
> class NS_Spec_TwoPointFive extends NS_Spec { }

I agree with you here. :)

> I don't see any examples in the current ZF code to compare against. How  
> would you do it?

Zend_Amf actually uses this -- Amf0 and Amf3 are specification types
used within class names.

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


Re: [fw-general] setting style class of an element in navigation

2008-11-18 Thread Daniel Latter
(I orginally sent this from an incorrect email so appologies if you
get it twice.)

Hi, sorry i forgot to mention you need the following statement in you
main template file, the one which you output doctypes etc, put this in
index.phtml:

headStyle() ?>

2008/11/18 Ace Paul <[EMAIL PROTECTED]>
>
> Thank you very much for the reply Dan. For some reason using that method I am
> unable to get the style to print to the browser.
>
> I have used a quick fix like this, but if possible would like to do it the
> way that you have said, so that I am doing everything the correct Zend way.
> This is what I have now in the index.phtml layout page, which also calls the
> header.phtml page.
> 
> 
> 
>
> I tried this
>
> headStyle()->captureStart() ?>
> view->navActive ?> {
> background: url(/images/menu-tab-bg.jpg) bottom left repeat-x;
>color: #5b5e56;
>display: block;
>padding: 0px 8px;
> }
> headStyle()->captureEnd() ?>
>
> but nothing was output at all. Is there something there that I missed.
> Thanks for all help. It is greatly appreciated.
> --
> View this message in context: 
> http://www.nabble.com/setting-style-class-of-an-element-in-navigation-tp20541245p20570914.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>



--
Thank You
Daniel Latter


Re: [fw-general] setting style class of an element in navigation

2008-11-18 Thread Daniel Latter
Hi, sorry i forgot to mention you need the following statement in you main
template file, the one which you output doctypes etc, put this in
index.phtml:

headStyle() ?>

2008/11/18 Ace Paul <[EMAIL PROTECTED]>

>
> Thank you very much for the reply Dan. For some reason using that method I
> am
> unable to get the style to print to the browser.
>
> I have used a quick fix like this, but if possible would like to do it the
> way that you have said, so that I am doing everything the correct Zend way.
> This is what I have now in the index.phtml layout page, which also calls
> the
> header.phtml page.
> 
> 
> 
>
> I tried this
>
> headStyle()->captureStart() ?>
> view->navActive ?> {
> background: url(/images/menu-tab-bg.jpg) bottom left repeat-x;
>color: #5b5e56;
>display: block;
>padding: 0px 8px;
> }
> headStyle()->captureEnd() ?>
>
> but nothing was output at all. Is there something there that I missed.
> Thanks for all help. It is greatly appreciated.
> --
> View this message in context:
> http://www.nabble.com/setting-style-class-of-an-element-in-navigation-tp20541245p20570914.html
>  Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Thank You
Daniel Latter


Re: [fw-general] Seeking input on naming convention

2008-11-18 Thread Alex Howansky

Let's say I name this class ABC_Spec.


Whoops, typo -- meant to say NS_Spec.

--
Alex Howansky
Director of IT
Birdview Technologies


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [fw-general] setting style class of an element in navigation

2008-11-18 Thread Ace Paul

Thank you very much for the reply Dan. For some reason using that method I am
unable to get the style to print to the browser.

I have used a quick fix like this, but if possible would like to do it the
way that you have said, so that I am doing everything the correct Zend way.
This is what I have now in the index.phtml layout page, which also calls the
header.phtml page.




I tried this

headStyle()->captureStart() ?>
view->navActive ?> {
 background: url(/images/menu-tab-bg.jpg) bottom left repeat-x;
color: #5b5e56; 
display: block;
padding: 0px 8px;
}
headStyle()->captureEnd() ?>

but nothing was output at all. Is there something there that I missed.
Thanks for all help. It is greatly appreciated.
-- 
View this message in context: 
http://www.nabble.com/setting-style-class-of-an-element-in-navigation-tp20541245p20570914.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Seeking input on naming convention

2008-11-18 Thread Alex Howansky


Let's say that I'm developing some extensions to ZF and I'm adopting the 
documented coding standards. I'll use a namespace of NS, so my classes 
will all be named NS_*. I'll be creating a class that implements an 
existing and well-defined specification. Let's say I name this class 
ABC_Spec. There are multiple versions of this specification in use, 
let's call them revision 1.0, revision 2.0, and revision 2.5. I want to 
be able to use the same interface regardless of which revision I need, 
so I'll create one subclass of ABC_Spec for each revision. The question 
is, if these already-established revision identifiers are numerical in 
nature, but the ZF standards frown upon numerical names, what's the best 
naming scheme for my subclasses?


This seems just wrong:
class NS_Spec_10 extends NS_Spec { }
class NS_Spec_20 extends NS_Spec { }
class NS_Spec_25 extends NS_Spec { }

This seems rather vague:
class NS_Spec_R10 extends NS_Spec { }
class NS_Spec_R20 extends NS_Spec { }
class NS_Spec_R25 extends NS_Spec { }

This seems best:
class NS_Spec_Revision10 extends NS_Spec { }
class NS_Spec_Revision20 extends NS_Spec { }
class NS_Spec_Revision25 extends NS_Spec { }

This seems a bit much:
class NS_Spec_OnePointZero extends NS_Spec { }
class NS_Spec_TwoPointZero extends NS_Spec { }
class NS_Spec_TwoPointFive extends NS_Spec { }

I don't see any examples in the current ZF code to compare against. How 
would you do it?


Thanks,

--
Alex Howansky
Director of IT
Birdview Technologies


smime.p7s
Description: S/MIME Cryptographic Signature


Re: [fw-general] Question about zend pagination

2008-11-18 Thread Matthew Ratzloff
>From the documentation:
The following is an example route you might use in an INI configuration
file:

routes.example.route = articles/:articleName/:page
routes.example.defaults.controller = articles
routes.example.defaults.action = view
routes.example.defaults.page = 1
routes.example.reqs.articleName = \w+
routes.example.reqs.page = \d+

With the above route (and using Zend Framework MVC components), you might
set the current page number like this:

$paginator->setCurrentPageNumber($this->_getParam('page'));

http://framework.zend.com/manual/en/zend.paginator.usage.html

-Matt

On Tue, Nov 18, 2008 at 1:50 PM, vladimirn <[EMAIL PROTECTED]> wrote:

>
> I have this in my route:
> $route = new Zend_Controller_Router_Route(
>'display/:pid/:wid/:type',
>array(
>'controller' => 'banners',
>'action' => 'display'
>)
> );
>
> $router->addRoute('display', $route);
>
> Matthew Ratzloff wrote:
> >
> > Do you define a "page" parameter in your route?
> > -Matt
> >
> > On Tue, Nov 18, 2008 at 10:14 AM, vladimirn <[EMAIL PROTECTED]>
> wrote:
> >
> >>
> >> Thank you Daniel,
> >> This is my view script:
> >> paginator)): ?>
> >>
> >> paginator as $banner): ?>
> >>  
> >>  " >> $banner['bannerurl']
> >> ? ">
> >> 
> >> 
> >>
> >>
> >> 
> >> On the page i am getting expected amount of results.
> >>
> >> Then in my controller:
> >> $db = Zend_Registry::get ( 'db' );
> >>$select = $db->select ()
> >>->from ( 'banners', array ('bannerurl',
> >> 'height', 'width', 'bannersize'
> >> ) )
> >>->where ( 'active = ?', 'y' )
> >>->where ('programid = ?', $programid)
> >>->where('websiteid = ?', $websiteid)
> >>->where('bannertype = ?', $bannertype)
> >>
> >>->order ( 'height', 'ASC' );
> >>$paginator = Zend_Paginator::factory($select);
> >>
> >> // Set parameters for paginator
> >>$paginator->setCurrentPageNumber($this->_getParam("page"));
> >>$paginator->setItemCountPerPage(3);
> >>$paginator->setPageRange(5);
> >>$this->view->paginator = $paginator;
> >>
> >> And i am getting this on the page:
> >>  < Previous |  1 | 2 |  Next >
> >> ( there are 3 pictures, as expected)
> >>
> >> And finnaly there is a links produced:
> >> 
> >> 
> >>
> >>  < Previous |
> >>
> >>
> >> 
> >>
> >>  1 |
> >>
> >>   /display/2/CL/3 2  |
> >>
> >> 
> >>
> >>   /display/2/CL/3 Next >
> >>
> >> 
> >>
> >> Above code for links i am getting via paginator.phtml
> >> It looks like:
> >> pageCount): ?>
> >> 
> >> 
> >> previous)): ?>
> >>   " $this->previous)); ?>">< Previous
>  |
> >> 
> >>  < Previous |
> >> 
> >>
> >> 
> >> pagesInRange as $page): ?>
> >>  current): ?>
> >> " $page)); ?>">  |
> >>  
> >> |
> >>  
> >> 
> >>
> >> 
> >> next)): ?>
> >>   " $this->next)); ?>">Next >
> >> 
> >>  Next >
> >> 
> >> 
> >> 
> >>
> >>
> >> So, finnal thouth :)
> >> I am getting number of results as expectede, and i am getting pagination
> >> div, as expected, but when i click on Next, or on 2(which is a link) i
> am
> >> not navigated to the next page, same page just reload, and shows same
> >> pictures. Also, links( 1,2,Next,Previous) dont change as visited or
> >> something if you know what i mean.
> >>
> >> Thanks a lot,
> >> V
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/Question-about-zend-pagination-tp20543032p20565246.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Question-about-zend-pagination-tp20543032p20569014.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] Question about zend pagination

2008-11-18 Thread vladimirn

I have this in my route:
$route = new Zend_Controller_Router_Route(
'display/:pid/:wid/:type',
array(
'controller' => 'banners',
'action' => 'display'
)
);

$router->addRoute('display', $route);

Matthew Ratzloff wrote:
> 
> Do you define a "page" parameter in your route?
> -Matt
> 
> On Tue, Nov 18, 2008 at 10:14 AM, vladimirn <[EMAIL PROTECTED]> wrote:
> 
>>
>> Thank you Daniel,
>> This is my view script:
>> paginator)): ?>
>>
>> paginator as $banner): ?>
>>  
>>  "> $banner['bannerurl']
>> ? ">
>> 
>> 
>>
>>
>> 
>> On the page i am getting expected amount of results.
>>
>> Then in my controller:
>> $db = Zend_Registry::get ( 'db' );
>>$select = $db->select ()
>>->from ( 'banners', array ('bannerurl',
>> 'height', 'width', 'bannersize'
>> ) )
>>->where ( 'active = ?', 'y' )
>>->where ('programid = ?', $programid)
>>->where('websiteid = ?', $websiteid)
>>->where('bannertype = ?', $bannertype)
>>
>>->order ( 'height', 'ASC' );
>>$paginator = Zend_Paginator::factory($select);
>>
>> // Set parameters for paginator
>>$paginator->setCurrentPageNumber($this->_getParam("page"));
>>$paginator->setItemCountPerPage(3);
>>$paginator->setPageRange(5);
>>$this->view->paginator = $paginator;
>>
>> And i am getting this on the page:
>>  < Previous |  1 | 2 |  Next >
>> ( there are 3 pictures, as expected)
>>
>> And finnaly there is a links produced:
>> 
>> 
>>
>>  < Previous |
>>
>>
>> 
>>
>>  1 |
>>
>>   /display/2/CL/3 2  |
>>
>> 
>>
>>   /display/2/CL/3 Next >
>>
>> 
>>
>> Above code for links i am getting via paginator.phtml
>> It looks like:
>> pageCount): ?>
>> 
>> 
>> previous)): ?>
>>   " $this->previous)); ?>">< Previous  |
>> 
>>  < Previous |
>> 
>>
>> 
>> pagesInRange as $page): ?>
>>  current): ?>
>> " $page)); ?>">  |
>>  
>> |
>>  
>> 
>>
>> 
>> next)): ?>
>>   " $this->next)); ?>">Next >
>> 
>>  Next >
>> 
>> 
>> 
>>
>>
>> So, finnal thouth :)
>> I am getting number of results as expectede, and i am getting pagination
>> div, as expected, but when i click on Next, or on 2(which is a link) i am
>> not navigated to the next page, same page just reload, and shows same
>> pictures. Also, links( 1,2,Next,Previous) dont change as visited or
>> something if you know what i mean.
>>
>> Thanks a lot,
>> V
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Question-about-zend-pagination-tp20543032p20565246.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Question-about-zend-pagination-tp20543032p20569014.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] [Zend_Paginator] Bug when using complex Zend_Db_Select

2008-11-18 Thread Matthew Ratzloff
I just want to be clear that setRowCount() accepts either an integer or
Zend_Db_Select object for the TOTAL row count.
-Matt

On Tue, Nov 18, 2008 at 12:06 PM, Iulian M <[EMAIL PROTECTED]> wrote:

>
>
>
> Thank you for your answer.
>
> I will consider the situation in which i will pass the calculated rowCount.
>
>
> Iulian
>
>
> Matthew Ratzloff wrote:
> >
> > The easiest way to solve this is to pass in your own Zend_Db_Select COUNT
> > query to Zend_Paginator_Adapter_DbSelect::setRowCount().
> >
> http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Paginator/Adapter/DbSelect.php
> >
> > Hope that helps,
> >
> > -Matt
> >
> > On Tue, Nov 18, 2008 at 7:32 AM, Iulian M <[EMAIL PROTECTED]>
> wrote:
> >
> >>
> >> I am creating a Zend_Db_Select statement for this SQL :
> >> SELECT  table1.a AS a
> >> table1.b AS b
> >> COUNT(table2.a) -1 as c
> >> FROM table1
> >> INNER JOIN table2 ON table1.a = table2.a
> >> HAVING c = 1
> >>
> >> The select is tested and it worked as expected.
> >>
> >> The Zend_Db_Select will be used to paginate the result using
> >> Zend_Paginator_Adapter_DbSelect.
> >>
> >>
> >> Problem:
> >> When Zend_Paginator_Adapter_DbSelect::count() method is executed, to
> >> determine the total number of rows that the select will return, an error
> >> will be thrown:
> >>
> >> [message:protected] => SQLSTATE[42S22]: Column not found: 1054 Unknown
> >> column 'c' in 'having clause'
> >>
> >> This is caused by Zend_Db_Select::setRowCount() that creates an special
> >> select based on the select defined in Zend_Paginator_Adapter_DbSelect.
> >> setRowCount() alters the columns that will be used to run the select and
> >> when the fetch is issued the above error will be thrown.
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20561842.html
> >> Sent from the Zend Framework mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20567204.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] [Zend_Paginator] Bug when using complex Zend_Db_Select

2008-11-18 Thread Iulian M



Thank you for your answer. 

I will consider the situation in which i will pass the calculated rowCount.


Iulian


Matthew Ratzloff wrote:
> 
> The easiest way to solve this is to pass in your own Zend_Db_Select COUNT
> query to Zend_Paginator_Adapter_DbSelect::setRowCount().
> http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Paginator/Adapter/DbSelect.php
> 
> Hope that helps,
> 
> -Matt
> 
> On Tue, Nov 18, 2008 at 7:32 AM, Iulian M <[EMAIL PROTECTED]> wrote:
> 
>>
>> I am creating a Zend_Db_Select statement for this SQL :
>> SELECT  table1.a AS a
>> table1.b AS b
>> COUNT(table2.a) -1 as c
>> FROM table1
>> INNER JOIN table2 ON table1.a = table2.a
>> HAVING c = 1
>>
>> The select is tested and it worked as expected.
>>
>> The Zend_Db_Select will be used to paginate the result using
>> Zend_Paginator_Adapter_DbSelect.
>>
>>
>> Problem:
>> When Zend_Paginator_Adapter_DbSelect::count() method is executed, to
>> determine the total number of rows that the select will return, an error
>> will be thrown:
>>
>> [message:protected] => SQLSTATE[42S22]: Column not found: 1054 Unknown
>> column 'c' in 'having clause'
>>
>> This is caused by Zend_Db_Select::setRowCount() that creates an special
>> select based on the select defined in Zend_Paginator_Adapter_DbSelect.
>> setRowCount() alters the columns that will be used to run the select and
>> when the fetch is issued the above error will be thrown.
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20561842.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20567204.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Question about zend pagination

2008-11-18 Thread Daniel Tangermann

In your link to the next or whatever resultpage site:

Are you sure that param page is there?

Try something like
Zend_Debug::dump($this->_request->getParams())

You should see page = something

In my paginator template I link to
/baseUrl/module/controller/page/2

/baseUrl/module/controller/2 would not work.

Another way to debug or to find the failure is to set:

$paginator->setCurrentPageNumber(2); 


Do you see the expected results from page 2?
If so, than you definitly do not pass param page with value 2.


vladimirn schrieb:

Thank you Daniel,
This is my view script:
paginator)): ?>

paginator as $banner): ?>
 
 "





On the page i am getting expected amount of results.

Then in my controller:
$db = Zend_Registry::get ( 'db' );
$select = $db->select ()
->from ( 'banners', array ('bannerurl', 
'height', 'width', 'bannersize'
) )
->where ( 'active = ?', 'y' )
->where ('programid = ?', $programid)
->where('websiteid = ?', $websiteid)
->where('bannertype = ?', $bannertype)

->order ( 'height', 'ASC' );
$paginator = Zend_Paginator::factory($select);

// Set parameters for paginator
$paginator->setCurrentPageNumber($this->_getParam("page")); 
$paginator->setItemCountPerPage(3);

$paginator->setPageRange(5);
$this->view->paginator = $paginator;

And i am getting this on the page:
 < Previous |  1 | 2 |  Next > 
( there are 3 pictures, as expected)


And finnaly there is a links produced:

 
 
  < Previous | 
 



 
  1 | 
   
   /display/2/CL/3 2  | 
  
 
 
   /display/2/CL/3 Next > 
 



Above code for links i am getting via paginator.phtml 
It looks like:
pageCount): ?> 

 
previous)): ?> 
   " $this->previous)); ?>">< Previous  | 
 
  < Previous | 
 



pagesInRange as $page): ?> 
  current): ?>
 " $page)); ?>">  | 
  
 | 
  



 
next)): ?> 
   " $this->next)); ?>">Next > 
 
  Next >
 
 
 



So, finnal thouth :)
I am getting number of results as expectede, and i am getting pagination
div, as expected, but when i click on Next, or on 2(which is a link) i am
not navigated to the next page, same page just reload, and shows same
pictures. Also, links( 1,2,Next,Previous) dont change as visited or
something if you know what i mean.

Thanks a lot,
V


  




Re: [fw-general] Question about zend pagination

2008-11-18 Thread Matthew Ratzloff
Do you define a "page" parameter in your route?
-Matt

On Tue, Nov 18, 2008 at 10:14 AM, vladimirn <[EMAIL PROTECTED]> wrote:

>
> Thank you Daniel,
> This is my view script:
> paginator)): ?>
>
> paginator as $banner): ?>
>  
>  " $banner['bannerurl']
> ? ">
> 
> 
>
>
> 
> On the page i am getting expected amount of results.
>
> Then in my controller:
> $db = Zend_Registry::get ( 'db' );
>$select = $db->select ()
>->from ( 'banners', array ('bannerurl',
> 'height', 'width', 'bannersize'
> ) )
>->where ( 'active = ?', 'y' )
>->where ('programid = ?', $programid)
>->where('websiteid = ?', $websiteid)
>->where('bannertype = ?', $bannertype)
>
>->order ( 'height', 'ASC' );
>$paginator = Zend_Paginator::factory($select);
>
> // Set parameters for paginator
>$paginator->setCurrentPageNumber($this->_getParam("page"));
>$paginator->setItemCountPerPage(3);
>$paginator->setPageRange(5);
>$this->view->paginator = $paginator;
>
> And i am getting this on the page:
>  < Previous |  1 | 2 |  Next >
> ( there are 3 pictures, as expected)
>
> And finnaly there is a links produced:
> 
> 
>
>  < Previous |
>
>
> 
>
>  1 |
>
>   /display/2/CL/3 2  |
>
> 
>
>   /display/2/CL/3 Next >
>
> 
>
> Above code for links i am getting via paginator.phtml
> It looks like:
> pageCount): ?>
> 
> 
> previous)): ?>
>   " $this->previous)); ?>">< Previous  |
> 
>  < Previous |
> 
>
> 
> pagesInRange as $page): ?>
>  current): ?>
> " $page)); ?>">  |
>  
> |
>  
> 
>
> 
> next)): ?>
>   " $this->next)); ?>">Next >
> 
>  Next >
> 
> 
> 
>
>
> So, finnal thouth :)
> I am getting number of results as expectede, and i am getting pagination
> div, as expected, but when i click on Next, or on 2(which is a link) i am
> not navigated to the next page, same page just reload, and shows same
> pictures. Also, links( 1,2,Next,Previous) dont change as visited or
> something if you know what i mean.
>
> Thanks a lot,
> V
>
>
> --
> View this message in context:
> http://www.nabble.com/Question-about-zend-pagination-tp20543032p20565246.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] [Zend_Paginator] Bug when using complex Zend_Db_Select

2008-11-18 Thread Matthew Ratzloff
The easiest way to solve this is to pass in your own Zend_Db_Select COUNT
query to Zend_Paginator_Adapter_DbSelect::setRowCount().
http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Paginator/Adapter/DbSelect.php

Hope that helps,

-Matt

On Tue, Nov 18, 2008 at 7:32 AM, Iulian M <[EMAIL PROTECTED]> wrote:

>
> I am creating a Zend_Db_Select statement for this SQL :
> SELECT  table1.a AS a
> table1.b AS b
> COUNT(table2.a) -1 as c
> FROM table1
> INNER JOIN table2 ON table1.a = table2.a
> HAVING c = 1
>
> The select is tested and it worked as expected.
>
> The Zend_Db_Select will be used to paginate the result using
> Zend_Paginator_Adapter_DbSelect.
>
>
> Problem:
> When Zend_Paginator_Adapter_DbSelect::count() method is executed, to
> determine the total number of rows that the select will return, an error
> will be thrown:
>
> [message:protected] => SQLSTATE[42S22]: Column not found: 1054 Unknown
> column 'c' in 'having clause'
>
> This is caused by Zend_Db_Select::setRowCount() that creates an special
> select based on the select defined in Zend_Paginator_Adapter_DbSelect.
> setRowCount() alters the columns that will be used to run the select and
> when the fetch is issued the above error will be thrown.
>
>
>
>
>
>
> --
> View this message in context:
> http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20561842.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


Re: [fw-general] Question about zend pagination

2008-11-18 Thread vladimirn

Thank you Daniel,
This is my view script:
paginator)): ?>

paginator as $banner): ?>
 
 "





On the page i am getting expected amount of results.

Then in my controller:
$db = Zend_Registry::get ( 'db' );
$select = $db->select ()
->from ( 'banners', array ('bannerurl', 
'height', 'width', 'bannersize'
) )
->where ( 'active = ?', 'y' )
->where ('programid = ?', $programid)
->where('websiteid = ?', $websiteid)
->where('bannertype = ?', $bannertype)

->order ( 'height', 'ASC' );
$paginator = Zend_Paginator::factory($select);

// Set parameters for paginator
$paginator->setCurrentPageNumber($this->_getParam("page")); 
$paginator->setItemCountPerPage(3);
$paginator->setPageRange(5);
$this->view->paginator = $paginator;

And i am getting this on the page:
 < Previous |  1 | 2 |  Next > 
( there are 3 pictures, as expected)

And finnaly there is a links produced:

 
 
  < Previous | 
 


 
  1 | 
   
   /display/2/CL/3 2  | 
  
 
 
   /display/2/CL/3 Next > 
 


Above code for links i am getting via paginator.phtml 
It looks like:
pageCount): ?> 

 
previous)): ?> 
   " $this->previous)); ?>">< Previous  | 
 
  < Previous | 
 


pagesInRange as $page): ?> 
  current): ?>
 " $page)); ?>">  | 
  
 | 
  


 
next)): ?> 
   " $this->next)); ?>">Next > 
 
  Next >
 
 
 


So, finnal thouth :)
I am getting number of results as expectede, and i am getting pagination
div, as expected, but when i click on Next, or on 2(which is a link) i am
not navigated to the next page, same page just reload, and shows same
pictures. Also, links( 1,2,Next,Previous) dont change as visited or
something if you know what i mean.

Thanks a lot,
V


-- 
View this message in context: 
http://www.nabble.com/Question-about-zend-pagination-tp20543032p20565246.html
Sent from the Zend Framework mailing list archive at Nabble.com.



RE: [fw-general] Zend Framework 1.7 is now available!

2008-11-18 Thread Wil Sinclair
Should be sometime later this week. We’re looking in to another option that 
would preserve the link in the PDF doc. I’ll announce it’s availability here 
and on fw-announce.

 

,Wil

 

From: Garri Santos [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 18, 2008 12:24 AM
To: fw-general@lists.zend.com
Subject: Re: [fw-general] Zend Framework 1.7 is now available!

 

When will the PDF Programmer Reference Guide for 1.7 available for download?

On Mon, Nov 17, 2008 at 10:38 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

Zend Framework 1.7.0 is now available from the Zend Framework download
site: http://framework.zend.com/download/latest

This release introduces many new components and features, including:

* Zend_Amf with support for AMF0 and AMF3 protocols
* Dojo Toolkit 1.2.1
* Support for dijit editor available in the Dojo Toolkit
* Zend_Service_Twitter
* ZendX_JQuery in extras library
* Metadata API in Zend_Cache
* Google book search API in Zend_Gdata
* Preliminary support for GData Protocol v2 in Zend_Gdata
* Support for skip data processing in Zend_Search_Lucene
* Support for Open Office XML documents in Zend_Search_Lucene indexer
* Performance enhancements in Zend_Loader, Zend_Controller, and server
 components
* Zend_Mail_Storage_Writable_Maildir enhancements for mail delivery
* Zend_Tool in incubator
* Zend_Text_Table for formatting table using characters
* Zend_ProgressBar
* Zend_Config_Writer
* ZendX_Console_Unix_Process in the extras library
* Zend_Db_Table_Select support for Zend_Paginator
* Global parameters for routes
* Using Chain-Routes for Hostname-Routes via Zend_Config
* I18N improvements
   - Application wide locale for all classes
   - Data retrieving methods are now static
   - Additional cache handling methods in all I18N classes
   - Zend_Translate API simplified
* File transfer enhancements
   - Support for file elements in subforms
   - Support for multifile elements
   - Support for MAX_FILES_SIZE in form
   - Support for breaking validation chain
   - Support for translation of failure ,messages
   - New IsCompressed, IsImage, ExcludeMimeType, ExcludeExtension
validators
   - Support for FileInfo extension in MimeType validator
* Zend_Db_Table_Select adapater for Zend_Paginator
* Support for custom adapters in Zend_Paginator
* More flexible handling of complex types in Zend_Soap

In addition, almost three hundred bugs have been fixed:

http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=10
903

The Zend Framework team would like to thank everyone who made this
release possible. As always, our generous ZF community has provided
countless new features, bug fixes, documentation translations, etc. We'd
also like to thank Adobe Systems and Wade Arnold for contributing the
new Zend_Amf component. A big thanks to PHP Belgium and everyone who
participated in bug hunt day (http://www.bughuntday.org/) and/or the
Zend Framework bug hunt week. Finally, we'd like to thank all of those
whom we've forgotten to thank above. :) Once again, we're reminded that
Zend Framework is about much more than code, it is about community. See
y'all online.

,Wil




-- 
__
Garrizaldy R. Santos
Ubraa Developer
PHP User-Group Philippines Inc.
http://www.phpugph.com
[EMAIL PROTECTED]



Re: [fw-general] Zend_Form and html array syntax. is this possible?

2008-11-18 Thread water
thanks, subforms seem to be way to go.

Re the valid php variable names, I was thinking of extending Zend_Form to work 
around this specifically removing the preg_replace on line 823 and wrinting a 
processor for looking for the first array form as an integer and thus know that 
it is an update (if empty, know that it's an insert). But I'm a little nervous 
changing overriding filterName like this. Is there anything that could cause 
problems?

 817 public function filterName($value, $allowBrackets = false)
 818 {   
 819 $charset = '^a-zA-Z0-9_\x7f-\xff';
 820 if ($allowBrackets) {
 821 $charset .= '\[\]';
 822 }
 823 //return preg_replace('/[' . $charset . ']/', '', (string) $value);
 824 return (string) $value;
 825 } 

which would allow me to do something like this:
155 $form=new Zend_Form();
156 $form->setAction('/fadmin/app/filter/show/')->setMethod('post');
157 $form->addElement('text','group_name');
158 
$points=array(array('id'=>1,'first_name'=>'Amanda','last_name'=>'Salter'),
159 
array('id'=>2,'first_name'=>'Britney','last_name'=>'Goin'));
160 
161 foreach($points as $row){
162   $sub=new Zend_Form_SubForm();
163   $fn=new Zend_Form_Element_Text('first_name_new');
164   $fn->setBelongsTo(69);
165   $sub->addElements(array($fn));
166   //$options=array('elementPrefixPath'=>array(12,14,16));
167   //$sub->setOptions($options);
168   
169   if($sub instanceof Zend_Form){
170  echo "this is an instance of Zend_Form!";
171   }  
172   $forms['users['.$row['id'].']']=$sub;
173   //$form->addSubForm($sub,'bird');
174   
175 } 
176 $form->addSubForms($forms);
177 $form->addElement('submit','click on me!');
178 $this->view->form=$form;
179 }   

and render into:







From: Matthew Weier O'Phinney <[EMAIL PROTECTED]>
To: fw-general@lists.zend.com
Sent: Tuesday, November 11, 2008 10:33:13 AM
Subject: Re: [fw-general] Zend_Form and html array syntax. is this possible?

-- Joe Theplumber <[EMAIL PROTECTED]> wrote
(on Tuesday, 11 November 2008, 09:02 AM -0800):
> New to some of the Zend_Form pieces and trying to migrate some old code to ZF.
> I was curious whether there is a way to use Zend_Form with html array syntax
> and have Validation and Filtering work.

Use sub forms. Sub forms are for exactly this sort of semantic grouping,
and by default render using array notation. Sub forms may be nested
infinitely deep.

One note, however: form element names must be valid PHP variable names
-- so numeric keys simply will not work currently. 

> I would like to have a form like this:
> 
> 
> 
> 
> 
> 
> 
> Seems pretty standard but Zend_Form when created like this wants to flatten it
> out:
> $form=new Zend_Form();
> $form->setAction('/controller/action/')->setMethod('post');
> $main_header=$form->addElement('text','node[23][name]', array('label'=>'Menu
> Header'));
> $main_header=$form->getElement('node[23][name]')
> ->setRequired(true);
> $submit=$form->addElement('submit','submit');
> 
> will make node[23][name] into node23name? Is there any way to support this via
> Zend_Form (and ideally on the converse Model object)?
> 
> here's something close:
> http://davidcaylor.com/php/building-table-based-forms-in-zend_form
> 
> thanks,
> 
> jt
> 

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



  

Re: [fw-general] Question about zend pagination

2008-11-18 Thread Daniel Tangermann
I would love to, but you have to be a little more specific what is not 
working?


Do you get an expected result without $paginator?
Dou you see the expected amount of results on page 1?
How does your link look like for the next page?

The more information you provide, the better one can help you

vladimirn schrieb:

Can anyone help on this please? :)
  




Re: [fw-general] Dijit Editor

2008-11-18 Thread gwellman

Thanks Matthew. Would be really useful to have a look at your code.

Did you have a problem with the Zend_Dojo generated javascript displaying? 

Dojo produces this: http://www.paste2.org/p/103522 

Looking at your javascript, it produces code specific to the editor which
mine didn't.


Matthew Lurz wrote:
> 
> Very quickly, sorry but I'm getting ready to head out for the morning,
> yes. That is, I did not have to create the JavaScript (though I did have
> to modify the Editor helper just slightly) nor did I need to require the
> dijit.Editor module.
> 
> I would try removing the conditional to check whether isEnabled() may be
> the problem. I'll post my stuff later so that you have something to look
> at.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dijit-Editor-tp20141019p20563132.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_DOM and AJAX

2008-11-18 Thread Matthew Weier O'Phinney
-- edgelogix <[EMAIL PROTECTED]> wrote
(on Tuesday, 18 November 2008, 05:45 AM -0800):
> I've just designed the UI for the application, here I got a question about
> the forms. I want to use AJAX and DOM, so what is the recommendations about
> that , how and what is the is most appropriate way to accomplish both of the
> things. I guess Zend_Dom and also kindly let me know is the Dojo right
> choice to add here. Thanks

Zend_Dom is simply a way to query DOM structures using either CSS query
selectors or XPath. It was developed to aid testing, and is being used
by many for screen scraping. It has absolutely no relation to Ajax.

As for Ajax and dynamic user interfaces, the supported solution by Zend
Framework is Zend_Dojo; we ship Dojo with the full distribution, and
Zend_Dojo provides the means for integrating with it -- via view
helpers, Zend_Dojo_Form, Zend_Dojo_Data, and Zend_Json_Server.
Additionally, as of yesterday's 1.7.0 release, we now have ZendX_JQuery
in the extras package, which provides jquery integration (though we do
not ship jquery with ZF).

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


[fw-general] Problems with running controller unit tests - one of two tests fail although they execute very same code

2008-11-18 Thread jme

Hi.

I have the following code in one of my unit tests for testing controller
functionality:

bootstrap = array($this, 'appBootstrap');
parent::setUp();

$this->loginUser(); 
}

public function appBootstrap()
{
$config = Zend_Registry::get('config');

Zend_Layout::startMvc(array('layoutPath' =>
ROOT_DIR.'/application/views/layouts') );

$this->_controller = $this->getFrontController();
$this->_controller->registerPlugin(new
App_Controller_Plugin_Bootstrap($config) );
}

public function loginUser()
{
$user = 'foo';
$password = 'bar';

$request = $this->getRequest();
$request->setMethod('POST')
->setPost(array(
'username' => $user,
'password' => $password,
));
$this->dispatch('/en/login/login');
$this->resetResponse();
$request->setPost(array());
}   

public function testInitialValuesShouldBeResetInCreate()
{
$this->dispatch('/en/category/create');
}


public function testCategoryShouldHaveAnErrorMessagesss()
{
$this->dispatch('/en/category/create'); // FAILS
}

public function tearDown()
{
}
  
}
?>

As seen in the code, the two existing tests run the same dispatch. The first
test runs fine but when the second test is executed, I get
"Zend_View_Exception: script 'lang_tpl.phtml' not found in path ..."

This I don't understand. Two tests that perform the same action and yet the
second one fails. Am I missing something?
-- 
View this message in context: 
http://www.nabble.com/Problems-with-running-controller-unit-tests---one-of-two-tests-fail-although-they-execute-very-same-code-tp20562100p20562100.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] [Zend_Paginator] Bug when using complex Zend_Db_Select

2008-11-18 Thread Iulian M

I am creating a Zend_Db_Select statement for this SQL : 
SELECT  table1.a AS a 
 table1.b AS b
 COUNT(table2.a) -1 as c
FROM table1 
INNER JOIN table2 ON table1.a = table2.a 
HAVING c = 1

The select is tested and it worked as expected.

The Zend_Db_Select will be used to paginate the result using
Zend_Paginator_Adapter_DbSelect.


Problem:
When Zend_Paginator_Adapter_DbSelect::count() method is executed, to
determine the total number of rows that the select will return, an error
will be thrown:

[message:protected] => SQLSTATE[42S22]: Column not found: 1054 Unknown
column 'c' in 'having clause'

This is caused by Zend_Db_Select::setRowCount() that creates an special
select based on the select defined in Zend_Paginator_Adapter_DbSelect.
setRowCount() alters the columns that will be used to run the select and
when the fetch is issued the above error will be thrown.






-- 
View this message in context: 
http://www.nabble.com/-Zend_Paginator--Bug-when-using-complex-Zend_Db_Select-tp20561842p20561842.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] setting style class of an element in navigation

2008-11-18 Thread Daniel Latter
So it would be somthing like this:

header.phtml:

*headStyle()->captureStart() ?>
navactive ?> {
background-color:#fef;
}
headStyle()->captureEnd() ?>*



Dashboard 
   /admin/business/ Businesses 
Menu Item Two 
Menu Item Three 
Menu Item Four 
  
  


  
Business List 
Submenu Item 
Submenu Item 
Submenu Item 
Submenu Item 
Submenu Item 
  
  


// in controller and relevant acion:
// this is where you would set the active tabs
*$this->navActive = '#menuItem1,#subMenuItem1';*

This is just one way, and hopefully it will give you more ideas.
Thanks


2008/11/18 Ace Paul <[EMAIL PROTECTED]>

>
> Thanks for the responses.
> Still a bit stuck. I haven't used the capture helpers, so its very new to
> me. Still working on my first ZF app. It seems to be a quick learning
> curve,but there is so much to learn.
>
> I have this section in the header.phtml file, in the layouts directory. The
> current and sub-current classes tell which page we are on. So that the
> navigation is highlighted in the header area.
>
> 
>
>  Dashboard 
> /admin/business/ Businesses 
>  Menu Item Two 
>  Menu Item Three 
>  Menu Item Four 
>
>
>
>
>
>
>  Business List 
>  Submenu Item 
>  Submenu Item 
>  Submenu Item 
>  Submenu Item 
>  Submenu Item 
>
>
>
> --
> View this message in context:
> http://www.nabble.com/setting-style-class-of-an-element-in-navigation-tp20541245p20552588.html
>  Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Thank You
Daniel Latter


Re: [fw-general] Dijit Editor

2008-11-18 Thread Matthew Lurz

Very quickly, sorry but I'm getting ready to head out for the morning, yes.
That is, I did not have to create the JavaScript (though I did have to
modify the Editor helper just slightly) nor did I need to require the
dijit.Editor module.

I would try removing the conditional to check whether isEnabled() may be the
problem. I'll post my stuff later so that you have something to look at.


gwellman wrote:
> 
> I'm having trouble getting this working as expected.
> 
> Did the dojo view helper put all the javascript into the viewscript for
> you? or did you have to put in the javascript yourself? 
> 
> I'm currently using this:
> http://www.paste2.org/p/103439
> 
> It's generating the right html for the form but no javascript to go with
> it.
> 
> Any help on this would be greatly appreciated.
> 
> 
> Matthew Lurz wrote:
>> 
>> I've been unable to get this working and so thought I would post some
>> code to see if anyone might see something out of place.
>> 
>> Here's the form class:
>> 
>> http://www.paste2.org/p/97000
>> 
>> I found this post,
>> http://www.nabble.com/two-column-site-to19665005.html#a19670193, but
>> changing the location where the element is created didn't have any impact
>> for me.
>> 
>> Here's an action method. The other form elements are saved, but not
>> 'content'. I've checked the values of $_POST as well and seems the
>> element is never populated though the JavaScript (see below) looks good
>> to me.
>> 
>> http://www.paste2.org/p/97003
>> 
>> Here's the HTML output:
>> 
>> http://www.paste2.org/p/97004
>> 
>> As I stated in the initial post, I've tried several variations of ZF and
>> Dojo versions. Any help would be greatly appreciated.
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dijit-Editor-tp20141019p20559996.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_DOM and AJAX

2008-11-18 Thread edgelogix

Hi,
I've just designed the UI for the application, here I got a question about
the forms. I want to use AJAX and DOM, so what is the recommendations about
that , how and what is the is most appropriate way to accomplish both of the
things. I guess Zend_Dom and also kindly let me know is the Dojo right
choice to add here. Thanks

Ilyas
-- 
View this message in context: 
http://www.nabble.com/Zend_DOM-and-AJAX-tp20559881p20559881.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Dijit Editor

2008-11-18 Thread gwellman

I'm having trouble getting this working as expected.

Did the dojo view helper put all the javascript into the viewscript for you?
or did you have to put in the javascript yourself? 

I'm currently using this:
http://www.paste2.org/p/103439

It's generating the right html for the form but no javascript to go with it.

Any help on this would be greatly appreciated.


Matthew Lurz wrote:
> 
> I've been unable to get this working and so thought I would post some code
> to see if anyone might see something out of place.
> 
> Here's the form class:
> 
> http://www.paste2.org/p/97000
> 
> I found this post,
> http://www.nabble.com/two-column-site-to19665005.html#a19670193, but
> changing the location where the element is created didn't have any impact
> for me.
> 
> Here's an action method. The other form elements are saved, but not
> 'content'. I've checked the values of $_POST as well and seems the element
> is never populated though the JavaScript (see below) looks good to me.
> 
> http://www.paste2.org/p/97003
> 
> Here's the HTML output:
> 
> http://www.paste2.org/p/97004
> 
> As I stated in the initial post, I've tried several variations of ZF and
> Dojo versions. Any help would be greatly appreciated.
> 
> 
> Matthew Lurz wrote:
>> 
>> I've been unable to get the Dijit.Editor element to work using trunk or
>> the the 1.7 preview release. When using Dojo 1.2, from either the
>> official Dojo 1.2 release or CDN, I receive this error: "RichText should
>> not be used with the TEXTAREA tag. See dijit._editor.RichText docs.".
>> When using Dojo from trunk or the 1.7 preview release I receive the same
>> error as well as the errors due to the following missing files.
>> 
>> dijit/form/nls/en/Textarea.js
>> dijit/_editor/nls/en/commands.js
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Dijit-Editor-tp20141019p20558033.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend_Log writing to Zend_Platform

2008-11-18 Thread Saiaman

Have you find the Zend Platform API or write this zend_writer ?

Thank you


Joshua Ross wrote:
> 
> So I started a new job that uses Zend Platform pretty heavily and I am a 
> relative newb to it.  My boss wants me to log to Zend Platform if 
> possible.  It would be great if I could do that from Zend_Log through a 
> Zend_Log_Writer of some sort. Is there a Zend_Log_Writer for writing to 
> the Zend Platform logs(I think they are actually called events)?
> 
> Any help here would be much appreciated.
> 
> Thanks,
> -Joshua-
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Zend_Log-writing-to-Zend_Platform-tp17116928p20556554.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Dojo form fields within tooltips

2008-11-18 Thread stOOsh

Hello. 
I have some big form with 70 fields so decided to "hide" some, especially
long multicheckboxes, within tooltips, like below:


  

INTERNET
MAGAZINE
...

 

And now the problem: there is no clesClient in $_POST after submiting the
form, no matter if some clesClient checkboxes were checked.
When I remove Tooltip tag, clecClient of course appears in $_POST.

Is there any quick way of handling this?
-- 
View this message in context: 
http://www.nabble.com/Zend_Dojo-form-fields-within-tooltips-tp20556236p20556236.html
Sent from the Zend Framework mailing list archive at Nabble.com.



[fw-general] Zend_Form Decorator HTML table tr td

2008-11-18 Thread Pekka Järvinen

Hi,

I'm trying to achieve this:
default:
labelfielderrors ul li if any else empty
submit:
field
textarea:
label errors ul li if any else 
emptyfield


-- snip --
   $default_element_decorator = array(
 'ViewHelper',
 array(
   'decorator' => array(
 'td' => 'HtmlTag'
   ),
   'options' => array(
 'tag' => 'td'
   ),
 ),
 array(
   'Label', array(
 'tag' => 'td'
   ),
 ),
 array(
   'Errors', array(
 'td' => 'HtmlTag',
   ),
 ),
 array(
   'decorator' => array(
 'tr' => 'HtmlTag'
   ),
   'options' => array(
 'tag' => 'tr'
   ),
 ),
   );

  $this->setElementDecorators($default_element_decorator);  


  // 

   if ($element instanceof Zend_Form_Element_Submit)
   {
 $submit_decorator = array(
   array('ViewHelper'),
   array('Description'),
   array('HtmlTag',
 array('class' => 'form-submit')
   )
 );

 $element->setDecorators($submit_decorator);

   }

-- snip --

Is there any good tutorials for decorators?

--
Pekka Järvinen


Re: [fw-general] Question about zend pagination

2008-11-18 Thread vladimirn

Can anyone help on this please? :)
-- 
View this message in context: 
http://www.nabble.com/Question-about-zend-pagination-tp20543032p20555822.html
Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] Zend Framework 1.7 is now available!

2008-11-18 Thread Garri Santos
When will the PDF Programmer Reference Guide for 1.7 available for download?

On Mon, Nov 17, 2008 at 10:38 PM, Wil Sinclair <[EMAIL PROTECTED]> wrote:

> Zend Framework 1.7.0 is now available from the Zend Framework download
> site: http://framework.zend.com/download/latest
>
> This release introduces many new components and features, including:
>
> * Zend_Amf with support for AMF0 and AMF3 protocols
> * Dojo Toolkit 1.2.1
> * Support for dijit editor available in the Dojo Toolkit
> * Zend_Service_Twitter
> * ZendX_JQuery in extras library
> * Metadata API in Zend_Cache
> * Google book search API in Zend_Gdata
> * Preliminary support for GData Protocol v2 in Zend_Gdata
> * Support for skip data processing in Zend_Search_Lucene
> * Support for Open Office XML documents in Zend_Search_Lucene indexer
> * Performance enhancements in Zend_Loader, Zend_Controller, and server
>  components
> * Zend_Mail_Storage_Writable_Maildir enhancements for mail delivery
> * Zend_Tool in incubator
> * Zend_Text_Table for formatting table using characters
> * Zend_ProgressBar
> * Zend_Config_Writer
> * ZendX_Console_Unix_Process in the extras library
> * Zend_Db_Table_Select support for Zend_Paginator
> * Global parameters for routes
> * Using Chain-Routes for Hostname-Routes via Zend_Config
> * I18N improvements
>- Application wide locale for all classes
>- Data retrieving methods are now static
>- Additional cache handling methods in all I18N classes
>- Zend_Translate API simplified
> * File transfer enhancements
>- Support for file elements in subforms
>- Support for multifile elements
>- Support for MAX_FILES_SIZE in form
>- Support for breaking validation chain
>- Support for translation of failure ,messages
>- New IsCompressed, IsImage, ExcludeMimeType, ExcludeExtension
> validators
>- Support for FileInfo extension in MimeType validator
> * Zend_Db_Table_Select adapater for Zend_Paginator
> * Support for custom adapters in Zend_Paginator
> * More flexible handling of complex types in Zend_Soap
>
> In addition, almost three hundred bugs have been fixed:
>
> http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=10
> 903
>
> The Zend Framework team would like to thank everyone who made this
> release possible. As always, our generous ZF community has provided
> countless new features, bug fixes, documentation translations, etc. We'd
> also like to thank Adobe Systems and Wade Arnold for contributing the
> new Zend_Amf component. A big thanks to PHP Belgium and everyone who
> participated in bug hunt day (http://www.bughuntday.org/) and/or the
> Zend Framework bug hunt week. Finally, we'd like to thank all of those
> whom we've forgotten to thank above. :) Once again, we're reminded that
> Zend Framework is about much more than code, it is about community. See
> y'all online.
>
> ,Wil
>



-- 
__
Garrizaldy R. Santos
Ubraa Developer
PHP User-Group Philippines Inc.
http://www.phpugph.com
[EMAIL PROTECTED]


[fw-general] Zend_Controller_Action_Helper_Url BUG or expected bahavior?

2008-11-18 Thread Vladas Diržys
Why Zend_Controller_Action_Helper_Url::simple() doesn't set the baseUrl?
It's a bit confusing, because another method
Zend_Controller_Action_Helper_Url::url() does setting the baseUrl.

--
Pagarbiai,
Vladas Diržys
Tel.: +370 620 69020
www.dirzys.com