I am facing the same issue, did you find a solution to your problem ?
Thanks
On Sep 30, 5:53 pm, "francky06l" <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I have a small problem but can't figure out what I am doing wrong.
> First I have created an Element that call a controllers using
> RequestAction :
>
> --------- Element code ------------
> <?php $val = $this->requestAction('/subscribers/getOrganizationName/'.
> $subId);
> $this->log("In element = ".$val);
> echo $val;
> ?>
>
> ---------- The controller method -----------------------
> function getOrganizationName($subId)
> {
> $this->autoRender = false;
> $data = $this->Subscriber->read(null, $subId);
>
> if(!empty($data))
> {
> return $data['Subscriber']['organization'];
> }
>
> return 'Unknowned';
> }
>
> Actually I call thisrenderElementin a view that is updating aDiv
> usingAjax
> This view is updating 2div'salready updated by another call to a
> submit form ..
>
> -------- the view ------------------------ (a part of it)
> <?phpajax->div("first_div");
> echo $this->renderElement('organization_namefromsub', array(
> 'subId' =>
> $output['subscriber_id']));ajax->divEnd("first_div");ajax->div("second_div");
> echo $this->renderElement('organization_namefromsub', array(
> 'subId' =>
> $output['subscriber_id']));ajax->divEnd("second_div");
>
> WHat is strange is that the firstdivis correct, the second get the
> correct values from the elements but comes up with some warning that
> screw up the screen :
>
> Warning: session_start() [function.session-start]: Cannot send session
> cookie - headers already sent by (output started at
> c:\EasyPHP\www\cake\appb\views\applications\selectprod.thtml:5) in
> c:\EasyPHP\www\cake\cake\libs\session.php on line 131
>
> I think I can find a solution, it seems that because thedivhave been
> updated already by another call toajax->submit( ..
> update->array("first_div", "second_div") .. This submit actually render
> another view that contains again the 2 divs ..
> It seems that because the Element are calling requestAction,somthing is
> wrong..(if I set a fix value in the Element instead of the
> requestAction, everything is ok..
>
> If someone has faced this problem, maybe just a parameter in the
> RequesAction into the Element ?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---