R U solve this problem... It's possible or not.. reply through
email..... [EMAIL PROTECTED] is my id..

On Mar 5, 9:15 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> Im having trouble updating a couple of div's with an update, the form
> changes a date range stored in a session variable, that works, the
> update is called but the view (elements) are not re-rendered properly.
> Here's the code
>
> BTW this function handles receipts by store sales, it shows them by
> date range and sums the total ($) for those receipts.
>
> ** puntos_controller.php **
>
> ...
>
>         function update(){
>
>         if( $this->RequestHandler->isAjax()){ $this->autoRender=false; }
>
>         $fechas = array('min'=>'2007-01-11','max'=>'2007-02-05'); // Test
> dates
>         $this->Session->write('fechas',$fechas);
>         $this->render('view','ajax');
>
>         }
>
>         function view($id = null) {
>
>                 if(!$id) {
>                         $this->Session->setFlash('Invalid id for Punto.');
>                         $this->redirect('/punto/index');
>                 }
>
>                 $this->ImportData->recursive=0;
>                 $this->set('punto', $this->Punto->read(null, $id));
>                 $min = $this->Session->read('fechas.min');
>                 $max = $this->Session->read('fechas.max');
>                 
> $this->set('total',$this->requestAction('/facturas/total/'.$id.'/'.
> $this->Session->read('fechas.min').'/'.$this->Session-
>
> >read('fechas.max')));
>
>                 $conditions = "punto_id = '$id' AND horas_fecha_id IN (select 
> id
> from horas_fechas where fecha >='$min' AND fecha<='$max')";
>
>                 list($order,$limit,$page) = 
> $this->Pagination->init($conditions,null, array('modelClass' =>
>
> 'Factura','sortByClass'=>'Factura','sortBy'=>'id'));
>
>                 $this->Pagination->ajaxDivUpdate = 'facturas';
>                 $data = $this->Factura->findAll($conditions, NULL, $order, 
> $limit,
> $page);
>                 $this->set('data',$data);
>
>         }
> ...
>
> ** view.thtml **
>
> ...
>
> <p>&nbsp;</p>
> <?php echo $ajax->div('head'); ?>
> <? echo $this->renderElement('rango'); ?>
> <?php echo $ajax->divEnd('head'); ?>
>
> <?php echo $ajax->div('facturas'); ?>
> <? echo $this->renderElement('tabla_facturas'); ?>
> <? echo $this->renderElement('pagination'); ?>
> <?php echo $ajax->divEnd('facturas'); ?>
> ...
>
> both head and facturas div need to be updated, but all im getting is
> undefined variables and unsupplied argument errors, perhaps the
> variables un view method are not being passed... how do i do this?


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