[TYPO3-project-formidable] modalbox: change child renderlet:BOX with oMajixEvent parameters
Hauke Hain
newgrp at googlemail.com
Tue Mar 31 21:37:25 CEST 2009
Hi Jerome,
this example helps a lot.
Thank you very much!
I have still some problems (it does not work for me yet):
If I make it like in your tutorial, I do not know how to use the
getRecord-function (it is unknown).
Does "$aParams = $this->getParams();" get the same parameters as
"$aParams = $this->oForm->oMajixEvent->getParams();" in my codebehind?
I would like to use your tutorial code in my code behind.
I tried, but I get this error message: Call to a member function setHtml()
on a non-object
This is the code behind I call via EXEC (almost everything like in snippets
92 and 93):
function btnEdit_click($table) {
$aParams = $aParams = $this->oForm->oMajixEvent->getParams();
$sText = trim($aParams["mytxt"]);
if($sText == "") {
$sHtml = "<h1>You entered a blank string</h1>";
} else {
$sHtml = "<h1>" . $sText . " !</h1>";
}
$sHtml .= "Ajax events are executed each time the user triggers
them.<br />They are (rather) slow, but can react to user inputs (like the
text you enter, for instance)";
# counting the number of calls, just for fun
$this->oSandBox->iCounter ++;
$sHtml .= "<hr />You called this event with " .
$this->oSandBox->iCounter . " different texts per total";
# this call sets the HTML into our box
# for a renderlet carrying a value, like TEXT
# you would have called setValue()
$this->aORenderlets["editbox"]->aChilds["boxMessage"]->setHtml($sHtml);
//Call to a member function setHtml() on a non-object
# this call will render the modalbox,
# containing our box with the new HTML we just set
return $this->aORenderlets["editbox"]->majixShowBox();
}
I hope you can tell my why this happens. Thank you very much in advance.
Hauke
More information about the TYPO3-project-formidable
mailing list