Lançado Adianti Framework 7.6!
Clique aqui para saber mais
Caracter Estranhos Olá, ao salvar pagina fica com caracters estranhos ...
RB
Caracter Estranhos  
Olá, ao salvar pagina fica com caracters estranhos

  1. <?php
  2. class Cliente extends TPage
  3. {
  4.     /**
  5.      * Constructor method
  6.      */
  7.     //protected $hbox_actions;
  8.     protected $container;
  9.     public function __construct()
  10.     {
  11.         parent::__construct();
  12.         
  13.         try
  14.         {
  15.           // create the HTML Renderer
  16.           $this->html = new THtmlRenderer('app/view/clienteRender.html');
  17.           // define replacements for the main section
  18.           $replace = array();
  19.           
  20.           // replace the main section variables
  21.           $this->html->enableSection('main'$replace);
  22.           
  23.           // Table wrapper (form and HTML)
  24.           $this->container = new TVBox;            
  25.           $this->container->style 'width:100%';            
  26.           $this->container->add($this->html);            
  27.           parent::add($this->container);
  28.         }
  29.         catch (Exception $e)
  30.         {
  31.           new TMessage('error'$e->getMessage());
  32.         }
  33.     }
  34.     public static function onChangeAction($param)
  35.     {
  36.       if ($param['cliente_tipo'] == 1
  37.       {
  38.         AdiantiCoreApplication::loadPage('Cliente','onFisico');
  39.       }
  40.       if ($param['cliente_tipo'] == 2
  41.       {
  42.         AdiantiCoreApplication::loadPage('Cliente','onJuridico');
  43.       }
  44.     }
  45.     
  46.      /**
  47.      * Executed when the user clicks at the action1 button
  48.      */
  49.     public function onFisico()
  50.     {
  51.         $datagrid = new DataGridClienteFisico;
  52.         $str get_class($datagrid); 
  53.         $replace = array();
  54.         $replace['widget'] = $datagrid;
  55.         $replace['class']  = get_class($datagrid);
  56.         $replace['cliente'] = substr($str,15);
  57.         
  58.         //replace the object section variables
  59.         $this->html->enableSection('object'$replace);
  60.     }
  61.     
  62.     /**
  63.      * Executed when the user clicks at the action2 button
  64.      */
  65.     public function onJuridico()
  66.     {
  67.         $datagrid = new DataGridClienteJuridico;
  68.         $str get_class($datagrid); 
  69.         $replace = array();
  70.         $replace['widget'] = $datagrid;
  71.         $replace['class']  = get_class($datagrid);
  72.         $replace['cliente'] = substr($str,15);
  73.         
  74.         // replace the object section variables
  75.         $this->html->enableSection('object'$replace);
  76.     }
  77. }

Pacotão Dominando o Adianti Framework 7
O material mais completo de treinamento do Framework.
Curso em vídeo aulas + Livro completo + Códigos fontes do projeto ERPHouse.
Conteúdo Atualizado! Versão 7.4


Dominando o Adianti 7 Quero me inscrever agora!

Comentários (2)


MC

Boas,

Ela ja funcionava antes?, se sim tente voltar a versao anterior e ve se da o mesmo erro,
caso não, faça comparacao entre as versões.
RB

Olá, pessoal.

Problema corrigido, reescrevi a classe e voltou a funcionar.