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. }

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 (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.