[TYPO3-mvc] dummy value for select and property-problem

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Wed Jan 11 08:16:30 CET 2012


Hello typo3-community

I have three questions about extbase and fluid.

First, I try to set a dummy-value for select in fluid. I read this on
several pages, but it doesn't work:

<f:form.select property="magtype" options="{magtypes}"
optionValueField="uid" optionLabelField="magtypename" class="psoaaccr">
       <select><option><f:translate key="accr_cr_choose"
/></option></select>
</f:form.select>

Second, I have a question about properties.
In my model the "accreditation"-object has an child called "magtype". The
model-php looks like that:

/**
       * @var Tx_PsoaAccredit_Domain_Model_Magtype $magtype
       * @validate NotEmpty
       */
       protected $magtype;
/**
       * @return Tx_PsoaAccredit_Domain_Model_Magtype
       */
       public function getMagtype(){
             return $this->magtype;
       }
       /**
       * @param Tx_PsoaAccredit_Domain_Model_Magytpe $magtype
       * @return void
       */
       public function setMagtype(Tx_PsoaAccredit_Domain_Model_Magtype
$magtype){
             $this->magtype = $magtype;
       }

But if I try to create a new "accreditation"-object a error appears: the
property magtype doesn't exist. Whats wrong about that?

 

And third: I often wrote inline-translations, but now it doesn't work:

<f:form.submit value="{f:translate(key='accr_create')}" />

Why?

 

Thanks

Johannes



More information about the TYPO3-project-typo3v4mvc mailing list