[TYPO3-mvc] Data Flow problems from Fluid to Domain Model Class
Franz Koch
typo3.RemoveForMessage at elements-net.de
Wed Feb 24 14:39:40 CET 2010
Hi,
> /**
> * create action
> * @param Tx_StatisticsInterface_Domain_Model_ExcelSheet $dataSheet
> * @dontvalidate $dataSheet
> */
> public function createAction() {
> $this->dataSheet->getSheetData();
> // $this->dataSheet->setZeitraum(<POST value of the selection box>);
> $this->view->assign('datasheet',$this->dataSheet);
> }
do this:
/**
* create action
* @param Tx_StatisticsInterface_Domain_Model_ExcelSheet $dataSheet
* @param string $selectBoxValue The value of your selectbox
*/
public function
createAction(Tx_StatisticsInterface_Domain_Model_ExcelSheet $dataSheet =
NULL, $selectBoxValue = NULL) {
if ($selectBoxValue) {
$dataSheet->setZeitraum($selectBoxValue);
}
$this->view->assign('datasheet',$dataSheet);
}
so simply add a new parameter to your method with the same name as your
selectbox name and you get it automatically injected.
Another way might be:
$this->request->arguments->get('nameOfSelectbox');
or something like that - don't remember the exact syntax.
--
kind regards,
Franz Koch
More information about the TYPO3-project-typo3v4mvc
mailing list