Re: controller calling an other controller with an array as parameter

2007-01-07 Thread TJSingleton
Try requestAction($url, $extra) From the Manual: This function calls a controller's action from any location and returns the rendered view. The $url is a Cake URL (/controllername/actionname/params). If the $extra array includes a 'return' key, AutoRender is automatically set to true for the c

Re: Preloading a div with AJAX

2007-01-05 Thread TJSingleton
[EMAIL PROTECTED] wrote: Makes sense, but now I'm having the issue that the controller for the div is different than the one for the main page, so it gives a can't find controller error, any idea how to get around this? Are you using requestAction() ? http://manual.cakephp.org/chapter/contro

Re: several "$content_for_layout"?

2007-01-03 Thread TJSingleton
As aforementioned, more info is really needed. But I think you will only need one layout, you can use two views. One with two columns and one with three. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" g

Re: Can CakePHP do this? - Two

2007-01-03 Thread TJSingleton
In actual, we can't get the desired output since we can't do the sequential outputs, call pass(). ok, so is this what you mean? VIEW Header 1: Fruits are here. "; } ?> Header 2: Animals are here. "; } ?> Header 3: Colors are here. "; } ?> CONTROLLER: set('fruits', $this->Test->myfunctio

Re: Can't we use $this->set in a loop?

2007-01-03 Thread TJSingleton
You could just move the whole loop to the view and pass the array from the controller to it. I guess it really just depends on what you mean by "on the fly". When I get a chance I'll update my example in the other thread to produce your desired output. On Jan 3, 12:02 pm, "skyblueink" <[EMAIL PR

Re: Can CakePHP do this? - Two

2007-01-03 Thread TJSingleton
This gives the desired output, but I'm not sure how your doing your sequential outputs, or how you are calling pass. VIEW: "; } ?> CONTROLLER: set('results', $this->Test->myfunction($i)); $i += -1; switch($i) { case 0: $heading = 'Header 1: Fruits are here. ';

Re: File upload with AJAX

2007-01-03 Thread TJSingleton
Ámon Tamás wrote: There is any way in cake php for ajax file uploading? Check out: http://www.thinkingphp.org/2006/04/27/an-ajax-file-upload-progressbar/ http://thinkingphp.org/demos/cake-timer/ I like to make a form where I have a file uploading field. If upload a file I like to put the im

Re: How to do arguments before Controller/Action in a URL?

2007-01-02 Thread TJSingleton
In the 1.2 you could do: Router::connect('/(.*)/posts/view', array('controller' => 'posts', 'action' => 'view', '$1')); but, I don't think it will work in 1.1. You could use mod_rewrite though. -- TJ Singleton --~--~-~--~~~---~--~~ You received this message

Re: Can CakePHP do this? - Two

2007-01-02 Thread TJSingleton
skyblueink wrote: Without using CakePHP or any other MVC framework, I would have codedlike the following: Can you give me an example of the final output you'd like it to achieve? -- TJ Singleton --~--~-~--~~~---~--~~ You received this message because you a

Re: Can CakePHP do this? - Two

2007-01-02 Thread TJSingleton
skyblueink wrote: I want to show progress indicator to the user of my program for each run of $i for loop of pass(). The pass() function could be modified like the following(see below), but it does not give the expected results since $message and $result are overwritten repeatedly. This time I

Re: "direct" data access?

2007-01-02 Thread TJSingleton
I think we are going to have some database access needs that may not be easy to express using Cake's ActiveRecord, so we are trying to figure out how to still have our models access the database using Cake classes instead of interjecting our own connection managment code, etc. What kind of fun

Re: How to fillup a transaction table.

2007-01-02 Thread TJSingleton
sumanpaul wrote: now question is : after adding the user successfully in the user table how to insert data in the transaction table. I figured out we can get the last inserted id by using getLastInsertID(). You're on the right track with the getLastInsertID(). Here is a generic add code fro

Re: proper mvc way to validate 2 forms belonging to the same model

2007-01-02 Thread TJSingleton
gabordemeter wrote: And the validation rule which makes sure that the respective email is not already in the db fires and invalidates the email field. As the email address is of course in the db (the user already signed up), I would like to be able to remove this validation rule if the submitted