Re: radio button

2007-07-18 Thread Laburno
Hi again! I was trying, just for learning purpose, to make the form work with ajax. The idea is to update a div with different search results from the database. This is in my view: A B C submit('Search', array('url' => 'search', 'update'=>'results')); ?> And this is the action Search, in the

Re: Why does $form->:input("id") set the field as hidden?

2007-07-18 Thread AD7six
On Jul 19, 7:24 am, gmarziou <[EMAIL PROTECTED]> wrote: > Hello, > > In 1.2, I tried this: > > input('id');?> > > It generates a *hidden* input field when the filed is the primary key: > > id="PlayerId" /> > > Looking at FormHelper::input() code it is obviously done on purpose >

Re: bindmodel and the paginator not working / trac ticket 2201

2007-07-18 Thread AD7six
On Jul 19, 6:17 am, phpjoy <[EMAIL PROTECTED]> wrote: > nobody has an idea how to make the pagination work with bindmodel > instead of static models? You use the second parameter in bindModel to make the new association persist. Like what gwoo and phpNut said in the ticket comments. AD --~--

Re: RenderElement from within Helper

2007-07-18 Thread AD7six
On Jul 18, 10:41 pm, rtconner <[EMAIL PROTECTED]> wrote: > Anyone know of any trixie ways to render an element from within a > helper? see the helper code here: http://snook.ca/archives/cakephp/elemental_conditional_content_with_cakephp/ hth, AD --~--~-~--~~~---~

Re: Why does $form->:input("id") set the field as hidden?

2007-07-18 Thread Dr. Tarique Sani
On 7/19/07, gmarziou <[EMAIL PROTECTED]> wrote: > > > Hello, > > In 1.2, I tried this: > > input('id');?> > > It generates a *hidden* input field when the filed is the primary key: Thats because it is presumed that most people will use it as hidden (and probably do) Try input('id', array

Why does $form->:input("id") set the field as hidden?

2007-07-18 Thread gmarziou
Hello, In 1.2, I tried this: input('id');?> It generates a *hidden* input field when the filed is the primary key: Looking at FormHelper::input() code it is obviously done on purpose but there's no comment indicating why. This forces us to name the field differently and and w

Re: Newbie question: how to save a HABTM association

2007-07-18 Thread Langdon Stevenson
Hi bingomanatee This topic is covered in the manual, and extensively in this group's archive. I have just had to refresh myself today on how it all work to change some code. So, have a look through the HABTM section of the Manual, then search the group and I am sure you will get your answers

Problem:when using more than one submit button in ajax helper's form

2007-07-18 Thread pravi
form('editTest','',array('name'=>'editForm','update'=>'editBar')) ; ?> When I submit this form using either Edit or Remove Button ,I get the output of $this->params['form'] as Array ( [id] => 1 [edit] => Edit [remov

Re: Associations without foreignKey?

2007-07-18 Thread lamacq
I got this to work and am posting here in case anybody has the same issue in the future. I noticed that Model::findAll defines a $queryData array with a 'joins' element, although it always sets this element to an empty array(). So I added a beforeFind() filter in my model that simply adds the pro

Re: Returning Value from a Controller

2007-07-18 Thread pravi
Thanks Geoff ,Let me try with this.. --~--~-~--~~~---~--~~ 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 [EM

Re: About the Blog tutorial

2007-07-18 Thread beetlecube
Great, thanks a lot Geoff Thanks for the info on your solid blog as well. On Jul 17, 10:15 pm, Geoff Ford <[EMAIL PROTECTED]> wrote: > The way I usually do this is i only have an edit function. If there > is an $id parameter then I will set $this->data which will fill the > form, otherwise the f

Re: bindmodel and the paginator not working / trac ticket 2201

2007-07-18 Thread phpjoy
nobody has an idea how to make the pagination work with bindmodel instead of static models? On Jul 18, 12:06 am, phpjoy <[EMAIL PROTECTED]> wrote: > https://trac.cakephp.org/ticket/2201 > > regarding this trac ticket: > Controller::paginate() bug with un/binding [patch included] > > it's not a bu

Re: Create calendar component

2007-07-18 Thread citBolon
Thanks for your help, it's very useful.. I have the code in http://bin.cakephp.org/view/1454174569, the cuestion is: I need to declare the method startup? cause this method cause error: Warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "startup" at character 1 i

RE: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Mariano Iglesias
The author of the article gets an email with the comments we send from the bakery. Also the process of submission is explained on the bakery guidelines. However the issue preventing from publishing most pending articles is a more basic break of guideline rules. For example, one statement in the b

Re: Associations without foreignKey?

2007-07-18 Thread lamacq
I got this to work and am posting here in case anybody has the same issue in the future. I noticed that Model::findAll defines a $queryData array with a 'joins' element, although it always sets this element to an empty array(). So I added a beforeFind() filter in my model that simply adds the pro

Bakery and etc (Was Re: Bakery Article : How to use ACL in 1.2.x)

2007-07-18 Thread R. Rajesh Jeba Anbiah
On Jul 18, 6:13 pm, "Chris Hartjes" <[EMAIL PROTECTED]> wrote: > On 7/18/07, Pillow <[EMAIL PROTECTED]> wrote: > > On 13 Lip, 16:16, Ketan Patel <[EMAIL PROTECTED]> wrote: > > > I have written an article in Bakery on how to use Acl. The url > > > ishttp://bakery.cakephp.org/articles/view/how-to-u

Re: hasAndBelongsToMany - Get Posts which belongs to a Tag and get all Tags that belongs to the corresponding Posts.

2007-07-18 Thread Grapetonic
I read the posts rtconner linked to and followed AD7six's advice: http://groups.google.com/group/cake-php/browse_thread/thread/f23b1825050ad543/014092749592de70 The tagging feature I'm working on for my application is pretty advanced and I think I'm over my head with this one but it's progressing

execute setAction for action in a different controller

2007-07-18 Thread tyhilltx
Hi Bakers! I'm trying to call the action, miniView, in my UsersController FROM the beforeFilter() action in my FormsController. Here is the code I'm calling the action with: Controller::setAction('/users/miniView/' . $sess_user['User']['id']); I get: Warning: call_user_func_array() [function.c

Re: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Samuel DeVore
On 7/18/07, Mariano Iglesias <[EMAIL PROTECTED]> wrote: > > I constantly go through the pending list, and add comments to the articles > that are not yet published, explaining what needs to be changed. > > Very rarely the writer on the other side actually responds or does the > requested changes.

RE: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Mariano Iglesias
I constantly go through the pending list, and add comments to the articles that are not yet published, explaining what needs to be changed. Very rarely the writer on the other side actually responds or does the requested changes. And most of those changes are the result of not following The Baker

Re: Validation

2007-07-18 Thread citrus
I also use Cake 1.2.0.5427alpha. My password validation doesn't work, either. Even if I try the simplest rule ever: VALID_NOT_EMPTY. No error message is fired when I leave the password field blank. On Jul 18, 4:58 pm, pihentagy <[EMAIL PROTECTED]> wrote: > Hi! > > I've validation rules in my mod

RenderElement from within Helper

2007-07-18 Thread rtconner
Anyone know of any trixie ways to render an element from within a helper? I'd just really much rather keep my html for my complex helpers inside and element over perhaps writing a bunch of html in a helper file. I mean this is a lot of html.. like two pages.. --~--~-~--~~---

Re: deprecated plugin loading functions?

2007-07-18 Thread Geoff Ford
Looking at loadModel() you can specify plugins with loadModel('PluginName.modelName'); I expect all the others are the same. Geoff -- http://lemoncake.wordpress.com On Jul 19, 9:37 am, misja <[EMAIL PROTECTED]> wrote: > I noticed that all plugin related loading functions in cake/basics.php > (

Re: deprecated plugin loading functions?

2007-07-18 Thread misja
> Looking at loadModel() you can specify plugins with > > loadModel('PluginName.modelName'); > > I expect all the others are the same. Ah, right you are, I had overlooked those - thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed t

deprecated plugin loading functions?

2007-07-18 Thread misja
I noticed that all plugin related loading functions in cake/basics.php (1.2 branch) are marked as deprecated. This includes functions like loadPluginModels(), loadPluginController() and loadPluginComponent(). It would be great if someone could shed a little light on what can be expected in future

Re: cacheing a dynamic menu

2007-07-18 Thread Geoff Ford
Caching in general will only work with DEBUG set to 0. On 7/19/07, Ski <[EMAIL PROTECTED]> wrote: > > > Hi, > > Sorry, I lied about element caching - the number of queries went > down, but it was not because of the element cache - this is 1.2 I > guess... > > Still looking if anyone else kno

Re: controller variable not being set

2007-07-18 Thread Walker Hamilton
I don't know why you're requesting an action from beforeFilter. If you request mini_view in the URL, the beforeFilter will run & then miniView will run (if the redirect doesn't occur). Alsoin 1.2 y (I have no clue about 1.1) you can make your redirect statements all one line: $this->redirec

Re: paginator sort options

2007-07-18 Thread Mech7
I am wondering if there is anything to sort asc /desc depending on which state they are.. for example they are sorted ASC, click the title and they are sorted DESC.. click them again and they turn ASC again.. right now i use this: link('Id', '?sort=id&direction=desc'); ?> But it is not very flex

Error con memcache

2007-07-18 Thread citBolon
Si alguno conoce el componente memcache probablemente me pueda ayudar. El error que obtengo es el siguiente: Fatal error: Call to a member function get() on a non-object in /var/ www/sn_bra_13_07_07-clean/app/views/helpers/memcache.php on line 31... El codigo de mi script esta en: http://bin.cake

Re: View this page "Create an interactive production wiki using PHP: IBM D

2007-07-18 Thread margin
Update: I downloaded the source code and uploaded a complete zip: http://download.yousendit.com/BE0382DB2EB95D0F --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email

Re: cacheing a dynamic menu

2007-07-18 Thread Ski
Hi, Sorry, I lied about element caching - the number of queries went down, but it was not because of the element cache - this is 1.2 I guess... Still looking if anyone else knows.. Glen On Jul 18, 3:18 pm, Ski <[EMAIL PROTECTED]> wrote: > Hi, > > I am using Cake 1.1 at the moment, than

controller variable not being set

2007-07-18 Thread tyhilltx
Hi Bakers! Cake newbie here and I really need some help. I've read the manual and gone through the posts here and I'm just missing something. I have a login element created that is rendered from my default layout. I am calling the element this way: renderElement('login',array("mini_user",$user

Re: Seems like waste of effort to have both ...

2007-07-18 Thread beetlecube
Ok thanks much guys. On Jul 18, 6:14 am, MattC <[EMAIL PROTECTED]> wrote: > I've always just gone with an edit action that does both new and > edit. Then I can use the existence/lack of an id to tell them apart. > So on the view I can do: > > if ($this->data['Post']['id']) { > echo 'Edit Post'

Re: cacheing a dynamic menu

2007-07-18 Thread Ski
Hi, I am using Cake 1.1 at the moment, thanks Pablo. Geoff, the element caching works wonderfully thanks. Cheers. Glen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this gr

Re: Associations without foreignKey?

2007-07-18 Thread Chris Hartjes
On 7/17/07, lamacq <[EMAIL PROTECTED]> wrote: > Anybody? Help? How can I do an association without Cake adding a > foreignKey? > Well, the built-in association stuff *needs* foreign keys in order for associations to work. Sort of hard-and-fast rule I guess. You might have to use a custom query

Re: Associations without foreignKey?

2007-07-18 Thread Jon Molesa
I could be wrong, but would $uses not satisfy your requirement? *On Wed, Jul 18, 2007 at 01:21:03PM - lamacq <[EMAIL PROTECTED]> wrote: > From: lamacq <[EMAIL PROTECTED]> > To: Cake PHP > Subject: Re: Associations without foreignKey? > Date: Wed, 18 Jul 2007 13:21:03 - > > > On Jul 17

Newbie question: how to save a HABTM association

2007-07-18 Thread bingomanatee
Simple question: how do you save a HABTM association? do you have to cretae a model for the joining table or can you do if from one of the two related model classes? i.e., if I have a table TableA and a TableB and in TableA's model class I've created a HABTM association through tableC (= tablea_i

Re: View this page "Create an interactive production wiki using PHP: IBM D

2007-07-18 Thread margin
I used my IBM id to download the PDFs. I zipped them and they are available at you send it. http://download.yousendit.com/EF5391DE0F64E999 On Jul 17, 11:59 am, "Christopher E. Franklin, Sr." <[EMAIL PROTECTED]> wrote: > Click > onhttp://groups.google.com/group/cake-php/web/create-an-interactiv

Re: Seems like waste of effort to have both ...

2007-07-18 Thread MattC
I've always just gone with an edit action that does both new and edit. Then I can use the existence/lack of an id to tell them apart. So on the view I can do: if ($this->data['Post']['id']) { echo 'Edit Post'; } else { echo 'New Post'; } I prefer this to having two views and an element, sin

Re: Associations without foreignKey?

2007-07-18 Thread lamacq
On Jul 17, 8:54 pm, Jon Molesa <[EMAIL PROTECTED]> wrote: > I'd research the model. I believe you'll find just what you're looking > for. Thanks, but I've been over the documentation and read the API (1.2.x.x). I wouldn't have posted here without trying to figure it out for myself first. Can you

test

2007-07-18 Thread cakePHP with Ajax
test --~--~-~--~~~---~--~~ 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,

Populate select box using another select box using Ajax

2007-07-18 Thread cakePHP with Ajax
Hi, I have successfully populated the State/Province select box depends on the Country select box. Now my problem is that when i try to save the State/Province values it gives me null value, end when we view source of this page it does not show the State/Province select box values. Please help me.

Re: View this page "Create an interactive production wiki using PHP: IBM D

2007-07-18 Thread margin
All, I used my IBM ID to download the PDFs. They are available via YouSendIt... http://download.yousendit.com/EF5391DE0F64E999 On Jul 17, 11:59 am, "Christopher E. Franklin, Sr." <[EMAIL PROTECTED]> wrote: > Click > onhttp://groups.google.com/group/cake-php/web/create-an-interactive-pro... >

Re: CakePHP session lost when using Java Applet

2007-07-18 Thread MattC
I had a similar problem using one of the flash uploaders. I can't remember the link at them moment, but I found a comment on some blog post that had a solution that didn't require modifiying any cake files. I'm at work, so I don't have the exact code, but I'm pretty sure it was: Add $this->sessi

Re: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Chris Hartjes
On 7/18/07, Pillow <[EMAIL PROTECTED]> wrote: > > On 13 Lip, 16:16, Ketan Patel <[EMAIL PROTECTED]> wrote: > > I have written an article in Bakery on how to use Acl. The url > > ishttp://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x Guys (and gals), There is usually a reason why an a

Structuring and modelling applications and just understanding the workings of cakePHP

2007-07-18 Thread DrLaban
Hello there! So I've started to get the hang of how the models, controllers and views work together. It was a bit of an uphill to start with but I've managed to create quite a few good, sound working sections in cakePHP which makes me think that I at least have some knowledge about how things sho

Re: A bit of a problem with forms and JavaScript

2007-07-18 Thread DrLaban
This worked perfectly! Thanks alot for your comment! Regards DrLaban On Jul 16, 8:22 am, wralph <[EMAIL PROTECTED]> wrote: > Use the ID, so if you have a textarea with ID of ModelField, then > access using: > > document.getElementById('ModelField').value = 'whatever value you wish > to assign'

Re: Problem after upgrade

2007-07-18 Thread [EMAIL PROTECTED]
Have you possible created a SetModel? I got similar messages concerning "File:$tabel" and this seemed to be caused be an own FileController that I had created before. After changing the Model and Controller names, the message disappeared. Best - Jérôme --~--~-~--~~~-

Validation

2007-07-18 Thread pihentagy
Hi! I've validation rules in my model: var $validate = array( 'p4ssword' => array( 'length' => array('rule'=>array('minLength',8)), 'forbidden'=>array('rule'=>'notForbiddenPwd'), 'similar'=>array('rul

Re: Error during the Blog example after adding the Validation part

2007-07-18 Thread pihentagy
Validation goes into the model. On Jul 12, 8:50 pm, Victor <[EMAIL PROTECTED]> wrote: > Hi, > > I started the Blog example to learn about the CakePhp framework. It > sounds like a very usefull framework. > Everything was working ok before adding thevalidationpart. After > deleting tehvalidationpa

Re: model validation and error messages in Cake 1.2

2007-07-18 Thread pihentagy
On Jun 12, 3:18 pm, "jitka (poLK)" <[EMAIL PROTECTED]> wrote: > --- want to turn your app to multilanguage one. So you will modify > your model's code, or implement some model's behavior, or customize > some helper, or anything from above WITH i18n of custom > messages... ...or anything else just

Re: Bakery Article : How to use ACL in 1.2.x

2007-07-18 Thread Pillow
On 13 Lip, 16:16, Ketan Patel <[EMAIL PROTECTED]> wrote: > I have written an article in Bakery on how to use Acl. The url > ishttp://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-x > > I don't know whom to contact for getting the article published. But if > some one senior could have a l

Re: Seems like waste of effort to have both ...

2007-07-18 Thread Grant Cox
I personally always have controllers with function add(){ // anything unique for add $this->_addedit(); } function edit( $id ){ // anything unique for edit $this->_addedit( $id ); } function _addedit($id){ // all common add/edit stuff } and similar for my views, I have a add.ctp, edi

Re: Parameters to home index action

2007-07-18 Thread Grant Cox
Put Router::connect('/:username/:controller/:action'); in your app/config/routes.php Then in your controller you can look at $this->params['username'] On Jul 18, 11:59 am, DanielMedia <[EMAIL PROTECTED]> wrote: > Hi all, > > I have a project where I have to provide a user with their own > cu