[opencms-dev] Best Pratice: Form Validation in OpenCms
Sebastian Himberger
sebastian.himberger at gmx.de
Sat Oct 23 17:06:51 CEST 2004
Hi list,
this isn't directly a question regarding an actual problem, but i'm
interested how to "best" validate and handle forms in OpenCms(i know
that there is never ONE best way, but perhaps a way that works good in
most situations).
Do you develop beans with "isValid()"-methods or do you use a framework
to validate form-data? Maybe Struts or the Validator classes from the
Jakarta project? Do you use the OpenCms database classes to store the
beans or some kind of DAO/OR-Mapping?
My current approach is to develop beans with an "isValid()"-method and a
Stack storing the errormessage keys. This keeps the form pages off
from having too much JSP-Code, but i'm no JSP/OpenCms-expert so there
are surely better way's to handle this. Another downside of my approach
is that i have to care much about "null" strings within my forms and i
don't want to do this in the bean.
I'm looking forward to your replys.
Regards
Sebastian Himberger
More information about the opencms-dev
mailing list