[TYPO3-mvc] Use Fluid Widgets inside Widgets

Jonas Götze jonnsn at gmail.com
Wed Mar 9 18:29:46 CET 2011


Hi,

I have a custom widget which can generate some ajax links in its 
index-action.
The rendered HTML links execute ajax calls to different Actions of the 
Widget and return some JSON.
This JSON should contain some HTML in case of the addAction (HTML of the 
added Element which is added to an ul in HTML).
In my WidgetController Action I did the following to produce the html:

$html = $this->view->render();

This is added to an array and all is returned with json_encode().

This works as long as I am not trying to use my widget in this view 
again to generate a link for the removeAction.
The output of the widget removeAction-Link works fine in the normal view 
though.
If I call it in the widgets view I get the following error:

Fatal error: Call to a member function addValidator() on a non-object in 
/var/typo3_src-4.5.2/typo3/sysext/extbase/Classes/MVC/Controller/ActionController.php 
on line 212

In this class $validator is filled with the following:
$validator = $parameterValidators[$argument->getName()];
Debugging this showed me that $parameterValidators is an empty array. 
$this->arguments contains 2 arguments, but fails at the first obviously.
When the error occurs $this->actionMethodName is the indexAction.
If I understood all correct this action should not get own params - but 
get its params via $this->widgetConfiguration - right?

Any clues whats wrong here and/or how to fix it?

Regards
Jonas


More information about the TYPO3-project-typo3v4mvc mailing list