[TYPO3-formidable] AJAX in the back end

Antoine Rochefort antoine at dev-freelance.fr
Thu Nov 25 11:29:50 CET 2010


Hi all,
I found the solution in the formidable change lists. Do not forget the & 
before the "$this" to give the address and not an object :


$xml = "/fileadmin/formidable/BE/TA/liste_ta.xml";
$this->oForm->init($this, $xml);
[...]
$this->content .= $this->oForm->render();
tx_ameosformidable::backendHeaders(&$this); // must be after the render



On 23/11/2010 12:11, Antoine Rochefort wrote:
> Thanks,
> Now when I make an AJAX action the majixSpinner is running
> indefinitely...but no results...
>
> is there something else missing ?
>
>
>
> On 19/11/2010 12:07, Stéphane Fillion wrote:
>> Hi,
>>
>> Try this in your index.php :
>>
>> $this->oForm = t3lib_div::makeInstance("tx_ameosformidable");
>> $xml = "/fileadmin/formidable/BE/TA/liste_ta.xml";
>> $this->oForm->init($this, $xml);
>> [...]
>> $this->content .= $this->oForm->render();
>>
>> tx_ameosformidable::backendHeaders($this);
>>
>> Regards
>> Stéphane
>>
>> Le jeudi 18 novembre 2010 à 15:14 +0100, Antoine a écrit :
>>> Hi everyone,
>>> I'm trying to use Formidable for a Back End module, using the php
>>> instantiation in the index.php of the module :
>>>
>>> $this->oForm = t3lib_div::makeInstance("tx_ameosformidable");
>>> $xml = "/fileadmin/formidable/BE/TA/liste_ta.xml";
>>> $this->oForm->init($this, $xml);
>>> [...]
>>> $this->content .= $this->oForm->render();
>>>
>>>
>>> It seems to be working correctly, but AJAX and other stuff are not
>>> working. If I include the following XML :
>>>
>>> <renderlet:BUTTON name="test-button" label="open box">
>>> <onclick runat="ajax">
>>> <userobj>
>>> <php><![CDATA[
>>> return $this->aORenderlets["msgConfirm"]->majixShowBox();
>>> ]]></php>
>>> </userobj>
>>> </onclick>
>>> </renderlet:BUTTON>
>>>
>>> <renderlet:MODALBOX name="test-modal">
>>> <childs>
>>> <renderlet:BUTTON name="closeBox" label="Close">
>>> <onclick runat="ajax">
>>> <userobj>
>>> <php><![CDATA[
>>> return $this->aORenderlets["msgConfirm"]->majixCloseBox();
>>> ]]></php>
>>> </userobj>
>>> </onclick>
>>> </renderlet:BUTTON>
>>>
>>> </childs>
>>> </renderlet:MODALBOX>
>>>
>>> and inside the HTML template :
>>>
>>> {test-button}
>>> {test-modal}
>>>
>>> Nothing happens if I click on the button...and I detect no activity in
>>> firebug. Same thing if I want to make an ajax search on a lister :
>>>
>>> <renderlet:TEXT name="name" label="Name / Company">
>>> <onkeyup runat="ajax" cache="false" refreshContext="true" delay="300">
>>> <userobj>
>>> <php><![CDATA[
>>> return $this->rdt('search_TA')->majixSubmitAjaxSearch();
>>> ]]></php>
>>> </userobj>
>>> </onkeyup>
>>> </renderlet:TEXT>
>>>
>>>
>>>
>>> Also the SELECTOR does not send items for one side to the other one.
>>>
>>> does anyone have an idea ?
>>>
>>>
>>> Thanks a lot
>>
>



More information about the TYPO3-project-formidable mailing list