[TYPO3-project-formidable] using $this->oMajixEvent->getParam('value') inside SEARCHFORM

JéŽrô™me Schneider j.schneider at ameos.com
Tue Jan 19 11:10:55 CET 2010


Hi !
You'll find here a snippet illustrating the dependancy concept in 
formidable:
http://formidable.typo3.ug/pastebin/snippet/110.html

And here the working example:
http://formidable.typo3.ug/tutorials/dependancies-the-clean-way.html

Best regards,
Jérôme Schneider


Le 19/01/10 09:32, JéŽrô™me Schneider a écrit :
> Hi Thomas !
>
> Could you try to use the absolute name while pointing the parameter ?
> In your case:
>
> params="detailedSearch.mrc"
> AND
> getParam("detailedSearch.mrc")
>
> I think this will make it.
>
> BTW: there's an integrated way to handle dependancies in Formidable now.
> I'll write you about that later today !
>
> Best regards,
> Jérôme
>
>
>
> Le 19/01/10 04:19, Thomas Meixner a écrit :
>> Hello list,
>>
>> I've been stuck on this for quite a while. I want to use the "nested
>> list example" inside a renderlet:Searchform but I cannot get the current
>> selected value via $this->oMajixEvent->getParam('value').
>>
>> I think the problem is that my Listbox is already nested inside the
>> searchform, in the example below $sRub is just empty.
>>
>> <renderlet:SEARCHFORM name="detailedSearch">
>> <datasource use="jobs" />
>> <childs>
>>
>>
>> <renderlet:LISTBOX name="mrc" label="MRC">
>> <search onfields="tx_dmmjobcontrol_job.mrc" />
>> <onchange runat="ajax" params="mrc">
>> <userobj>
>> <php><![CDATA[/*<?php*/
>> //oDataHandler doesn't seem to work with ajax
>> //$sRub = $this->oDataHandler->_getThisFormData("mrc");
>> $sRub = $this->oMajixEvent->getParam('mrc');
>> $this->aORenderlets['detailedSearch']->aChilds['mrc']->setValue($sRub);
>> $aItems =
>> $this->aORenderlets['detailedSearch']->aChilds['city']->_getItems();
>>
>> return
>> $this->aORenderlets['detailedSearch']->aChilds['city']->majixReplaceData($aItems);
>>
>>
>> /*?>*/]]></php>
>> </userobj>
>> </onchange>
>> <data>
>> <userobj>
>> <php><![CDATA[
>> return $GLOBALS["TYPO3_DB"]->exec_SELECTgetRows("uid as value, name as
>> caption", "tx_dmmjobcontrol_mrc", "","name","");
>> ]]></php>
>> </userobj>
>> </data>
>> </renderlet:LISTBOX>
>>
>> ...
>>
>> </childs>
>> </renderlet:SEARCHFORM>
>>
>>
>>
>> What would be the right syntax using Ajax?
>> Can I maybe use just server events since I can nest them with the
>> aORenderlets?
>>
>>
>> Thanks for looking,
>> Thomas Meixner
>>
>>
>> (Here are the two standalone examples for reference)
>> http://formidable.typo3.ug/features/the-mighty-lister/search-and-list.html
>>
>> http://formidable.typo3.ug/tutorials/nested-listboxes.html
>



More information about the TYPO3-project-formidable mailing list