[TYPO3-mvc] own widget.paginate and f.widget.paginate throws error

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Fri Jun 17 20:00:49 CEST 2011


Hey

Sorry, but another question - cause it will not work. It says, Database
Tx_EnzTeaserlist_Domain_Model_Address not found.

The Address-Model is fine - all properties, getters and setters

The setup.txt looks like this:
plugin.tx_enzteaserlist.persistence.classes {
	Tx_EnzTeaserlist_Domain_Model_Address {
		mapping {
			tableName = tt_address
			recordType = Tx_EnzTeaserlist_Domain_Model_Address
			columns {
				tt_address_hook_lng.mapOnProperty = lon
				tt_address_hook_lat.mapOnProperty = lat   
			}
		}
	}
}

The TCA of Address begins like this:
$TCA['tx_enzteaserlist_domain_model_address'] = array(
	'ctrl' => $TCA['tx_enzteaserlist_domain_model_address']['ctrl'],
	'interface' => array(
		'showRecordFieldList'	=>
'name,first_name,last_name,address,zip,city,room,building,phone,www,email,co
mpany,region,country,lat,lon'
	),
	'types' => array(
		'1' => array('showitem'	=> '',
	),
	'palettes' => array(
		'1' => array('showitem'	=> '')
	),
	'columns' => array (
		'name' => array (
			'label'  =>
'LLL:EXT:lang/locallang_general.xml:LGL.name',
			'config' => array (
				'type' => 'input',
				'size' => '40',
				'eval' => 'trim',
				'max'  => '256'
			)
		),
		'first_name' => array (
			'exclude' => 0,
			'label'   =>
'LLL:EXT:tt_address/locallang_tca.xml:tt_address.first_name',
			'config'  => array (
				'type' => 'input',
				'size' => '40',
				'eval' => 'trim',
				'max'  => '256'
			)
		),
[...]

I've added to ext_tables.php
t3lib_div::loadTCA('tt_address'); nothing more - should I?

I think it should work, or?

Best regards
Johannes
 



-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Franz Koch
Gesendet: Freitag, 17. Juni 2011 18:12
An: typo3-project-typo3v4mvc at lists.typo3.org
Betreff: Re: [TYPO3-mvc] own widget.paginate and f.widget.paginate throws
error

Hey,

> I'd like to use the data from tt_address.
> I set it up in setup.txt like described on page 158.

So you mapped the tt_address table and some table columns with fancy 
spelling to your model and properties - good.

> Do I need Repository, Model, TCA or something other additional??? I wrote
> all of them, wrong? If not, are there special hints for the TCA-file?

Well, you said you mapped the tt_address table like on page 158, then of 
yours you also need the according domain model you mapped the table to, 
with all it's properties, setters and getters.

If you need a repository depends on your usecase. If the tt_address 
records are only used in relations of some other models/objects you 
don't need a repository. If you like to query for special tt_address 
records, then you of course need a repository.

-- 
kind regards,
Franz Koch
_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc




More information about the TYPO3-project-typo3v4mvc mailing list