[TYPO3-mvc] default view - properties without values
Klaus Lauer
typo3 at klaus-lauer.de
Fri Jun 25 08:20:46 CEST 2010
Good morning list,
I'm new to extbase and fluid and to the list :)
I have downloaded the actual extbase_kickstarter into typo3 4.4RC0,
built an extension, generated some sample objects, inserted the frontend
plugin and looked forward to see the inserted objects in the default view.
My Problem now is, that the number of table rows generated in frontend
match the number of inserted objects, but the properties are without
value. If i print out the objects via print_r in the appropriate
controller, all expected values are shown.
I'm sure, i'm missing something, but i don't know where to look for.
I've compared with the blog_example and all seems to be on place, but it
isn't.
*************************************
Here the part of the controller code:
class Tx_Sfpodcast_Controller_CategoryController extends
Tx_Extbase_MVC_Controller_ActionController {
/**
* @var Tx_Sfpodcast_Domain_Repository_CategoryRepository
*/
protected $categoryRepository;
/**
* Initializes the current action
*
* @return void
*/
protected function initializeAction() {
$this->categoryRepository =
t3lib_div::makeInstance('Tx_Sfpodcast_Domain_Repository_CategoryRepository');
}
/**
* index action for this controller. Displays all Categories.
*
* @return string The rendered index action
*/
public function indexAction() {
$categories = $this->categoryRepository->findAll();
$this->view->assign('me', 'Schabernack');
$this->view->assign('categories', $categories);
}
...
And here the code of the view:
<f:layout name="default" />
This Template is responsible for creating a table of domain objects.
<f:section name="main">
<p>{me}</p>
<h1>Listing for Category</h1>
<f:flashMessages />
<table>
<tr>
<th><f:translate key="tx_sfpodcast_domain_model_category.name" /></th>
<th><f:translate key="tx_sfpodcast_domain_model_category.description"
/></th>
<th><f:translate key="tx_sfpodcast_domain_model_category.parent" /></th>
<th> </th>
<th> </th>
</tr>
<f:for each="{categories}" as="cat">
<tr>
<td><f:link.action action="show" arguments="{category : cat}">
{cat.name}</f:link.action></td>
<td><f:link.action action="show" arguments="{category : cat}">
{cat.description}</f:link.action></td>
<td><f:link.action action="show" arguments="{category : cat}">
{cat.parent}</f:link.action></td>
<td><f:link.action action="edit" arguments="{category :
cat}">Edit</f:link.action></td>
<td><f:link.action action="delete" arguments="{category :
cat}">Delete</f:link.action></td>
</tr>
</f:for>
</table>
<f:link.action action="new">New Category</f:link.action>
</f:section>
********************************************
Can you give me a hint where to look for my missing part?
Regards,
Klaus
More information about the TYPO3-project-typo3v4mvc
mailing list