i have model Document hasMany Page
i have a controller called document_page_controller.php
(pages_controller does already exists!)
when i call the action show everything is fine i get an array with
$data['Page'] and $data['Document'];
function show($id)
{
$data = $this->Page->findById($id);
$this->set("data", $data);
}
when i call edit function everything works fine too. but after i call
$this->Page->save($this->data) i want to go back to show function.
$this->Session->setFlash("Saved", "flash_success");
$this->show($pageId);
$this->render("show");
but now i dont have any data in $data in show view. i see Page and
Document array but all fields have a NULL value. the fields i have
edited have the right value. i need the [Document][id] in show
function
i have already tried to call $this->Page->create(); $this->Page->id =
null and so on. nothing works.
when i open the show view again directly without the edit everything
is working fine again.
thanks for your help!
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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment