[FLOW3-general] Problems with MM table and display in Fluid

Stefan Frömken firma at sfroemken.de
Fri Dec 3 13:06:49 CET 2010


Hello "Get in the Flow"-Team,

I just try to learn Extbase and Fluid now. But I have problems with 
MM-Tables. After searching a long time I find a hint to create my own 
Query for MM-Tables:

public function indexAction(Tx_Ebsink_Domain_Model_Printer $printer) {
	$inks = $this->inkRepository->findInkBy($printer);
	//$printers = $inks->getPrinter();
	$this->view->assign('inks', $inks);
	//$this->view->assign('printers', $printers);
}

and here my own function:

public function findInkBy(Tx_Ebsink_Domain_Model_Printer $printer) {
	$query = $this->createQuery();
	$query->matching($query->contains('printer', $printer));
	return $query->execute();
}

Very fine...when I click on a printer I get all inks for that printer.

BUT!!!

How to show all printers of current ink record in Fluid?

{ink.printer}
results in: Cannot cast object of type 
"Tx_Extbase_Persistence_ObjectStorage" to string.

{ink.printer.printer}
results in an empty output

A google search is completely empty:
http://www.google.de/search?hl=de&client=firefox-a&hs=4H&rls=org.mozilla%3Ade%3Aofficial&q=Cannot+cast+object+of+type+Tx_Extbase_Persistence_ObjectStorage+to+string.&aq=f&aqi=&aql=&oq=&gs_rfai=

So...I hope that you have an additional idea.

Stefan


More information about the FLOW3-general mailing list