Well I have pagination working both with and without ajax. And I do
use elements for the two different tables.
The problem is URLs and figuring out what to render - this can't be
impossible with Cake 1.2 - too many websites do this very simple
thing.
I build an action "showall" in controller Tasks, and the action runs
paginate on both Tasks and People and passes the results to the view.
The view sequentially renders each element:
<div id="Tasks">
<?php echo $this->renderElement('taskselement'); ?>
</div>
<br /><br /><br />
<div id="People">
<?php echo $this->renderElement('peopleelement'); ?>
</div>
Each element then draws the table and puts out pagination options next
and prev with "url" => passedArgs.
Invoication of http://www.mysite.com/people/showall shows the tables
but the pagination options are incorrect on one of the tables (the
count is wrong in pagination->numbers) and the links in both tables
point to /people/showall
I've tried it with Ajax but cannot seem to get the links right or the
routing.
What I want is when a user clicks a link in the People table is for an
ajax request to go to my server and we return the next People page,
and when the user clicks a link in the Tasks table only the Tasks
table is updated. I have other actions that do nothing but get a
people page or get a task page but cannot figure how to hook them up
in this puzzle.
I'm cold against the wall at this point. Perhaps this will require
Ajax and some more complex JScript to make the right thing happen?
If some CakePHP guru has done this already I'm willing to pay for it
at this point.
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 to the Google Groups
"CakePHP" 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