1. You have several different options. You can use requestAction to call
other controller/action and display the results in the current
view/controller. If you only need the view (not the logic from the
controller/action), you can move the view code to an element, and call the
renderElement function.

2. First thing you should understand, one controller does not have to use
only one model (i.e. MapsController and Map), it can use more than one (i.e.
MapsController using Map and Region), or it can use no model at all.

To define what models available from a certain controller, you can add this
line below:

        var $uses = array('Model1', 'Model2', ...);

in your controller. Also, associated models can be called without being
declared on var $uses. For example, if you have Model1 belongsTo Model2, you
can call Model2 function like this:

        $this->Model1->Model2->save();

-----Original Message-----
From: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Ilafra
Sent: 07 Desember 2006 17:44
To: Cake PHP
Subject: how manage more than one operation in the same view


Hi everyone,

we are two cake beginners!
We have to develop a big web application that uses a mysql database and
a GIS system.
We are using cake to provide an MCV structure to this application.
In this moment we have created the database and bake the application
models, controllers and views.
Afterwards reading the cake documentation we have understood the cake
logic but we have some difficults to figure out some steps.
Particulary we need help about the following matters:
- how to manage more than one operation with the same Model in the same
page (for example, how to call the "add" or "edit" views in the "index"
view not through a link but showing them in the same page).
- how manage several operations with many Models in the same page (for
example we would like a page wherein put the list of Model1, a choice
filled with Model2 and a form to update an item of the Model2).
Your help is very important for us!!
Thanks a lot!!
Francesca and Ilaria




--~--~---------~--~----~------------~-------~--~----~
 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to