[TYPO3-mvc] f:form.select 0:n relation problem
Chatelain Jean-Christophe
Chatelain.Jean-Christophe at agridea.ch
Wed Mar 23 17:13:26 CET 2011
Hi,
I got a little problem with the select VH with multiple = true.
Here is the VH used in fluid template :
<f:form.select property="culture" multiple="1" options="{cultures}"
optionLabelField="name" optionValueField="uid" />
And here is the declaration oft he property+ getter setter in my model :
/**
* culture
*
* @var
Tx_Extbase_Persistence_ObjectStorage<Tx_Pagextmvc_Domain_Model_Culture>
$culture
*
*/
protected $culture;
/**
* Initializes all Tx_Extbase_Persistence_ObjectStorage instances.
*
* @return void
*/
protected function initStorageObjects() {
...
$this->culture = new Tx_Extbase_Persistence_ObjectStorage();
}
/**
* Setter for culture
*
* @param
Tx_Extbase_Persistence_ObjectStorage<Tx_Pagextmvc_Domain_Model_Culture>
$culture culture
* @return void
*/
public function setCulture(Tx_Extbase_Persistence_ObjectStorage
$culture) {
$this->culture = $culture;
}
/**
* Getter for culture
*
* @return
Tx_Extbase_Persistence_ObjectStorage<Tx_Pagextmvc_Domain_Model_Culture>
culture
*/
public function getCulture() {
return $this->culture;
}
Everything work fine when I select one or more items but when no item is
selected it just don't update my model.
Anyone got a clue about that ?
Cheers,
Jean-Christophe Chatelain
More information about the TYPO3-project-typo3v4mvc
mailing list