[TYPO3-formidable] Mapping ajax events in xmlbuilder?
Andres Toomsalu
andres at active.ee
Tue Sep 14 00:23:00 CEST 2010
I havent found any example describing how to map ajax events userobj when using xmlbuilder - is it even possible?
Can I do something like that:
<xmlbuilder>
<userobj>
<php><![CDATA[
$aXml = array();
//setup renderlets array
$aMenuImages = array(
"icon1" => '<img src="fileadmin/icons/icon1.jpg">',
"icon2" => '<img src="fileadmin/icons/icon2.jpg">',
"icon3" => '<img src="fileadmin/icons/icon3.jpg">',
);
//renderlet generation loop
while (list($sName, $sLabel) = each($aMenuImages)) {
$aXml["renderlet-testing-".$sName] = array(
"type" => "LINK",
"name" => $sName,
"label" => $sLabel,
"style" => "cursor: pointer",
"onclick" => 'runat="ajax"', // <- how to map onclick userobj here?
);
}
return $aXml;
]]></php>
</userobj>
</xmlbuilder>
And would like these generated LINK elements have onlick section:
<onclick runat="ajax">
<userobj>
<php><![CDATA[
return array(
$this->aORenderlets["sports_modalbox"]->majixCloseBox(),
$this->majixDebug("Hello world!"),
);
]]></php>
</userobj>
</onclick>
How to map this "onclick" event in xmlbuilder situation?
Thanks in advance,
--
----------------------------------------------
Andres Toomsalu, andres at active.ee
More information about the TYPO3-project-formidable
mailing list