Hi Grant,

You should not be calling render in your view. To make reusable bits of
code, you /should/ make use of elements. I don“t quite follow what you
mean about multiple calls to renderElement, surely the element in this
context would contain either the form or the table, so at most there
would be 2 elements. Also, generally speaking, it's a bad idea to
specify ajax in a render call in a controller ($this->render(x,
'ajax');) That's what the request handler does for you automatically -
if someone accesses the url for your ajaxed controller action directly
(or doesn't have js enabled) they are not going to see a layout if you
hard code to use the ajax layout.

A different way of thinking would be to replace your $this->render in
your view with echo $ths->requestAction(UrlToDisplayResults); and
remove all controller logic for creating the table data from your
bureauPage action/controller.

The examples below might help (or perhaps some of the other
permutations):
http://www.noswad.me.uk/Pagination/Form
http://www.noswad.me.uk/Pagination/PRG/Ajaxed

You can get the source from the demos tab, note that for the second
example the view does not make use of elements but it should (in
keeping with what I said above).

Anyway, HTH or at least gives something to think about.

AD7six
Please note:
The manual/bakery is a good place to start any quest for info.
The cake search (at the time of writing) erroneously reports less/no
results for the google group.
The wiki may contain incorrect info - read at your own risk (it's
mainly user submitted) :) You may get your answer quicker by asking on
the IRC Channel (you can access it with just a browser
here:http://irc.cakephp.org).


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"Cake PHP" group.
To post to this group, send email to [email protected]
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