Re: not following naming conventions

2010-11-02 Thread grandioso
It still doesn't show me the error message I set up in the model :( I only get the fail message I specified in the controller. And in addition, it doesn't show the already-posted data, just the clear form which suck really hard. Check out the new CakePHP Questions site http://cakeqs.org and help

Re: not following naming conventions

2010-11-02 Thread euromark
how do you set the error message? you need to show us your controller code for this action otherwise we cannot help you On 2 Nov., 10:34, grandioso something.like.a.phenome...@gmail.com wrote: It still doesn't show me the error message I set up in the model :( I only get the fail message I

Re: not following naming conventions

2010-11-02 Thread cricket
On Tue, Nov 2, 2010 at 5:34 AM, grandioso something.like.a.phenome...@gmail.com wrote: It still doesn't show me the error message I set up in the model :( I only get the fail message I specified in the controller. And in addition, it doesn't show the already-posted data, just the clear form

not following naming conventions

2010-11-01 Thread grandioso
I've encountered a problem. I've created my model, controller and view for my DB table not following the naming convention. I've successfully set the model to use the table, but when I create a form in the view, it is given the wrong action parameter. So how do I set which controller should

Re: not following naming conventions

2010-11-01 Thread Nabil Alsharif
You can set the URL which the form posts to by setting the 'url' option in $form-create(). On 11/01/2010 01:52 PM, grandioso wrote: I've encountered a problem. I've created my model, controller and view for my DB table not following the naming convention. I've successfully set the model to use

Re: not following naming conventions

2010-11-01 Thread grandioso
Is there a way to also set which model should validate the data input by the form ? It seems like it doesn't recognize my model. Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed

Re: not following naming conventions

2010-11-01 Thread Almudena Garcia
Hi, here you can find some information about the validation... http://book.cakephp.org/view/125/Data-Validation http://book.cakephp.org/view/125/Data-Validation 2010/11/1 grandioso something.like.a.phenome...@gmail.com Is there a way to also set which model should validate the data input by

Re: not following naming conventions

2010-11-01 Thread euromark
you can use the dot syntax for other models than the one specific in $this-Form-create(): $this-Form-input('OtherModel.other_model_field'); etc On 1 Nov., 21:19, Almudena Garcia garcia.fra...@gmail.com wrote: Hi, here you can find some information about the validation...

Problem with sql joins in relations when not following cakephp conventions

2010-02-05 Thread doze
Hello, I have following database tables that are defined by the customer and cannot be changed: |---| | Tuopak | |---| | id (primarykey) | | tuopaknro | | name | | | |

Re: Problem with sql joins in relations when not following cakephp conventions

2010-02-05 Thread John Andersen
I would think from what I have studied in the CakePHP manual, that your solution is not easy. One way may be for you to define the joins yourself in the find as specified here: http://book.cakephp.org/view/78/Associations-Linking-Models-Together#Joining-tables-872 Enjoy, John On Feb 5, 3:49 

Re: $form-input() syntax for associations not following Cake conventions

2007-09-20 Thread Martin Schapendonk
2007/9/20, Chris Hartjes [EMAIL PROTECTED]: Really? I just did one with $form-input('fieldname', array('values' = $array)) and it worked just fine. Interesting... Nope, doesn't work. Strange. When I look in cake/libs/view/helpers/form.php, it mentions $options['options'] in several places. I

Re: $form-input() syntax for associations not following Cake conventions

2007-09-20 Thread Chris Hartjes
On 9/20/07, Martin Schapendonk [EMAIL PROTECTED] wrote: Nope, doesn't work. Strange. When I look in cake/libs/view/helpers/form.php, it mentions $options['options'] in several places. I couldn't find any reference to $options['values']. Well, the array I passed in was one I created using

Re: $form-input() syntax for associations not following Cake conventions

2007-09-20 Thread Martin Schapendonk
2007/9/20, Chris Hartjes [EMAIL PROTECTED]: Well, the array I passed in was one I created using generateList() so it had key = value pairs. That might've made the difference. Probably not, because I did also. Controller: $audiences = $this-Activity-Audience-generateList(); View: echo

Re: $form-input() syntax for associations not following Cake conventions

2007-09-20 Thread Chris Hartjes
On 9/20/07, Martin Schapendonk [EMAIL PROTECTED] wrote: 2007/9/20, Chris Hartjes [EMAIL PROTECTED]: Well, the array I passed in was one I created using generateList() so it had key = value pairs. That might've made the difference. Probably not, because I did also. Controller:

Re: $form-input() syntax for associations not following Cake conventions

2007-09-20 Thread Martin Schapendonk
2007/9/20, Chris Hartjes [EMAIL PROTECTED]: Probably not, because I did also. Controller: $audiences = $this-Activity-Audience-generateList(); View: echo $form-input('ade_id', array('options'=$audiences)); $values is the output of generateList() echo $form-input('field', array('label'

Re: $form-input() syntax for associations not following Cake conventions

2007-09-20 Thread Chris Hartjes
On 9/20/07, Martin Schapendonk [EMAIL PROTECTED] wrote: I give up. 'values' doesn't work for me, 'options' does. pr($audiences) shows me a nice key=value array. Hey, I'm not saying you're wrong. I'm just wondering why my method seems to work okay for me, and I'm using the latest

Re: $form-input() syntax for associations not following Cake conventions

2007-09-20 Thread Martin Schapendonk
2007/9/20, Chris Hartjes [EMAIL PROTECTED]: Hey, I'm not saying you're wrong. I'm just wondering why my method seems to work okay for me, and I'm using the latest bleeding-edge version of Cake 1.2.x.x. I just tried bleeding edge Cake (r5676 of the 1.2.x.x branch). Still the same result -

Re: $form-input() syntax for associations not following Cake conventions

2007-09-19 Thread Martin Schapendonk
2007/9/18, Chris Hartjes [EMAIL PROTECTED]: How should I change the call to $form-input() to show a select-list? The list with audiences is available to the view in variable $audiences. Try this code using 1.2.x.x $form-input('ade_id', array('values' = $audiences)); Thanks for pointing

Re: $form-input() syntax for associations not following Cake conventions

2007-09-19 Thread Chris Hartjes
On 9/19/07, Martin Schapendonk [EMAIL PROTECTED] wrote: 2007/9/18, Chris Hartjes [EMAIL PROTECTED]: How should I change the call to $form-input() to show a select-list? The list with audiences is available to the view in variable $audiences. Try this code using 1.2.x.x

$form-input() syntax for associations not following Cake conventions

2007-09-18 Thread Martin Schapendonk
Hi, Using latest cake alpha (r5427). I have an association between two models that doesn't follow Cake conventions (Activity belongsTo Audience and its counterpart Audience hasMany Activity). Cake's convention demands that the association is on Activity.audience_id. In my case, it isn't, it's

Re: $form-input() syntax for associations not following Cake conventions

2007-09-18 Thread Chris Hartjes
On 9/18/07, Martin Schapendonk [EMAIL PROTECTED] wrote: How should I change the call to $form-input() to show a select-list? The list with audiences is available to the view in variable $audiences. Try this code using 1.2.x.x $form-input('ade_id', array('values' = $audiences)); Hope that

Not following the conventions

2006-08-24 Thread eDevil
Hi, I'm trying something different here by not following the conventions because of my very complex requirements. Here's how I want it to work: app/controllers/publisher_controller.php --- class PublisherController extends

Re: Not following the conventions

2006-08-24 Thread Olivier Percebois-Garve
If your only concern is the links, you may attack your problem with the routes. olivvv eDevil wrote: Hi, I'm trying something different here by not following the conventions because of my very complex requirements. Here's how I want it to work: app/controllers/publisher_controller.php

Re: Not following the conventions

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 12:44 PM, eDevil wrote: Hi, I'm trying something different here by not following the conventions because of my very complex requirements. Here's how I want it to work: app/controllers/publisher_controller.php

Re: Not following the conventions

2006-08-24 Thread Mathieu Gagnon
maybe you could keep the conventions while defining a custom route url. eDevil wrote: Hi, I'm trying something different here by not following the conventions because of my very complex requirements. Here's how I want it to work: app/controllers/publisher_controller.php

Re: Not following the conventions

2006-08-24 Thread Pablo Viojo
by not following the conventions because of my very complex requirements. Here's how I want it to work: app/controllers/publisher_controller.php -- - class PublisherController extends AppController { var $name = 'Publisher'; var $uses

Re: Not following the conventions

2006-08-24 Thread eDevil
You might try using routes to play with URLs rather than class names. That's a good idea. Any idea how I might do that? What does your PublisherController look like? What's on line 29? This is my line 29: $this-set('data',$this-Post-findAll());

Re: Not following the conventions

2006-08-24 Thread John David Anderson (_psychic_)
On Aug 24, 2006, at 1:08 PM, eDevil wrote: You might try using routes to play with URLs rather than class names. That's a good idea. Any idea how I might do that? http://manual.cakephp.org/chapter/configuration Section 3: Routes Configuration I'd start there. What does your

Re: Not following the conventions

2006-08-24 Thread AD7six
In a word Routes something like: connect('/publisher/:action', array('controller' = 'publishers', 'action' = 'index')); The error message, if you read it, tells you that it found the object Post, but your object doesn't have the method findAll. To solve that problem read Pablo Viojo's message a

Re: Not following the conventions

2006-08-24 Thread eDevil
Hey guys, I figured it out. The problem was in the view. The thing is that $this-Post-findAll() returns all the values in the table in an array so it must be broken down by using foreach. Here's the view that solved the problem: ?php foreach ($data as $post): ? h2? echo

Re: Not following the conventions

2006-08-24 Thread eDevil
Thanks for your comments. @Pablo Viojo: Oops, cant believe I forgot to type extends AppModel after the model name. Thanks! @John David Anderson: Look at the code of publisher_controller.php on the very first post. I DO have that line in that controller. @AD7six: Now i'm getting a new error: