[TYPO3-mvc] can I prefil properties in a newAction or pass arguments to a validator?
Rolf Nakielski
rolf at nakielski.de
Mon Feb 21 15:02:03 CET 2011
Hello List,
I'm writing an extention where I have an object "track" belonging to an object "release":
release -> 1:n -> track
In track I have a property "name" and I want to check that there are unique names in all
tracks of a release.
There is a Validator "Tx_FkExtention_Domain_Validator_TrackValidator" where I try to do it.
This works well
for edit/update but when I create a new track the release is not yet a filled property of
the track. The release
is set in the createAction.
So what can I do?
I tried to check this in the createAction itself - but I think this is not the right way. I
had to call errorAction from createAction and loose all property values this way. An Object
should be valid when it is getting into the createAction.
Is there a way to have this "release" property set by the newAction - so I can use it
allways for validation? I would need to pass the release to the track constructor somehow?
Or is there a way to pass the release to the validator?
Any hint can help. Thank you
I'm using extbase 1.3 that was shipped by TVPO3 4.5
More information about the TYPO3-project-typo3v4mvc
mailing list