[Flow] Validation > Exception instead of going back to newAction
Axel Wüstemann
awu at qbus.de
Fri Dec 6 14:36:44 CET 2013
Am 06.12.2013 13:18, schrieb Bastian Waidelich:
> I feel with you and they shouldn't. One goal of Flow is to enable you to
> write complex applications while keeping the code very easy to
> comprehend on all levels.
> If the code gets complex (especially in your controller) there's usually
> something wrong (in Flow or in your approach).
>
> No offense, but if you don't provide more information it's very hard for
> us to help you improve your approach and/or detect bugs & missing
> features in Flow. If you don't want to share your model, you could try
> to recreate a simple example that demonstrates the behavior.
Thank you Bastian for your words!
This is my first Flow project and I started it, getting a personal
workshop with Robert Lemke here in Rostock. Because of the special
constraints of this project - using a fixed Oracle database and no any
experiences with Flow, it took me a lot of time to get it ready. It is a
relaunch of a project from about 2009 which I made based on Zend Framework.
So I tried to ask much things here in the list, but often nobody could
help me or I've got no response. Of course, all here share there
knowledge on a volunteers base, so sometimes it is hard to get results
within an acceptable time frame.
If you or other could spend the time to digger through my code, of
course I will share it! I would very much appreciate your support. But
as I said, there are some more open things... ;=)
But let's stay on the date validation.
This are the fixed constraints due to the customer:
1. I need separated __date and __time fields in the form
2. in other formas I have __year and __month
3. I have one datetime database field DATUM
4. It is Oracle
I would prefer a solution, what could accept, my date is a string and
not realy a datetime. This is way - I'm far away from being an expert of
Oracle and so I'm very happy, that using strings instead of datetime
works with German NLS (National Language Support) of the Datebase
(German date formal in the DB also is a customer constraint, it is a
govermental authority (Behörde) ;=).
So here are Pastebins of the stuff.
There is a base controller FisheryInspection, where I collected common
stuff, as it is the __buildDate()-function. A similar thing is the
"fisheryBadge" where one can choose to select from a selectbox or hit a
new one into an input field. If I would have a solution for the date,
for sure I will find a similar one for this.
The other stuff there is related to the nessecary
addChield-Functionality, which is one of the other problems, I
mentioned. This should not be considered for now, because it works,
while it is far away from being elegant ;=)
FisheryInspection Controller
http://pastebin.com/SN9BArmn
The DepositInspection is object if the scope here.
DepositInspection Controller
http://pastebin.com/XHgM8kER
DepositInspaection Model (Parent)
http://pastebin.com/vb0nA9dG
DepositModel (Children)
http://pastebin.com/xEVbw14a
FisheryInspection Repository (BaseClass)
http://pastebin.com/ACrykUcu
DepositInspectionRepoitory
http://pastebin.com/q2F08g24
DepositInspection Edit Form
http://pastebin.com/dDFMRWdj
DepositInspection New Form
http://pastebin.com/5z1Drdvd
You wanted to have it... ;===)
Thank you,
Axel
More information about the Flow
mailing list