Lançado Adianti Framework 7.6!
Clique aqui para saber mais
apenas error acho que no setActiveRecord, em outro servidor. bom dia, fiz um aplicação e tudo roda perfeitamente, ai publiquei em outro servidor e agora da erro ao tentar acessar as classes, será que preciso fazer alguma atualização ou configuração no servidor? ...
RS
apenas error acho que no setActiveRecord, em outro servidor.  
bom dia, fiz um aplicação e tudo roda perfeitamente, ai publiquei em outro servidor e agora da erro ao tentar acessar as classes, será que preciso fazer alguma atualização ou configuração no servidor?

  1. <?php
  2. /**
  3.  * CredorList Listing
  4.  * @author  <your name here>
  5.  */
  6. class CredorList extends TStandardList
  7. {
  8. /*
  9.     protected $form;     // registration form
  10.     protected $datagrid; // listing
  11.     protected $pageNavigation;
  12.     protected $formgrid;
  13.     protected $deleteButton;
  14.     protected $transformCallback;
  15.   */  
  16.     /**
  17.      * Page constructor
  18.     */
  19.      
  20.     public function __construct()
  21.     {
  22.          
  23.         parent::__construct();
  24.        
  25.         parent::setDatabase('conpusis');        // defines the database
  26.        
  27.         parent::setActiveRecord('Credor');      // defines the active record
  28.     
  29.         parent::setDefaultOrder('id''asc');   // defines the default order
  30.     
  31.         parent::addFilterField('nome''like''nome'); // filterField, operator, formField
  32.         
  33.         // creates the form
  34.         $this->form = new TQuickForm('form_search_Credor');
  35.         $this->form->class 'tform'// change CSS class
  36.         
  37.         $this->form->style 'display: table;width:100%'// change style
  38.         $this->form->setFormTitle('Credores');
  39.         
  40.         // create the form fields
  41.         $nome = new TEntry('nome');
  42.         // add the fields
  43.         $row $this->form->addQuickField('Nome'$nome,  600 );
  44.         $row->get(0)->width '10%';
  45.         
  46.         // keep the form filled during navigation with session data
  47.         $this->form->setDataTSession::getValue('Credor_filter_data') );
  48.         
  49.         // add the search form actions
  50.         $this->form->addQuickAction(_t('Find'), new TAction(array($this'onSearch')), 'fa:search');
  51.         $this->form->addQuickAction(_t('New'),  new TAction(array('CredorForm''onEdit')), 'bs:plus-sign green');
  52.         
  53.         // creates a DataGrid
  54.         $this->datagrid = new TDataGrid;
  55.         
  56.         $this->datagrid->style 'width: 100%';
  57.         $this->datagrid->datatable 'true';
  58.         // $this->datagrid->enablePopover('Popover', 'Hi <b> {name} </b>');
  59.         
  60.         // creates the datagrid columns
  61.        // $column_id = new TDataGridColumn('id', 'Id', 'right');
  62.         $column_nome = new TDataGridColumn('nome''Nome''left');
  63.         $column_cpf_cnpj = new TDataGridColumn('cpf_cnpj''CNPJ/CPF''left');
  64.         $column_cidade = new TDataGridColumn('{cidades->nome} ({estados->uf})''Cidade''left');
  65.         $column_fone1 = new TDataGridColumn('fone1''Telefone 1''left');
  66.         $column_fone2 = new TDataGridColumn('fone2''Telefone 2''left');
  67.         // add the columns to the DataGrid
  68.        // $this->datagrid->addColumn($column_id);
  69.         $this->datagrid->addColumn($column_nome);
  70.         $this->datagrid->addColumn($column_cpf_cnpj);
  71.         $this->datagrid->addColumn($column_cidade);
  72.         $this->datagrid->addColumn($column_fone1);
  73.         $this->datagrid->addColumn($column_fone2);
  74.         // creates the datagrid column actions
  75.         $order_nome = new TAction(array($this'onReload'));
  76.         $order_nome->setParameter('order''nome');
  77.         $column_nome->setAction($order_nome);
  78.         
  79.         
  80.         // create EDIT action
  81.         $action_edit = new TDataGridAction(array('CredorForm''onEdit'));
  82.         $action_edit->setUseButton(TRUE);
  83.         $action_edit->setButtonClass('btn btn-default');
  84.        // $action_edit->setLabel(_t('Edit'));
  85.         $action_edit->setImage('fa:pencil-square-o blue fa-lg');
  86.         $action_edit->setField('id');
  87.         $this->datagrid->addAction($action_edit);
  88.         
  89.         // create DELETE action
  90.         $action_del = new TDataGridAction(array($this'onDelete'));
  91.         $action_del->setUseButton(TRUE);
  92.         $action_del->setButtonClass('btn btn-default');
  93.         //$action_del->setLabel(_t('Delete'));
  94.         $action_del->setImage('fa:trash-o red fa-lg');
  95.         $action_del->setField('id');
  96.         $this->datagrid->addAction($action_del);
  97.         
  98.         // create the datagrid model
  99.         $this->datagrid->createModel();
  100.         
  101.         // create the page navigation
  102.         $this->pageNavigation = new TPageNavigation;
  103.         $this->pageNavigation->setAction(new TAction(array($this'onReload')));
  104.         $this->pageNavigation->setWidth($this->datagrid->getWidth());
  105.         
  106.         // vertical box container
  107.         $container = new TVBox;
  108.         $container->style 'width: 100%';
  109.         
  110.         //$container->add(new TXMLBreadCrumb('menu.xml', __CLASS__));
  111.         $container->add($this->form);
  112.         $container->add($this->datagrid);
  113.         $container->add($this->pageNavigation);
  114.         
  115.         parent::add($container);
  116.      
  117.     }
  118.     
  119. }
  120. ?>

Curso completo Meu Negócio Pronto
Use para si, ou transforme em um negócio: Inclui aulas e códigos-fontes
Gestor de conteúdo (SITE) + Loja Virtual (E-Commerce) + Emissor de Notas para infoprodutos


Meu negócio pronto Quero me inscrever agora!

Comentários (4)


NR

Verifique os logs do apache
RS

Bom dia Nataniel eu peguei o error.log


[error] [client 186.233.212.10] PHP Fatal error: Can't use function return value in write context in /var/www/conpusis/lib/adianti/w idget/datagrid/TDataGrid.php on line 555, referer: conpusis.dourados.ms.gov.br/index.php?class=CommonPage
RS

PHP Version 5.4.45-4+deprecated+dontuse+deb.sury.org~precise+1
NR

Atualize a versão do PHP para no mínimo a 5.5