This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

sfExtJS2Plugin bug?

Forum to discuss ExtJS and other JS plugins

sfExtJS2Plugin bug?

by drzen » Wed Sep 24, 2008 9:25 am

I get this strange result:
Strartin code:
Code: Select all
<div id='tabPanel'></div>
<?php
$sfExtjs2Plugin = new sfExtjs2Plugin(array('theme'=>'blue'), array('css' => '/sfExtjsThemePlugin/css/symfony-extjs.css'));
$private = array();
$public = array();
$sfExtjs2Plugin->load();
$sfExtjs2Plugin->begin();
 
// **************************************
// Application
// **************************************

$myTab = array(
  array(
    'title' => 'Dettagli',
      'autoLoad'=> array (
         'url'=>url_for('casa/dettagli'),
         'params'=>'id='.$casa->getId(),
         'scripts'=>true)
  ),
  array(
    'title' => 'Composizione',
      'autoLoad'=> array (
         'url'=>url_for('contatti/casa'),
         'params'=>'id='.$casa->getId(),
         'scripts'=>true)
  ),
  array(
    'title' => 'Attivit&agrave;',
      'autoLoad'=> array (
         'url'=>url_for('attivitaCasa/list'),
         'params'=>'id='.$casa->getId(),
         'scripts'=>true)
  ),
  array(
    'title' => 'Contatti',
      'autoLoad'=> array (
         'url'=>url_for('contattoCasa/list'),
         'params'=>'id='.$casa->getId(),
         'scripts'=>true)
  ), 
  array(
    'title' => 'Servizi',
      'autoLoad'=> array (
         'url'=>url_for('servizioCasa/list'),
         'params'=>'id='.$casa->getId(),
         'scripts'=>true)
  ), 
);

$private['tabPanel']=$sfExtjs2Plugin->TabPanel(
  array(
    'id' => 'tabPanel',
    'title' => 'Dettagli casa',
    'region' => 'center',
    'deferredRender' => false,
    'resizeTabs' => true,
    'activeTab'  => ($tab?$tab:0),
    'border'     => true,
    'plain'      => true,
    'items'      => $myTab,
    'margins'    => '5 5 5 5',
    'autoScroll' => true
  )
);
$public['init'] = $sfExtjs2Plugin->asMethod("tabPanel.render('tabPanel');");
$sfExtjs2Plugin->beginApplication(
  array(
    'name'    => 'Case',
    'private' => $private,
    'public'  => $public
  )
);
$sfExtjs2Plugin->endApplication();
$sfExtjs2Plugin->initApplication('Case');
$sfExtjs2Plugin->end();
?>





in my test hosting I get correct result. In the production hosting I get this strange lines at the end (and no render):

Code: Select all
------ more line before ------
{ title: 'Servizi',
autoLoad: { url: '/web/servizioCasa/list',
params: 'id=1',
scripts: true } }
],
margins: '5 5 5 5',
autoScroll: true
});
return {
 init: Object id #69

}}();

Ext.onReady(App.init, App);

</script>



the problem seems:

Code: Select all
$sfExtjs2Plugin->beginApplication(
  array(
    'name'    => 'Case',
    'private' => $private,
    'public'  => $public
  )
);
drzen
Junior Member
 
Posts: 25
Joined: Thu Mar 13, 2008 5:06 pm
Location: Pordenone - Italy