You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Oskar Werewka <ow...@poczta.onet.pl> on 2001/06/06 15:13:49 UTC
Checking request parameters ....... planing architecture.
I do not want to have java code in my xsp pages,
therefore I want to write a taglibrary for checking
request parameters.
Examples of provided tags:
<date-format param="..." message="...wrong date format..."/>
<check-null param="..." message="...."/>
<check-maxlength param="..." message="...typed text too long..."/>
<check-int param="..." message="...wrong number format..."/>
<check-empty param="..." message="..."/>
the code for each tag will take the request parameter, check a condition
and if it is wrong inserts a <error message="..."/> tag to the document,
which will be displayed for the user.
But, after checking parameters, I want to use <esql:connection> - to perform
database operations. And I do not know how to make the execution of esql
stuff dependent of tags for parameter checking?
<check-empty param="X" message="Fill X field"/>
<check-empty param="Y" message="Fill X field"/>
<date-format param="Z" message="Type correct date in Z field"/>
<esql:connection>
<esql:pool>HelpDesk</esql:pool>
<esql:execute-query>
<query>INSERT INTO DATA (X,Y,Z) VALUES (
<esql:parameter><request:get-parameter name="X"/></esql:parameter>
<esql:parameter><request:get-parameter name="Y"/></esql:parameter>
<esql:parameter><request:get-parameter name="Z"/></esql:parameter>
</query>
</esql:execute-query>
</esql:connection>
--
Kamera wideo Sony, 5000 zl
wygraj w konkursie eMarketu i Onet.pl [ http://konkursy.onet.pl/emarket ]
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>