QDateRepeater and QFileAsset

thread: 2 messages  |  last: about 10 months ago  |  started: saturday, june 30, 2012, 9:10 am pdt


#1  |  Leonardo (Minas Gerais) Brazil
Saturday, June 30, 2012, 9:10 AM PDT

Hello people,

So, I have try put QFileAsset into QDateRepeater, but some problems appear.

The question is when i upload file, happened a request server and when happened a request server my QDateRepeater refresh automatically, so all QFileAssets that into QDateRepeater  is clean and build new QFileAssets, but when update my icon QFileAsset the code Javascript search a Old QFileAsset.

I tryed the fix Id in QFileAsset


$flaControl = new QFileAsset($_CONTROL, 'fla'.$_CONTROL->CurrentItemIndex);

but appear message erro that i dont't render two QControl with the same Id.

Please Help-me!!!

Form PHP

<?php
    
require '../includes/prepend.inc.php';
    
    class 
TestForm extends QForm {
        
        protected 
$dtrTest;
        
        public function 
Form_Create() {
            
parent::Form_Create();
            
$this->dtrTest = new QDataRepeater($this);
            
$this->dtrTest->Template __DOCROOT__.'/dtr_test.tpl.php';
            
$this->dtrTest->SetDataBinder('dtrTest_Bind');
        }
        
        protected function 
dtrTest_Bind(){
            
$this->dtrTest->DataSource = array(1,2,3,4,5,6,7,8);
        }        
        
    }
    
    
TestForm::Run('TestForm');
?>

DTR TPL PHP

<?php 
    $flaControl 
= new QFileAsset($_CONTROL);
    
$flaControl->TemporaryUploadPath __DOCROOT__;
    echo 
$flaControl->Render(false);
?>
.bc
#2  |  Leonardo (Minas Gerais) Brazil
Saturday, June 30, 2012, 1:25 PM PDT

Hello People a resolved the problem, I go posted here,

TPL DTR


<?php 
    $flaControl 
$_CONTROL->GetChildControl('dlg'.$_ITEM);
    if(!
$flaControl)
        
$flaControl = new QFileAsset($_CONTROL'dlg'.$_ITEM);
    echo 
$flaControl->Render();
?>


Copyright © 2005 - 2013, Quasidea Development, LLC
This open-source framework for PHP is released under the terms of The MIT License.