Re: Calling custom methods in related models

2010-03-09 Thread mathaios
Ok, I've done some other tests and...I've found the problem. The problem is that I'm stupid. 'className' => 'SisField', should be instead 'className' => 'SiS.SisField', it's even in the manuali do not understand how i could overlook thisi need a vacation! thanks very much to all anyway

Re: Calling custom methods in related models

2010-03-07 Thread mathaios
n for my dumbness but I did not understand what you are asking me to do...in the model hasMany is already var hasMany= > > On Mar 6, 9:02 pm, mathaios wrote: > > > yes Paul this is the problem! > > > $this->SisField->SisQueue->belongsTo does return an empty arra

Re: Calling custom methods in related models

2010-03-06 Thread mathaios
yes Paul this is the problem! $this->SisField->SisQueue->belongsTo does return an empty array instead of the real one. Clearly Cake is auto-creating the model. I have tested all other model related to SisField and none of them is the "real one": all are re-created by Cake. Maybe it's related of t

Re: Calling custom methods in related models

2010-03-05 Thread mathaios
is fine, so the connection between the models are set-up correctly I think! On 4 Mar, 18:58, Andy Dirnberger wrote: > What is the actual name of model2 and what is its filename? If the > file isn't being found, model2 is of type AppModel and not model2, > which would explain why you ca

Calling custom methods in related models

2010-03-04 Thread mathaios
Hallo all bakers! I hope someone can help me... I have two models related trough a "to many-belongs to" relationships. I've set in model2 a method called "put" that do some db manipulation. But when I call the "put" method from the related model1 controller (as $this->model1->model2->put() ) the

save() ignores db warnings ?

2009-10-11 Thread mathaios
I have an ajax actions that saves a model into the db and returns an xml response to the script. After some modifications I wrongly tried to save in a mysql date field a string wrongly formatted. This way I have noticed that doing the usual if($this->model->save()) { success_stuff() }{ failure_st

Re: Auth component loop redirect

2009-10-02 Thread mathaios
gt;Auth->allow($this->action); > > http://thewebandthings.synodicsolutions.com/2009/07/01/increasing-lif... > > Also, you should explicitly set $this->Auth->loginRedirect. > > On Thu, Oct 1, 2009 at 7:27 AM, mathaios wrote: > > > I'm using the Auth component

Re: Auth component loop redirect

2009-10-01 Thread mathaios
Thank you, but I already did that but did not work :-( On 1 Ott, 14:06, Bert Van den Brande wrote: > Add > >     $this->Auth->allow(array('login')); > > to your beforeFilter() > > Friendly greetings, > Bert > > On Thu, Oct 1, 2009 at 1:27

Auth component loop redirect

2009-10-01 Thread mathaios
I'm using the Auth component as the example in the manual, but the log- in form keeps redirecting to himself, and Firefox throws the error "The page isn't redirecting properly". My app controller is: class AppController extends Controller { var $components=array('Auth','RequestHandler')

Multiple check boxes in edit + saveAll question

2009-09-17 Thread mathaios
hi to all cake-lovers, I have two quick questions. :-) What is the correct method to use multiple check boxes in edit forms ? Actually I'm using the following code, which works, but I'm not sure if it's ok to force the "value" paramether: $form->select('fieldName',$checkboxArray,null,array('val

Re: Comment Controller

2007-10-25 Thread mathaios
Hi to hall, I was wondering myself the same exact question! francky could you please better elaborate the part > - render the same view, meaning you have to collect data again and > keep $this->data as I would prefer to avoid using ajax (or better give an alternative method that degrades withou

Re: selecting fields in related models

2006-09-13 Thread mathaios
Thank you very much for your valuable help, I will then investigate bindModel() ! --~--~-~--~~~---~--~~ 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 u

Re: protecting methods in Othauth

2006-09-12 Thread mathaios
hi it's me again ... :-( no matter what I do, with "show/9" in the $othAuthRestrictions array makes all the action restricted, not only the one with param "9". Has someone else been successifully in restricting only some parameters in an action, leaving others unrestricted and available to all? A

Re: selecting fields in related models

2006-09-12 Thread mathaios
Thanks, I knew there were a more elegant way! The only problem with this solution is that specifing the fields in the model the exclusion of the fields is permanent when using associations I think. Many thanks anyway! --~--~-~--~~~---~--~~ You received this mess

Re: selecting fields in related models

2006-09-10 Thread mathaios
sorry to insist, can someone tell me if this is possible using standard cakephp model functions and it's me that's dumb (:-> ) or if it can actually only be done with custom sql. Thank you! --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: very strange and bizzare problem

2006-09-08 Thread mathaios
[EMAIL PROTECTED] wrote: > Delete all files in your tmp/cache/models. Sounds like for some reason > your cache for models is not recreating. If you made a change to the > tables with your debug at 0 you have to clear those out. Although, at > DEBUG > 0 it should have reset them. So, perhaps y

Re: very strange and bizzare problem

2006-09-08 Thread mathaios
sorry for my bad english... with "DEBUG" to 0 some data in the table in the view is not displayed (some table cells are empty). with DEBUG to 1 or more the data is normally displayed in the table cells ("reappears")... I hope this to be a little bit clearer... --~--~-~--~~---

very strange and bizzare problem

2006-09-08 Thread mathaios
Hi to all, I hope very much someone can enlight me on this issue, I'm becoming mad trying to figure out wath is happening. The problem is, in a view generated by the bake script, some data is not visible, but is present in the database. Now, if I set DEBUG from 0 to 1 in core.php the data reappea

selecting fields in related models

2006-09-07 Thread mathaios
Hi to all the bakers... Scenario: model1 hasMany model2 model2 belongsto model1 I need to display a list: I only need to retrieve the following fields: let's say model1.field1, model1.field2 and model2.field1 but using $this->set('results', $this->Model1->findAll(null,array('model1.field','mod

Re: protecting methods in Othauth

2006-09-04 Thread mathaios
Thank you for your reply, I made a typing error in the post. In my files the line is written correctly. Even writing one restriction, es. $othAuthRestrictions = array("show/8"); makes all the "show" parameters protected, not only the "8", I do not understand what I'm missing here, sigh... --~--

Re: Dynamic Navigation Menu

2006-08-14 Thread mathaios
to have contestual menus for different pages (if I understodd correctly wat you need) I suggest to take a look into the css dynamic menu tutorial in the wiki, it give some suggestions on rendering different menus using the same component (I've not tried this yet). Can you explain better the second

protecting methods in Othauth

2006-08-14 Thread mathaios
Greetings all, I'm continuing the exploration of cakephp, this time I'm trying to implement an authentication system. I'm using OthAuth wich I find very good and configurable, it plugged into my existing db user tables nicely. I restricted access to the CAKE_ADMIN path and it works very well, but

Re: css menu from db

2006-07-28 Thread mathaios
AD7six ha scritto: > Yes it probably will - because your nodes controller also includes the > menu component (at a guess), which calls the nodes controller which > calls the menu component... > That is it! I need obviously a vacation...the element was declared globally into appController. I remo

Re: css menu from db

2006-07-28 Thread mathaios
Thank you for your reply. I think the approach the tutorial suggests is the second one: the problem is: the problem is how do I specify the menu array into the component? In the tutorial the array is hard-coded into the component. In order to use the "nodes" controller function that creates the ar

Re: css menu from db

2006-07-28 Thread mathaios
sorry I made a mistake: > I suppose into the > controller's startup function, I made some tries but with no success. should be > I suppose into the > component's (menu.php) startup function, I made some tries but with no > success. --~--~-~--~~~---~--~~ You rec

css menu from db

2006-07-28 Thread mathaios
Hi, started short time ago using cakephp and it looks very promising, I will definitelly stick to it. I've a problem extending the css_menu tutorial. I want the menu to be created dinamically from a db table that holds the site structure. In the controller (nodes) I have a function (get_data) wich