Do you know piece of software named in subject ? Quote from http://www.brics.dk/bigwig/powerforms/:
"PowerForms is a tool for extending HTML forms with client-side input
validation. The validation requirements are stated in a declarative manner,
that is, one tells what should hold for certain form fields rather than telling how
to check whether it holds.
...
A client-side user can only submit a form when all requirements are met,
and an attempt to submit an invalid form will result in an appropriate error message.
PowerForms relies on standard scripting technology (JavaScript) in modern browsers and
for compatibility only the subset known to work in most browsers are used.
(The generated code has been succesfully tested in Netscape 4 under Unix,
Mozilla under Linux, and MS Explorer under Windows.)"
Very nice, I think.
But there is one problem with dbforms...
Where ?
I'll try to explain:
Let's take this example of using powerforms:
<html>
<body>
<form>
Please enter "Hello World!": <input type="text" name="t"
size="12">
<format field="t">
<const value="Hello World!"/>
</format>
</form>
</body>
</html>
As you can see, requirements for input fields are written into the
<form></form> tag, in other words, they are binded to concrete form.
For transforming these declarations to validating javascript code, we
using utility called powertransform (part of powerforms distribution package).
After transforming, output file looks like this:
... many JavaScript code...
<form onsubmit="return powerforms_check_form_0(false);">
...many JavaScript code...
...input fields...etc.
</form>
And this is problem for dbforms. Powertransform must know, where to add
onsubmit="" event handler, but we haven't any form in our JSP code. We
have only one (or more) dbform tag(s).
Maybe it's email for author of powerforms, but there are more similar
client-side validation tools...
Maybe it will be enough to add possibility of defining javascript
handlers to the dbform tag, something like this:
<db:dbform onsubmit="...">
What do you think about it ?
--
Marian Andre
student FEI TU Kosice
ICQ: 70784303
JID: [EMAIL PROTECTED]
PGP public key: http://www.intrak.sk/~andre/pgp/
"Paranoia is the belief in a
hidden order behind the visible."
Anonymous
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS d- s+:-- a-- C++ UL++ P++ L++ E--- W+ N o K- w
O-- M V- PS+ PE++ Y+ PGP- t+ 5++ X+ R* tv- b++ DI-- D
G++ e h! !r !y
------END GEEK CODE BLOCK------
msg00493/pgp00000.pgp
Description: PGP signature
