[TYPO3-project-formidable] modalbox: change child renderlet:BOX with oMajixEvent parameters
Hauke Hain
newgrp at googlemail.com
Thu Mar 19 22:20:26 CET 2009
Hi Jerome,
thank you very much for your answer.
The first part was very helpful and easy to understand. I have some troubles
with the second one.
Nothing happens with this code in my codebehind in the function
btnEdit_click:
$this->oForm->aORenderlets["editbox.boxMessage"]->majixSetHtml("test");
I get this error
Fatal error: Call to undefined method tx_rdtmodalbox::majixSetHtml()
with this code:
$this->oForm->aORenderlets["editbox"]->majixSetHtml("test");
Excerpt from my XML:
<renderlet:MODALBOX name="editbox">
<childs>
<renderlet:BOX name="boxMessage" mode="H1" />
[...]
What is the difference with refresh and set the content? In my case I want
to change the content when opening the modalbox depending of the database
content.
Nothing should be changed except the one box. There is no need for rendering
it new, because nothing else changes.
Is the only difference that every value of all renderlets will be reloaded
via AJAX from the database?
Because it does not work for me now, one question:
Can I change with majixSetHtml() the content of an BUTTON Renderlet, so that
instead of it something else will be displayed?
Kind regards,
Hauke
"Jerome Schneider" <typo3dev at ameos.com> schrieb im Newsbeitrag
news:mailman.1.1237197746.9278.typo3-project-formidable at lists.netfielders.de...
> Hi Hauke !
>
> In snippets 92 and 93, we were using an external php file (the
> codeBehind). In the php of this codebehind, to refer to the formidable
> main object, you have to specify $this->oForm
>
> But, when in a userobj directly in the xml, the main Formidable object is
> pointed by $this directly (because in this case, it's formidable that
> holds your php-code, and not an external codeBehind object)
>
> So, to get the parameters in the codeBehind, we were refering to
> $this->oForm->oMajixevent->getParams();
>
> But in the userobj, you have to ask for:
> $this->oMajixEvent->getParams();
>
>
> Now for the second part, changing the HTML of your box, there are 2 ways:
>
> First one: using majixRepaint(), as demonstrated in snippets 92&93
> Second one: using majixSetHtml()
>
> In other words:
>
> * if you need to 'refresh' the display of your box, while keeping your
> renderlets inside, you need to use majixRepaint(), as repaint re-renders
> the renderlets and send te new HTML via ajax to refresh the display.
>
> * if you simply need to set a message inside a box, use majixSetHtml() on
> the box.
>
> I hope I made myself understandable, and let me know if not :)
>
> Jerome
>
> Hauke Hain a écrit :
>> Hi,
>>
>> I have a modalbox and in this modalbox a renderlet box where I want to
>> change the <html>-Content dynamically.
>> To do so I tried to use a userobj php with
>> $this->oForm->oMajixEvent->getParams(); but that does not work
>> (non-object error).
>> Do you know hot to get the params there or how to change the content of
>> the box from the codebehind of the modalbox like used in snippets 92/93?
>> document.getElementById('id....').innerHTML= does not work. PHP says that
>> the '=' is to much...
>>
>> I am a little bit confused.
>>
>> Thank you for help in advance.
>>
>> Regards,
>> Hauke
>>
More information about the TYPO3-project-formidable
mailing list