Re: habtm problem

2007-11-19 Thread Dianne van Dulken


Thanks for that Yolabingo.

It turned out I was making it all a bit too difficult for myself, so
I'll put the solution here in case anyone else is having the same
problem.

Same as above except what I had to do before save is to force the
['articles']['articles'] values to be my array.  So

function beforeSave() {
$this->data['Articles']['Articles'] =  explode(",", 
$_POST["data"]
['teasers']["articles"]); // saves the articles list information in
the joint table.
   return parent::beforeSave();
   }

is the correct beforeSave.

Don't you hate it when you've wasted time making something that should
be simple complicated :S


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Missing database table trying to bake a model

2007-11-19 Thread uae2k

well ... maybe this is the solution

I have copied "console" to the "app" folder and it works fine with me

On Nov 20, 8:30 am, uae2k <[EMAIL PROTECTED]> wrote:
> I have the same problem and I tried your way but without any result
>
> Any one can help here !

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Is cake 1.1 using the PHP5 only function scandir()?

2007-11-19 Thread Grant Cox

It looks like it - I can't see an alternative scandir function
declared anywhere.

Test it out and see if it causes an error, if so post a ticket on
https://trac.cakephp.org/


On Nov 20, 2:53 am, keymaster <[EMAIL PROTECTED]> wrote:
> Am I imagining things, or is the cake 1.1 version using an exclusively
> PHP5 function scandir()  in the Javascript helper $javascript-
>
> >includeScript() ?
>
> See here:
>
> http://api.cakephp.org/javascript_8php-source.html#l00223
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Routing Question

2007-11-19 Thread Grant Cox

Router::connect('/admin/logout', array('controller' => 'home',
'action' => 'logout', 'prefix'=>'admin'));

On Nov 20, 8:11 am, releod <[EMAIL PROTECTED]> wrote:
> Hey, just installed my first CakePHP application today.
>
> I am wondering how to get url to work in the browser:
> /admin/logout
>
> Here is my route:
> $Route->connect('/admin/logout', array('controller' => 'home',
> 'action' => 'admin_logout'));
>
> I get this error:
> Private Method in HomeController
> You are seeing this error because the private class method
> admin_logout should not be accessed directly
>
> My question is how do I get the url to look like /admin/logout, the
> logout method is simply going to end the session and redirect
> somewhere, so it does not require a view file.
>
> Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Complex Find Conditions (using arrays) , a bug in 1.2?

2007-11-19 Thread Grant Cox

Put both conditions in the 'or' key:

$datetime =  date("Y-m-d H:i:s");
$count =$this->PromoCode-
>findCount(array("OR"=>array("PromoCode.start_date" =>"> $datetime",
'PromoCode.active'=>'<>1')));



On Nov 20, 11:49 am, zonium <[EMAIL PROTECTED]> wrote:
> I have these statements:
>
> $datetime =  date("Y-m-d H:i:s");
> $count =$this->PromoCode->findCount(array("PromoCode.start_date" =>">
> $datetime", "OR"=>array('PromoCode.active'=>'<>1')));
>
> With debug enabled I saw cake tried to create this query:
>
> SELECT COUNT(*) AS `count` FROM `promo_codes` AS `PromoCode` WHERE
> `PromoCode`.`start_date` > '2007-11-19 17:38:54' AND
> ((`PromoCode`.`active` <> 1))
>
> According to the official manual (http://manual.cakephp.org/chapter/
> models) I expected
>
> OR (`PromoCode`.`active` <> 1)
> instead of
> AND ((`PromoCode`.`active` <> 1))
>
> Is it a bug or my statement was not correctly written.
>
> Thanks,
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Missing database table trying to bake a model

2007-11-19 Thread uae2k

I have the same problem and I tried your way but without any result

Any one can help here !

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: controller action in beforeSave() ?

2007-11-19 Thread bujanga

I sometimes use code similar to the following in the beforeFilter() of
my controller:

/* function is not in byPass array and isnt being called by another function */
if(in_array($this->action,$byPass) === FALSE AND $this->action != __FUNCTION__){

}

Gary

On Nov 18, 2007 4:47 PM, Grant Cox <[EMAIL PROTECTED]> wrote:
>
> No, you cannot access ANYTHING from the controller in the model -
> that's one of the core parts of MVC.
>
> What you should do is define a new function in your model -
> register()  This can set some class variable which you can check in
> your other callbacks, eg:
>
> class YourModel extends AppModel {
>
> var $name = 'YourModel';
>
> var $is_registering = false;
>
> function register( $data )
> {
> $this->is_registering = true;
> return $this->save( $data );
> }
>
> function beforeValidate()
> {
> if ( $this->is_registering ){
> ...
> }
> }
>
> function afterSave()
> {
> if ( $this->is_registering ){
> ...
>
> }
> }
> }
>
>
>
> On Nov 18, 6:35 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> > It would be great, but model doesn't have field action :/ Any other
> > ideas how to check action in model?
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



obAuth, redirection to the login page because of the lock()

2007-11-19 Thread br1dil

Hello everyone,

First, I would like to apologize if my english isn't very well. Yes,
I'm french... Did you recognize my accent?
But i can assure you that I'm improving since i am in Australia. Ok,
sorry I'm off topic, it was just to present myself to the community.

So, I'm using obAuth component with CakePHP 1.18...
My issue is obAuth redirect me automatically to the login page even if
the login function succeeded.
Maybe I should present my application.
The user is directly redirect to a login form (there'll be no
frontend). If the login succeed, it'll be redirect to the page /home
which is a route to /users/home

 UsersController
function home()
{
$this->obAuth->lock(); //all the users can go here if they are
registered [...]


obAuth redirected me to the login page each time. The only way I found
to go on the page is to comment the line with the function lock(), but
in this case why using obAuth.

If anyone have at least an idea, I will be grateful. And for those who
have the answer, and think "Where is the problem?", yes I'm a newbie!

And by the way, do you know how can i use the informations stored by
obAuth in the view?
I did this and it's worked, but i'm not sure about it:

 UsersController
function home() {
$this->set('user', $this->Session->read($this->obAuth->sesskey));

- index.thtml



Thank you and have a nice day.

See ya guys.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



CakePHP problems when zend.zel_compatibility_mode=On

2007-11-19 Thread sawa

This may be usefull to someone...
It took me couple of hours to discover it so let's hope I'll save that
time to someone else.

I'm having a database with 50+ tables and lot of hasMany relations
CakePHP runs on Apache2 and php5.
When zend.zel_compatibility_mode is On, many relashions that I have
cause CakePHP to act really strange.
Sometimes it makes php exhaust all memory available, sometimes
segmentation fault...
When I delete some of relations in my models, it works...but of course
that can't be the solution.

Turning zend.zel_compatibility_mode=Off puts all back to normal and
CakePHP works as expected.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Complex Find Conditions (using arrays) , a bug in 1.2?

2007-11-19 Thread zonium

I have these statements:

$datetime =  date("Y-m-d H:i:s");
$count =$this->PromoCode->findCount(array("PromoCode.start_date" =>">
$datetime", "OR"=>array('PromoCode.active'=>'<>1')));

With debug enabled I saw cake tried to create this query:

SELECT COUNT(*) AS `count` FROM `promo_codes` AS `PromoCode` WHERE
`PromoCode`.`start_date` > '2007-11-19 17:38:54' AND
((`PromoCode`.`active` <> 1))

According to the official manual (http://manual.cakephp.org/chapter/
models) I expected

OR (`PromoCode`.`active` <> 1)
instead of
AND ((`PromoCode`.`active` <> 1))

Is it a bug or my statement was not correctly written.

Thanks,

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Checkboxes instead of multiple select

2007-11-19 Thread kodienz

Hi there,

Im using Cake 1.2.0.5427alpha.

Have unsuccesfully tried some of these. What is the best way?

Basically just trying to implement it into the following Structure

products

id
product
price


proposal
--
id
client_id
status



products_proposals
-
id
product_id
proposal_id

Anyone out there willing to help me!

Thanks,

Kodie Wixon
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Routing Question

2007-11-19 Thread releod

Hey, just installed my first CakePHP application today.

I am wondering how to get url to work in the browser:
/admin/logout

Here is my route:
$Route->connect('/admin/logout', array('controller' => 'home',
'action' => 'admin_logout'));

I get this error:
Private Method in HomeController
You are seeing this error because the private class method
admin_logout should not be accessed directly



My question is how do I get the url to look like /admin/logout, the
logout method is simply going to end the session and redirect
somewhere, so it does not require a view file.

Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: jquery pagination

2007-11-19 Thread Solarise

Thanks for the response

I have used the normal pagination feature, which seems to work really
well - I was wondering if there was a way of doing that with AJAX
using jQuery though (loading up the data within the page, rather than
reloading the whole page)


Cheers
Robin

On Nov 19, 6:17 pm, bingo <[EMAIL PROTECTED]> wrote:
> hi Solarise,
>
> I am using jquery with my CakePHP project. It works great..but the
> only problem is cakephp does not support jquery  in a similar way as
> it does to Prototype. I don't have any helper but just write script
> tags in my views..and its working fine. And for pagination, I am not
> using cakephp pagination but the pagination helper and component that
> someone else wrote before cakephp got its own pagination..
>
> you can checkout my cakephp + jquery project herehttp://findnwrite.com/memento
>
> Regards,
>
> On Nov 19, 11:09 am, Solarise <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > Just looking for a bit of advice about jquery, and pagination in
> > CakePHP
>
> > Has anyone managed to get something working which allows AJAX
> > pagination with the jQuery library? (I know it works with prototype -
> > but I've chosen to go with jQuery for a project this time, seems like
> > a neat little thing!)
>
> > Are there any helpers or equivalent out there that would allow me to
> > achieve jQuery AJAX pagination?
>
> > Cheers
> > Robin

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



new cake-site

2007-11-19 Thread Joinfield

if you like, please add our new project. ihood provides infos about
the social status of streetparts in germany. and much more in the
future! come an look the tidy clean interface-stracture, splitted into
an application- and a content-frame. feedback welcome :)

http://www.ihood.de

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: View this page "Cake Apps/Sites In The Wild"

2007-11-19 Thread Joinfield

if you like, please add our new project. ihood provides infos about
the social status of streetparts in germany. and much more in the
future! come an look the tidy clean interface-stracture, splitted into
an application- and a content-frame. feedback welcome :)

http://www.ihood.de

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: add another configuration files ...

2007-11-19 Thread Howard Glynn
Disregarding the question of style/extensibility, is there any discernible
performance hit from using Configure::read() versus a load of constant
DEFINEs in (say) bootstrap.php?

i've always assumed (dangerous, i know) that DEFINEs would be faster than a
method call..?

Howard

On Nov 19, 2007 6:36 PM, chad <[EMAIL PROTECTED]> wrote:

>
> Then to read the variables (or anywhere in your app), use
> Configure::read('Email.from');
>
> Hope that helps!
>
> On Nov 19, 9:28 am, Baz <[EMAIL PROTECTED]> wrote:
> > Use Configure::read() and Configure::write()
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



VH1 site in CakePHP

2007-11-19 Thread jeko

Howdy Folks,

We just finished our site for VH1, built entirely on CakePHP. 4 app
servers behind an f5 BigIP load balancer, 1 MySQL DB server, 1 NFS
server. Take a look.

http://theshotspot.com/

Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Who's Online

2007-11-19 Thread Chris Hartjes

On Nov 19, 2007 4:10 PM, salimk786 <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I've seen on my sites a feature that allows you to see "Who's
> Online".
> I'd like to implement this on my cake app.
>
> Does anyone know of an existing contribution that allows users to do
> this ? If not, does anyone have a high level - conceptual  (or low
> level- code) undersstanding of how to do this ?
>
> Thanks

Quick-and-dirty way to do it:

1) use a centralized session system for your application, make it database-based
2) count the number of currently-valid records in your sessions table
3) display that count as 'number of people online'

This approach has worked for me in the past.

-- 
Chris Hartjes

My motto for 2007:  "Just build it, damnit!"

@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Who's Online

2007-11-19 Thread salimk786

Hello,

I've seen on my sites a feature that allows you to see "Who's
Online".
I'd like to implement this on my cake app.

Does anyone know of an existing contribution that allows users to do
this ? If not, does anyone have a high level - conceptual  (or low
level- code) undersstanding of how to do this ?

Thanks



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CAKEPHP with IIS CGI error

2007-11-19 Thread Christopher E. Franklin, Sr.

What version of IIS?  Download the FastCGI Tech preview for your IIS
version, download the php 5.2 zip file(not the installer). Unzip
fastcgi, browse to that dir in command prompt and type fcgi /install
and then type fcgi /add C:\php\php-cgi.exe php and then restart IIS.
Your php files should work now.  Instead of using index.php/controller/
action which did not work for me, use index.php?url=/controller/action
Leave that ENV thing commented.  I uncommented it on Windows with IIS7
and got a ton of errors (which are something I am doing obviously as
cake foundation disavows any bugs in their code)

On Oct 11, 4:25 am, CakeMan <[EMAIL PROTECTED]> wrote:
> Hi ALL,
>
> I am having an trouble running Cakephp with IIS. It is giving me the
> error as  "CGI Error
> The specified CGI application misbehaved by not returning a complete
> set of HTTP headers."
>
> What is the problem ? Please  help me out to run cakephp on IIS as my
> client only has IIS/Windows server.
>
> Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sad Question

2007-11-19 Thread Christopher E. Franklin, Sr.

Here's another thought, has anyone run into any trobule with Windows
2003 Web Edition (not the full windows server 2003 that includes file
server stuff, domain controller stuff)?

On Nov 19, 10:46 am, "Christopher E. Franklin, Sr."
<[EMAIL PROTECTED]> wrote:
> Well, I tried this weekend to get cake running on Windows IIS7, MySQL
> and PHP.  It works fine with a fresh install and making a new
> controller, model and view.  Works fine with Apache on Windows too
> but, I am seeing a recurring pattern here.
>
> If I extend the AppController by placing another app_controller.php
> file into the app directory and put var $components =
> array('Session');  then in function beforeRender(){ 
> $this->Session->check('some_key'); } I get this error:
>
> [Mon Nov 19 10:36:34 2007] [error] [client 192.168.1.100] PHP Fatal
> error:  Call to a member function check() on a non-object in C:\\apache
> \\htdocs\\app\\app_controller.php on line 82
>
> Doesn't matter if it's apache or iis, that's the error that persists.
> Apache on Windows, I have mod_rewrite enabled in httpd.conf and I have
> the AllowOverride settings to All.
>
> Now, I also set up another Linux box with apache mysql and php, just
> copied over the site and voila. Works fine!
>
> The only difference is that one is on Windows and the other is on
> Linux.
>
> I am going to paste what's in my app controller.php here so, this post
> may get a little long.
>
>  class AppController extends Controller
> {
> /**
>  * Adding Ajax and Javascript helpers to the default helpers.
>  * This will load them on the home page.
>  *
>  * @var Array Holds the names of the helpers to be loaded by
> default
>  */
> public $helpers = array('Html',
> 'Ajax',
> 'Javascript',
> 'MenuDisplay',
> 'Banners',
> 'DraggableBox',
> 'FormatCategories',
> 'Session',
> 'HeaderSearch',
> 'TextImage',
> 'TodaysHotProp',
> 'classifiedGlance',
> 'AdminHelper',
> 'Number',
> 'Form',
> 'Pdf');
>
> public $uses = array('Menu', 'Category', 'HotProp', 'Classified',
> 'WvdBanner', 'Edition','Banner');
>
> public $components = array('Cookie', 'Session', 'Apphtml',
> 'MyAuth');
>
> /**
>  * Changing the default extension of templates to php.
>  *
>  * @var String Holds the default extension of template files.
>  */
> public $ext = '.php';
>
> /**
>  * Setting the default pagination properties.  Mainly for
> classifieds.
>  *
>  * @var Array Holds the default pagination limits
>  */
> public $paginate = array('limit' => 20, 'page' => 1);
>
> /**
>  * Setting the default theme
>  *
>  * @var String The default theme
>  */
>
> private $current_theme = 'blue';
>
> /**
>  * This method overrides the basic method from
> Controller::beforeRender()
>  * There are certain things that every view needs in order to
> display
>  * correctly so, we set those values here, right before the page
> renders.
>  *
>  * @internal We can also set a beforeFilter if we need to shut the
> site down
>  */
> public function beforeRender()
> {
> // I get the error here for $this->Session->check();
> /**
>  * Get rid of the callback when not on the users controller
>  *
>  * @todo Add more controllers later on if needed
>  */
> if(($this->params['controller'] != "users") &&
>  $this->Session->check('callback'))
> {
> $this->Session->del('callback');
> }
> // Every view has the side menu, get the links and set them in
> an array for the view
> $this->set('menuArray', $this->Menu->getMenuItems());
> // We set recursive to 0 because we don't want unnecessary
> data
> $this->Category->recursive = "0";
> // We get the classified categories for the Quick Links box
> $this->set('categories', $this->Category->findAll());
> $this->set('edition', $this->Cookie->read('edition'));
>
> //Get the data for the Today's Hot Prop View
>
> $rMax = $this->HotProp->getNumRows();
> srand(date('His'));
> $randomNumber = rand(1, $rMax);
> $this->set('randomHotProp', $this->HotProp-
>
> >findById($randomNumber));
>
> /**
>  * Do some stuff for crumbs
>  */

Re: Limitação do Conditions

2007-11-19 Thread Marcelo Linhares
Hi Rogério,
Questions in english, correct??
 Ativa o debug, e vê qual é o problema da SQL que está sendo gerada


[]s
Marcelo Linhares




Em 19/11/07, RÔ <[EMAIL PROTECTED]> escreveu:
>
>
> E ai Pessoal,
> to com uma dificuldade e quero saber se alguém pode me socorrer?
> tenho que efetuar uma busca por cidade antes de implementar essa
> busca, o funcionamneto estava ok,
>
> $conditions = array ("`Pessoa`. nome LIKE '%".$this->data['Home']
> ['pessoa'] ."%'",
>   "`Empresa`. nome LIKE '%".$this-
> >data['Home']['empresa']."%'",
> );
>
> ## Chamada para a consulta:
> $pessoas = $this->Pessoa->findAll($conditions, NULL, "`Pessoa`.nome
> ASC");
>
> té ai td certo implementando  a busca incrementei o seguinte linha no
> conditions ficando da seguinte forma:
> $conditions = array ("`Pessoa`. nome LIKE '%".$this->data['Home']
> ['pessoa'] ."%'",
>   "`Empresa`. nome LIKE '%".$this-
> >data['Home']['empresa']."%'",
>   "`Endereco`.cidade LIKE '%".$this-
> >data['Home']['cidade']."%'",
> );
>
>
> após começou ocorrer erro no funcionamento da busca , esse também não
> foi possível,
>
> em na model pessoa.php defino as relações da seguinte forma:
> var $hasMany = array("Contato", "Endereco");
>
> var $belongsTo = array(
> 'Empresa' =>
> array( 'className' => 'Empresa',
> 'foreignKey' => 'empresa_id',
> 'conditions' => '',
> 'fields' => '',
> 'order' => '',
> 'counterCache' => ''
> ),
> );
>
> qual a forma q conseguirei utilizar essas tabelas em relacionamentos
> hasMany e belongsTo , se puder me ajudar ficarei muito grato, obrigado
> e até mais.
>
> >
>


-- 
Marcelo Linhares
Pessoal -> marcelolinhares.com
Agência Detalhes -> http://www.agenciadetalhes.com.br
Procurando vagas em TI ?
http://www.vagasem.info

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Limitação do Conditions

2007-11-19 Thread

E ai Pessoal,
to com uma dificuldade e quero saber se alguém pode me socorrer?
tenho que efetuar uma busca por cidade antes de implementar essa
busca, o funcionamneto estava ok,

$conditions = array ("`Pessoa`. nome LIKE '%".$this->data['Home']
['pessoa'] ."%'",
  "`Empresa`. nome LIKE '%".$this-
>data['Home']['empresa']."%'",
);

## Chamada para a consulta:
$pessoas = $this->Pessoa->findAll($conditions, NULL, "`Pessoa`.nome
ASC");

té ai td certo implementando  a busca incrementei o seguinte linha no
conditions ficando da seguinte forma:
$conditions = array ("`Pessoa`. nome LIKE '%".$this->data['Home']
['pessoa'] ."%'",
  "`Empresa`. nome LIKE '%".$this-
>data['Home']['empresa']."%'",
  "`Endereco`.cidade LIKE '%".$this-
>data['Home']['cidade']."%'",
);


após começou ocorrer erro no funcionamento da busca , esse também não
foi possível,

em na model pessoa.php defino as relações da seguinte forma:
var $hasMany = array("Contato", "Endereco");

var $belongsTo = array(
'Empresa' =>
array( 'className' => 'Empresa',
'foreignKey' => 'empresa_id',
'conditions' => '',
'fields' => '',
'order' => '',
'counterCache' => ''
),
);

qual a forma q conseguirei utilizar essas tabelas em relacionamentos
hasMany e belongsTo , se puder me ajudar ficarei muito grato, obrigado
e até mais.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sad Question

2007-11-19 Thread Christopher E. Franklin, Sr.

Well, I tried this weekend to get cake running on Windows IIS7, MySQL
and PHP.  It works fine with a fresh install and making a new
controller, model and view.  Works fine with Apache on Windows too
but, I am seeing a recurring pattern here.

If I extend the AppController by placing another app_controller.php
file into the app directory and put var $components =
array('Session');  then in function beforeRender(){ $this->Session-
>check('some_key'); } I get this error:
[Mon Nov 19 10:36:34 2007] [error] [client 192.168.1.100] PHP Fatal
error:  Call to a member function check() on a non-object in C:\\apache
\\htdocs\\app\\app_controller.php on line 82

Doesn't matter if it's apache or iis, that's the error that persists.
Apache on Windows, I have mod_rewrite enabled in httpd.conf and I have
the AllowOverride settings to All.

Now, I also set up another Linux box with apache mysql and php, just
copied over the site and voila. Works fine!

The only difference is that one is on Windows and the other is on
Linux.

I am going to paste what's in my app controller.php here so, this post
may get a little long.

 20, 'page' => 1);

/**
 * Setting the default theme
 *
 * @var String The default theme
 */

private $current_theme = 'blue';

/**
 * This method overrides the basic method from
Controller::beforeRender()
 * There are certain things that every view needs in order to
display
 * correctly so, we set those values here, right before the page
renders.
 *
 * @internal We can also set a beforeFilter if we need to shut the
site down
 */
public function beforeRender()
{
// I get the error here for $this->Session->check();
/**
 * Get rid of the callback when not on the users controller
 *
 * @todo Add more controllers later on if needed
 */
if(($this->params['controller'] != "users") &&
 $this->Session->check('callback'))
{
$this->Session->del('callback');
}
// Every view has the side menu, get the links and set them in
an array for the view
$this->set('menuArray', $this->Menu->getMenuItems());
// We set recursive to 0 because we don't want unnecessary
data
$this->Category->recursive = "0";
// We get the classified categories for the Quick Links box
$this->set('categories', $this->Category->findAll());
$this->set('edition', $this->Cookie->read('edition'));

//Get the data for the Today's Hot Prop View

$rMax = $this->HotProp->getNumRows();
srand(date('His'));
$randomNumber = rand(1, $rMax);
$this->set('randomHotProp', $this->HotProp-
>findById($randomNumber));

/**
 * Do some stuff for crumbs
 */
$this->Apphtml->addCrumb('Home', '/');
if($this->params['controller'] != "pages")
{
$this->Apphtml->addCrumb(Inflector::camelize($this-
>params['controller']), DS.$this->params['controller'].DS);
if($this->params['action'] != "index")
{
$this->Apphtml->addCrumb(Inflector::camelize($this-
>params['action']), DS.$this->params['controller'].DS.$this-
>params['action'].DS);
}
}
$this->set('crumbs', $this->Apphtml-
>getCrumbs(" » "));
}

public function beforeFilter()
{
// Clean out the old oneby thumbnail images
$this->CleanTmpOnebys();

// Check the banner status and set banners to inactive if they
are out of date
$this->CheckBannerStatusWs();

// We are going to set the default edition for QuickLinks here
// 31556926 = 1 year in seconds
if(is_null($this->Cookie->read('edition')))
{
$this->Cookie->write('edition', 'all', true, 31556926);
$this->Cookie->write('askededition', 0, true, 31556926);
}

// If the current theme is not set in a cookie, use the
default and set the cookie
if(is_null($this->Cookie->read('user_theme')))
{
$this->set('current_theme', $this->current_theme);
// 2592000 is the time in seconds for 30 days
$this->Cookie->write('user_theme', $this->current_theme,
true, 31556926);
}
else
{
// The theme was found in the cookie, use it.
$this->set('current_theme', $this->Cookie-
>read('user_theme'));;
}
$this->set('secure', false);
}

/**
 * This method will delete the images out of tmp_onebys every
 * 7 days
 *
 * @return Void
 * @access private
 */
private function CleanTmpOnebys() {
$clean = false;
uses('File');
$file = new File(APP."tmp/clean_time.txt", true);
$contents = $file->read();
if(empty($contents)) {
$file->write(strtotime("+7 days", strtotime(date('Y-m-d
00:00:00';

Re: add another configuration files ...

2007-11-19 Thread chad

If you're using 1.2, simply change that config file to this format:



place that file in the app/config/ and then from your controller use
Configure::load('config_filename');

Then to read the variables (or anywhere in your app), use
Configure::read('Email.from');

Hope that helps!

On Nov 19, 9:28 am, Baz <[EMAIL PROTECTED]> wrote:
> Use Configure::read() and Configure::write()
>
> If you insist on just dumping variable names, I guess you could lump them in
> bootstrap.php?
>
> On Nov 19, 2007 8:51 AM, Adwin Wijaya <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hello ...
>
> > I have many configuration files that i brought from my previous site
> > and i would like to use it.
> > I store it in config.php and the content looks like:
>
> >  >   $email_from = '[EMAIL PROTECTED]' ;
> >   $email_subject_greeting = 'hello ... {visitor_name} ' ;
> >   $phone_number1 = '123-45678';
> >   .
> > ?>
>
> > How to add this configuration into the controller ?
> > I add with include 'config.php' ;
> > but it wont load the variables ... i use globals as well .. but it
> > doesnt work.
>
> > can you help me ?
>
> > Thank you !!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: jquery pagination

2007-11-19 Thread bingo

hi Solarise,

I am using jquery with my CakePHP project. It works great..but the
only problem is cakephp does not support jquery  in a similar way as
it does to Prototype. I don't have any helper but just write script
tags in my views..and its working fine. And for pagination, I am not
using cakephp pagination but the pagination helper and component that
someone else wrote before cakephp got its own pagination..

you can checkout my cakephp + jquery project here http://findnwrite.com/memento

Regards,


On Nov 19, 11:09 am, Solarise <[EMAIL PROTECTED]> wrote:
> Hi
>
> Just looking for a bit of advice about jquery, and pagination in
> CakePHP
>
> Has anyone managed to get something working which allows AJAX
> pagination with the jQuery library? (I know it works with prototype -
> but I've chosen to go with jQuery for a project this time, seems like
> a neat little thing!)
>
> Are there any helpers or equivalent out there that would allow me to
> achieve jQuery AJAX pagination?
>
> Cheers
> Robin
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: CAKEPHP with IIS CGI error

2007-11-19 Thread trooney

*Bump*

Anyone solved this problem? I am using CakePHP 1.2 pre-beta and not
terribly familiar with IIS.

In my core.php I've uncommented:
-- Configure::write('App.baseUrl', env('SCRIPT_NAME'));

And Added
-- define('SERVER_IIS', true);

And receive this error message.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Is cake 1.1 using the PHP5 only function scandir()?

2007-11-19 Thread keymaster

Am I imagining things, or is the cake 1.1 version using an exclusively
PHP5 function scandir()  in the Javascript helper $javascript-
>includeScript() ?

See here:

http://api.cakephp.org/javascript_8php-source.html#l00223



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sad Question

2007-11-19 Thread Baz
I know that I've run into problems trying to configure Apache, PHP, and
MySQL separately on Windows.

But the WAMP and XAMPP solutions work (and port) great.  Just ensure you use
"DS" instead of "/" or "\" and remember that on Windows Apache (or PHP)
doesn't seem to be case sensitive.

Those are the only problems I've run into with porting to Linux. Never had
problems the other way around. But if you trying to run on IIS, good luck
with that.
--
Baz L
http://www.WebDevelopment2.com/

On Nov 19, 2007 4:47 AM, RichardAtHome <[EMAIL PROTECTED]> wrote:

>
> "Apache on Windows does not work"
>
> I've been developing WAMP sites for a looong time with no problems.
>
> I think the rumour started because Apache on windows is not
> 'officially' supported.
>
> On Nov 19, 6:07 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> > Sorry for the confusion, I was really responding to the original post,
> > specifically:
> >
> > > So, the question:
> > > Since I have followed every single tutorial I could find on the web
> > > about installing Cake on IIS for the last 3 days (this includes me
> > > testing if I could just put Apache on Windows which does not work) I
> > > really have no other choice but to switch frameworks.
> >
> > And I'm just replying to let Christopher know that Windows + Apache +
> > Mysql + PHP + Cake works great/fine for me and many others. I'm
> > curious why he says "Apache on Windows does not work"...
> >
> > Wayn
> >
> > On 11/17/07, Baz <[EMAIL PROTECTED]> wrote:
> >
> > > I assumed he was trying to use PHP under IIS.
> >
> > > On Nov 17, 2007 5:06 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
> >
> > > > I run Apache plus Cake and Mysql on Windows all the time. And
> servers
> > > > are generally Apache on Linux. I change the config file at the start
> > > > of a new project, sync the rest over during development, and
> > > > everything just works.
> >
> > > > Wayne
> >
> > > > On 11/17/07, Baz <[EMAIL PROTECTED]> wrote:
> > > > > I say slap WAMP on there and call it a day :D.
> >
> > > > > Sorry dude, it does suck.
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: add another configuration files ...

2007-11-19 Thread Baz
Use Configure::read() and Configure::write()

If you insist on just dumping variable names, I guess you could lump them in
bootstrap.php?

On Nov 19, 2007 8:51 AM, Adwin Wijaya <[EMAIL PROTECTED]> wrote:

>
> Hello ...
>
> I have many configuration files that i brought from my previous site
> and i would like to use it.
> I store it in config.php and the content looks like:
>
>$email_from = '[EMAIL PROTECTED]' ;
>   $email_subject_greeting = 'hello ... {visitor_name} ' ;
>   $phone_number1 = '123-45678';
>   .
> ?>
>
>
> How to add this configuration into the controller ?
> I add with include 'config.php' ;
> but it wont load the variables ... i use globals as well .. but it
> doesnt work.
>
> can you help me ?
>
> Thank you !!!
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



jquery pagination

2007-11-19 Thread Solarise

Hi

Just looking for a bit of advice about jquery, and pagination in
CakePHP

Has anyone managed to get something working which allows AJAX
pagination with the jQuery library? (I know it works with prototype -
but I've chosen to go with jQuery for a project this time, seems like
a neat little thing!)

Are there any helpers or equivalent out there that would allow me to
achieve jQuery AJAX pagination?

Cheers
Robin

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



js and css "packager" for cake 1.1?

2007-11-19 Thread keymaster

Does anyone know of any packager for js/css for cake 1.1?

What have people done in 1.1 to reduce http requests for multiple js/
css files?

 (I know there are a couple in the bakery for cake 1.2, but alas, we
are still in 1.1)

Thanks very much.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Validation question...

2007-11-19 Thread theman

Sorry for not being more explicit but I figured that post had the info
you needed.

If I'm correct in assuming you just want to do what VALID_NOT_EMPTY
did, then this should work

var $validate = array('somefield' => array('rule' =>
array('minLength', 1)));

On Nov 13, 1:55 pm, mbavio <[EMAIL PROTECTED]> wrote:
> thanks for your answer theman, but minLenght is not the solve to this
> problem...
>
> I´ve solved myself with the help of the IRC (tks kabturek!)... You
> cant put 'rule' => null and validate with 'required' and 'allowEmpty'.
> Proved.
>
> Thanks anyway. See u.
>
> Martin Bavio
>
> On Nov 13, 5:14 pm, theman <[EMAIL PROTECTED]> wrote:
>
> > minLength is the key...
>
> > seehttp://groups.google.ca/group/cake-php/browse_thread/thread/786da77a8...
>
> > On Nov 13, 1:08 pm, mbavio <[EMAIL PROTECTED]> wrote:
>
> > > Now I´ve been told in the IRC that using VALID_NOT_EMPTY is
> > > deprecated, so I have to use a validation array... The problem is that
> > > I cant make just a NOT_EMPTY rule, because it doesn´t exist! Or it
> > > does?
>
> > > My problem...
>
> > > 'login' => array(
> > >  'rule' => 'ruleName',
> > >'required' => true,
> > >   'allowEmpty' => false,
> > >   'on' => null,
> > >'message' => 'Error message'
> > >   ),
>
> > > With the required and allowEmpty options, i can validate a "not empty"
> > > field. But it´s required to put a rule, and i dont know what rule to
> > > put, i dont want any rule! Anybody can help me?
>
> > > Thanks.
>
> > > On Nov 13, 12:25 pm, mbavio <[EMAIL PROTECTED]> wrote:
>
> > > > Hi, I´m reading the Cake´s Manual of 1.2 Version and I have a doubt...
> > > > Are the followind ways of validate the same?
>
> > > > 1)'login' => VALID_NOT_EMPTY,
>
> > > > 2)'login' => array(
> > > > 'rule' => 'ruleName',
> > > > 'required' => true,
> > > > 'allowEmpty' => false,
> > > > 'on' => null,
> > > > 'message' => 'Error message'
> > > >),
>
> > > > What I´m trying to learn is if VALID_NOT_EMPTY is the same that
> > > > 'required' to true and 'allowEmpty' to false.
>
> > > > Thanks.
>
> > > > Martin Bavio
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



any GData updates?

2007-11-19 Thread robdeman

Hi all,

is there any update on CakePHP and GData?
Any code snippets, wrappers, tutorial, blogs, etc...?

If not: is there any example code of how to work with the Youtube API
using CakePHP?

thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



add another configuration files ...

2007-11-19 Thread Adwin Wijaya

Hello ...

I have many configuration files that i brought from my previous site
and i would like to use it.
I store it in config.php and the content looks like:




How to add this configuration into the controller ?
I add with include 'config.php' ;
but it wont load the variables ... i use globals as well .. but it
doesnt work.

can you help me ?

Thank you !!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: All about HABTM

2007-11-19 Thread smilin

How its happens is that one post is made by the clicking the new post
link from my account.

The another one i had emailed.I think that the email will reaches the
cakephp group directly and it will not be displayed on the forum.

Thats the mistake happens.

On Nov 19, 5:31 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 19, 10:58 am, smilin <[EMAIL PROTECTED]> wrote:
>
> > Now only i am entering into the cakephp and i am using the version
> > 1.2.
>
> Dear smilin/Seenu V,
>
> Why are you using 2 accounts on the group (to both double post and
> demonstrate your impatience)?
>
> Regarding your question try looking at the tutorial/blog/whatever you
> got $habtm from, as it's not part of core cake.
>
> AD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: All about HABTM

2007-11-19 Thread smilin

How its happens is that one post is made by the clicking the new post
link from my account.

The another one i had emailed.I think that the email will reaches the
cakephp group directly and it will not be displayed on the forum.

Thats the mistake happens.

On Nov 19, 5:31 pm, AD7six <[EMAIL PROTECTED]> wrote:
> On Nov 19, 10:58 am, smilin <[EMAIL PROTECTED]> wrote:
>
> > Now only i am entering into the cakephp and i am using the version
> > 1.2.
>
> Dear smilin/Seenu V,
>
> Why are you using 2 accounts on the group (to both double post and
> demonstrate your impatience)?
>
> Regarding your question try looking at the tutorial/blog/whatever you
> got $habtm from, as it's not part of core cake.
>
> AD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: All about HABTM

2007-11-19 Thread AD7six

Stop spamming the list.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object

2007-11-19 Thread dandreta

> Set debug to 2 and try fixing your sql error. which will be the source
> of the first error message (this one: Notice (8): Undefined offset:  0
> [CORE/cake/libs/model/datasources/ dbo_source.php, line 882]).
>
> AD

Thanks for your response.
I have tried what you have said to me, but in the sql code I don't
obtain any error.
I don't find a solution, do you know another way of showing two fields
joined in a select?
My version of cake is 1.2 pre-beta.
Regards
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: All about HABTM

2007-11-19 Thread smilin

Guru's

I am hopefully waiting for the replies.Please help this newbie.

Thanks.

On Nov 19, 2:58 pm, smilin <[EMAIL PROTECTED]> wrote:
> Now only i am entering into the cakephp and i am using the version
> 1.2.
>
> I had three sets of check box.And i need to save that into the
> table,First i think i need to concatenate the data and save it on the
> table then i had get the information from cakephp group that we can
> also use HABTM.I am not aware about this concept.I had go through the
> cakephp manuals on the models.But i cant able to move after a point.
>
> Please help me to come out from this issue.
>
> Till know i had made the below things.
>
> I had create three table.Named as
>
> dog_grouptypes
> dog_sizes
> dog_walkers_paymenttypes
>
> All the three table has the fields id and name.
>
> On app/views/services/service.ctp
>
> 
> 
> DogSizes
> checkboxMultiple('Size.Size', $dog_sizes_list) ?>
> 
> 
> 
> 
> 
> DogGroupTypes
> checkboxMultiple('Group.Group', $dog_grouptypes_list) ?>
> 
> 
> 
> 
> 
> Payments
> checkboxMultiple('Payment.Payment',
> $dog_walkers_paymenttypes_list) ?>
> 
> 
> 
> 
> 
> submit('Save') ?>
> 
> 
>
> And on the app/controllers/services_controller.php
>
> I am not clear what i need to do here.
>
> And i had saved the file habtm.php on app/views/helpers
>
> Now i am getting the error as
>
> Undefined variable: habtm [CORE\app\views\services\service.ctp, line
> 13]
>
> Fatal error: Call to a member function checkboxMultiple() on a non-
> object in C:\inetpub\wwwroot\poochout\app\views\services\service.ctp
> on line 13
>
> I need the help to come out from the error and also to complete this
> HABTM process.
>
> Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object

2007-11-19 Thread AD7six



On Nov 19, 1:24 pm, dandreta <[EMAIL PROTECTED]> wrote:
> ¿?

Set debug to 2 and try fixing your sql error. which will be the source
of the first error message (this one: Notice (8): Undefined offset:  0
[CORE/cake/libs/model/datasources/ dbo_source.php, line 882]).

AD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: All about HABTM

2007-11-19 Thread AD7six



On Nov 19, 10:58 am, smilin <[EMAIL PROTECTED]> wrote:
> Now only i am entering into the cakephp and i am using the version
> 1.2.

Dear smilin/Seenu V,

Why are you using 2 accounts on the group (to both double post and
demonstrate your impatience)?

Regarding your question try looking at the tutorial/blog/whatever you
got $habtm from, as it's not part of core cake.

AD
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object

2007-11-19 Thread dandreta
¿?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



HABTM clarification

2007-11-19 Thread Seenu V

I am newbie for cakephp.i am using the version 1.2.

I had three sets of check box.And i need to save that into the
table,First i think i need to concatenate the data and save it on the
table then i had get the information from cakephp group that we can
also use HABTM.I am not aware about this concept.I had go through the
cakephp manuals on the models.But i cant able to move after a point.

Please help me to come out from this issue.

Till know i had made the below things.

I had create three table.Named as

dog_grouptypes
dog_sizes
dog_walkers_paymenttypes

All the three table has the fields id and name.

On app/views/services/service.ctp



DogSizes
checkboxMultiple('Size.Size', $dog_sizes_list) ?>





DogGroupTypes
checkboxMultiple('Group.Group', $dog_grouptypes_list) ?>





Payments
checkboxMultiple('Payment.Payment',
$dog_walkers_paymenttypes_list) ?>





submit('Save') ?>



And on the app/controllers/services_controller.php

I am not clear what i need to do here.

And i had saved the file habtm.php on app/views/helpers

Now i am getting the error as

Undefined variable: habtm [CORE\app\views\services\service.ctp, line
13]

Fatal error: Call to a member function checkboxMultiple() on a non-
object in C:\inetpub\wwwroot\poochout\app\views\services\service.ctp
on line 13

I need the help to come out from the error and also to complete this
HABTM process.

Thanks in advance.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: All about HABTM

2007-11-19 Thread smilin

Guru's

I am hopefully waiting for the replies.Please help this newbie.

Thanks.

On Nov 19, 2:58 pm, smilin <[EMAIL PROTECTED]> wrote:
> Now only i am entering into the cakephp and i am using the version
> 1.2.
>
> I had three sets of check box.And i need to save that into the
> table,First i think i need to concatenate the data and save it on the
> table then i had get the information from cakephp group that we can
> also use HABTM.I am not aware about this concept.I had go through the
> cakephp manuals on the models.But i cant able to move after a point.
>
> Please help me to come out from this issue.
>
> Till know i had made the below things.
>
> I had create three table.Named as
>
> dog_grouptypes
> dog_sizes
> dog_walkers_paymenttypes
>
> All the three table has the fields id and name.
>
> On app/views/services/service.ctp
>
> 
> 
> DogSizes
> checkboxMultiple('Size.Size', $dog_sizes_list) ?>
> 
> 
> 
> 
> 
> DogGroupTypes
> checkboxMultiple('Group.Group', $dog_grouptypes_list) ?>
> 
> 
> 
> 
> 
> Payments
> checkboxMultiple('Payment.Payment',
> $dog_walkers_paymenttypes_list) ?>
> 
> 
> 
> 
> 
> submit('Save') ?>
> 
> 
>
> And on the app/controllers/services_controller.php
>
> I am not clear what i need to do here.
>
> And i had saved the file habtm.php on app/views/helpers
>
> Now i am getting the error as
>
> Undefined variable: habtm [CORE\app\views\services\service.ctp, line
> 13]
>
> Fatal error: Call to a member function checkboxMultiple() on a non-
> object in C:\inetpub\wwwroot\poochout\app\views\services\service.ctp
> on line 13
>
> I need the help to come out from the error and also to complete this
> HABTM process.
>
> Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: All about HABTM

2007-11-19 Thread smilin

Guru's

I am hopefully waiting for the replies.Please help this newbie.

Thanks.

On Nov 19, 2:58 pm, smilin <[EMAIL PROTECTED]> wrote:
> Now only i am entering into the cakephp and i am using the version
> 1.2.
>
> I had three sets of check box.And i need to save that into the
> table,First i think i need to concatenate the data and save it on the
> table then i had get the information from cakephp group that we can
> also use HABTM.I am not aware about this concept.I had go through the
> cakephp manuals on the models.But i cant able to move after a point.
>
> Please help me to come out from this issue.
>
> Till know i had made the below things.
>
> I had create three table.Named as
>
> dog_grouptypes
> dog_sizes
> dog_walkers_paymenttypes
>
> All the three table has the fields id and name.
>
> On app/views/services/service.ctp
>
> 
> 
> DogSizes
> checkboxMultiple('Size.Size', $dog_sizes_list) ?>
> 
> 
> 
> 
> 
> DogGroupTypes
> checkboxMultiple('Group.Group', $dog_grouptypes_list) ?>
> 
> 
> 
> 
> 
> Payments
> checkboxMultiple('Payment.Payment',
> $dog_walkers_paymenttypes_list) ?>
> 
> 
> 
> 
> 
> submit('Save') ?>
> 
> 
>
> And on the app/controllers/services_controller.php
>
> I am not clear what i need to do here.
>
> And i had saved the file habtm.php on app/views/helpers
>
> Now i am getting the error as
>
> Undefined variable: habtm [CORE\app\views\services\service.ctp, line
> 13]
>
> Fatal error: Call to a member function checkboxMultiple() on a non-
> object in C:\inetpub\wwwroot\poochout\app\views\services\service.ctp
> on line 13
>
> I need the help to come out from the error and also to complete this
> HABTM process.
>
> Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: All about HABTM

2007-11-19 Thread smilin

Guru's

I am hopefully waiting for the replies.Please help this newbie.

Thanks.

On Nov 19, 2:58 pm, smilin <[EMAIL PROTECTED]> wrote:
> Now only i am entering into the cakephp and i am using the version
> 1.2.
>
> I had three sets of check box.And i need to save that into the
> table,First i think i need to concatenate the data and save it on the
> table then i had get the information from cakephp group that we can
> also use HABTM.I am not aware about this concept.I had go through the
> cakephp manuals on the models.But i cant able to move after a point.
>
> Please help me to come out from this issue.
>
> Till know i had made the below things.
>
> I had create three table.Named as
>
> dog_grouptypes
> dog_sizes
> dog_walkers_paymenttypes
>
> All the three table has the fields id and name.
>
> On app/views/services/service.ctp
>
> 
> 
> DogSizes
> checkboxMultiple('Size.Size', $dog_sizes_list) ?>
> 
> 
> 
> 
> 
> DogGroupTypes
> checkboxMultiple('Group.Group', $dog_grouptypes_list) ?>
> 
> 
> 
> 
> 
> Payments
> checkboxMultiple('Payment.Payment',
> $dog_walkers_paymenttypes_list) ?>
> 
> 
> 
> 
> 
> submit('Save') ?>
> 
> 
>
> And on the app/controllers/services_controller.php
>
> I am not clear what i need to do here.
>
> And i had saved the file habtm.php on app/views/helpers
>
> Now i am getting the error as
>
> Undefined variable: habtm [CORE\app\views\services\service.ctp, line
> 13]
>
> Fatal error: Call to a member function checkboxMultiple() on a non-
> object in C:\inetpub\wwwroot\poochout\app\views\services\service.ctp
> on line 13
>
> I need the help to come out from the error and also to complete this
> HABTM process.
>
> Thanks in advance.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Newbie: how to access to the first page controller?

2007-11-19 Thread powtac

Thanks!

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Bake suggestion

2007-11-19 Thread RichardAtHome

Thanks for the feedback folks :-)

I've finished with the baking part for now, I'll try your suggestions
on the next project.

On Nov 18, 3:52 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I create two solutions:
> 1. autobake model with all associations included automatically
> and
> 2. shell script that genereate list of commands like
> ...
> cake bake model A1 auto
> cake bake model A2 auto
> cake bake model A3 auto
> ...
> cake bake controller A1s scaffold
> cake bake view A1s scaffold
> ...
>
> I will share second script in blog cakeexlorer.wordpress.com but 1st
> solution require changes in /cake/console classes. This mean that i
> need support it for working on edge. So i can't share this solution
> with guaranties of support.
>
> Main prob
>
> On Nov 17, 2:11 pm, RichardAtHome <[EMAIL PROTECTED]> wrote:
>
> > I'm posting this here to get some feedback from the community before I
> > post a ticket:
>
> > Bake is great! but for me it's missing a critical bit of
> > functionality: A 'Bake All'
>
> > My current project has about 30 tables in. During the development
> > stage I've been customising the bake view templates to give my app the
> > look and feel we are after.
>
> > When it comes to baking the app, I have to run the bake script 60
> > times to build the app (30 for the controllers, 30 for the views). You
> > can guess how tedious this becomes during the course of a day...
>
> > Each time I bake the controllers I answer the questions identically
> > and same for the views.
>
> > Is there a way to get bake the whole app automatically? I've tried
> > writing DOS batch scripts (remember those?) but I can't seem to get it
> > to autofill the yes/no answers...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Sad Question

2007-11-19 Thread RichardAtHome

"Apache on Windows does not work"

I've been developing WAMP sites for a looong time with no problems.

I think the rumour started because Apache on windows is not
'officially' supported.

On Nov 19, 6:07 am, "Wayne Fay" <[EMAIL PROTECTED]> wrote:
> Sorry for the confusion, I was really responding to the original post,
> specifically:
>
> > So, the question:
> > Since I have followed every single tutorial I could find on the web
> > about installing Cake on IIS for the last 3 days (this includes me
> > testing if I could just put Apache on Windows which does not work) I
> > really have no other choice but to switch frameworks.
>
> And I'm just replying to let Christopher know that Windows + Apache +
> Mysql + PHP + Cake works great/fine for me and many others. I'm
> curious why he says "Apache on Windows does not work"...
>
> Wayn
>
> On 11/17/07, Baz <[EMAIL PROTECTED]> wrote:
>
> > I assumed he was trying to use PHP under IIS.
>
> > On Nov 17, 2007 5:06 PM, Wayne Fay <[EMAIL PROTECTED]> wrote:
>
> > > I run Apache plus Cake and Mysql on Windows all the time. And servers
> > > are generally Apache on Linux. I change the config file at the start
> > > of a new project, sync the rest over during development, and
> > > everything just works.
>
> > > Wayne
>
> > > On 11/17/07, Baz <[EMAIL PROTECTED]> wrote:
> > > > I say slap WAMP on there and call it a day :D.
>
> > > > Sorry dude, it does suck.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Newbie: how to access to the first page controller?

2007-11-19 Thread Indian Baker

To access the homepage.
Create a controller called pages_controller in your controller folder.
and for the views create file in  views/pages/display.ctp

Hope that helps
Vinci



On Nov 19, 9:50 am, Grant Cox <[EMAIL PROTECTED]> wrote:
> Edit your /app/config/routes.php, you will see a line like:
>
> Router::connect('/', array('controller' => 'pages', 'action' =>
> 'display', 'home'));
>
> This means that an empty request is going to the PagesController,
> action "display" with the parameter "home.  So the same as calling /
> pages/display/home (try it, you'll see it shows the same page).
>
> You could copy the PagesController from /cake/libs/controller/
> pages_controller.php to /app/controllers/pages_controller.php and then
> edit it.  But it is probably best to just modify the route in /app/
> config/routes.php to point to whichever controller / action you want
> it to.
>
> On Nov 19, 1:50 pm, powtac <[EMAIL PROTECTED]> wrote:
>
> > How can I set up a controller which is called in the webroot, for
> > examplehttp://www.example.com. Wich controller is called there?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: Error on the Method input() and data insert

2007-11-19 Thread smilin

Thanks francky,

I had come out from this issue by following your reply.This kind of
explanation with code is very easy for the newbies like us to move
forward.



On Nov 14, 4:10 pm, francky06l <[EMAIL PROTECTED]> wrote:
> Use form helper instead of html, your view could be :
>
> Add Member
> create('member', array('action' => 'add')); ?>
> 
> Email:
> input('email', array('size' => '40'))?>
> 
> 
> submit('Save') ?>
> 
> 
>
> hope this helps
>
> On Nov 14, 8:01 am, "Seenu V" <[EMAIL PROTECTED]> wrote:
>
> > I am a newbie to cakephp.Today i downloaded the 1.2 pre_beta version
> > and the i had add a add page.
>
> > Add Member
> > 
> > 
> > Email:
> > input('Member/email', array('size' => '40'))?>
> > 
> > 
> > submit('Save') ?>
> > 
> > 
>
> > On the controller i had create a file named members_controller.php and
> > add the below coding.
>
> > 
> > class MembersController extends AppController
> > {
> > var $name = 'members';
>
> >  function index() {
> >}
>
> >  function add()
> > {
> > if (!empty($this->data))
> > {
> > if ($this->Member->save($this->data))
> > {
> > $this->flash('Member added.','/members');
> > }
> > }
> > }}
>
> > I had followed the same method of blogs turorials.
>
> > When i reach to this page i am getting the error as below and at the
> > same time when i try to add the email address its not adding into the
> > table.Help me to come out from this issue and also how to add the data
> > into the table.Please do me this favour with a example.
>
> > Notice: Method input() is deprecated in HtmlHelper: see
> > FormHelper::input or FormHelper::text in
> > C:\inetpub\wwwroot\poochout\cake\libs\view\helpers\html.php on line
> > 652
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



All about HABTM

2007-11-19 Thread smilin



Now only i am entering into the cakephp and i am using the version
1.2.

I had three sets of check box.And i need to save that into the
table,First i think i need to concatenate the data and save it on the
table then i had get the information from cakephp group that we can
also use HABTM.I am not aware about this concept.I had go through the
cakephp manuals on the models.But i cant able to move after a point.

Please help me to come out from this issue.

Till know i had made the below things.

I had create three table.Named as

dog_grouptypes
dog_sizes
dog_walkers_paymenttypes

All the three table has the fields id and name.

On app/views/services/service.ctp



DogSizes
checkboxMultiple('Size.Size', $dog_sizes_list) ?>





DogGroupTypes
checkboxMultiple('Group.Group', $dog_grouptypes_list) ?>





Payments
checkboxMultiple('Payment.Payment',
$dog_walkers_paymenttypes_list) ?>





submit('Save') ?>



And on the app/controllers/services_controller.php

I am not clear what i need to do here.

And i had saved the file habtm.php on app/views/helpers

Now i am getting the error as

Undefined variable: habtm [CORE\app\views\services\service.ctp, line
13]

Fatal error: Call to a member function checkboxMultiple() on a non-
object in C:\inetpub\wwwroot\poochout\app\views\services\service.ctp
on line 13

I need the help to come out from the error and also to complete this
HABTM process.

Thanks in advance.




--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: ajaxHelper::observeField - observes text field onBlur, not onChange

2007-11-19 Thread senser

Hello Lamiunto!

I've tried several values for frequency but no success :(. I always
use option "frequency", because I've read that it's obligatory for IE
to work with ajax::observeField.


On Nov 19, 8:23 am, Lamiunto <[EMAIL PROTECTED]> wrote:
> Well, according to the Cake 1.1 API, the observeField function has got
> an array for options, one of those options is "frequency", now that is
> "The frequency (in seconds) at which changes to this field will be
> detected."
>
> I haven't tested this yet, but have you tried setting frequency to say
> something like 1 second and see what happens?
>
> API 
> Doc:http://api.cakephp.org/class_ajax_helper.html#9fbc7425eafefd3e2745c8f...
>
> On Nov 19, 3:32 pm, senser <[EMAIL PROTECTED]> wrote:
>
> > Actually the question stands: "how to trigger observeField on upkey
> > even"? I found an external JS librarywww.extjs.comwhichhandles this
> > event nut I'm not sure that's the right way for handle this 
>
> > On Nov 18, 11:14 pm, maschoen <[EMAIL PROTECTED]> wrote:
>
> > > My recent experience is that you want to trigger on the upkey event.
> > > Ignore the event structure itself.   Go to the field and read its
> > > value.
> > > If you look on the downkey, the value hasn't been updated yet.
>
> > > On Nov 17, 6:03 am, senser <[EMAIL PROTECTED]> wrote:
>
> > > > I can't understand why every time I start a new discussion here
> > > > (writing the first post) the post is submiited twice. That happens
> > > > every time and I press "Submit" button just once ..
>
> > > > On Nov 17, 1:00 pm, senser <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi,
> > > > > I have a form where users must select from over 11000 records in
> > > > > list_box. I'm using ajax to observe text field and update select to
> > > > > reduce high load when loading page (If I populate list box with 11K
> > > > > records page renders very slow).
> > > > > So the problem is that $ajax->observeField() triggers not on typing in
> > > > > text field, but when the field lost focus. In other words - it works
> > > > > on javascript "onBlur" event, not on "onChange".
> > > > > Is there a way to populate my list_box when user is typing in text_box
> > > > > and is not necessary to press TAB, or to click somewhere with mouse .
> > > > > Here is snippet from my view (I don't think there is a problem in
> > > > > controller or model code, because if the text_field lost focus all is
> > > > > fine and working)
>
> > > > > print $form->input('Employer.string', array('type'=>'text',
> > > > > 'maxlength'=>'5', 'size'=>'10', 'id'=>'employer_string',
> > > > > 'label'=>'Employer'));
>
> > > > > print ' > > > > span>';
>
> > > > > print $form->input('CustomerTaxDetail.employer_id',
> > > > > array('type'=>'select', 'label'=>'', 'options'=>$employersArray,
> > > > > 'showEmpty'=>false, 'size'=>4,
> > > > > 'id'=>'employers',   
> > > > > 'error'=>array('required'=>'Employer is
> > > > > obligatory', 'maxlength'=>'Employer code max length is 8 symbols',
> > > > > 'number'=>'Employer code must be a number')));
>
> > > > > print $ajax->observeField('employer_string', array('url'=>'/employers/
> > > > > autocomplete', 'update'=>'employers', 'indicator'=>'ajax_indicator',
> > > > > 'onChange'=>true));
>
> > > > > P.S. Even when I write something like this:
> > > > > print $form->input('Employer.string', array('type'=>'text',
> > > > > 'maxlength'=>'5', 'size'=>'10', 'id'=>'employer_string',
> > > > > 'label'=>'Employer', 'onChange'=>'window.alert(\'CHANGE\')'));
> > > > > nothing happens when typing in text box
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



fantays sports page components

2007-11-19 Thread deepz

are there any fantasy sportspage or my stats components available in
cake php??

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---