On Wednesday, September 18, 2002, at 05:24  pm, Christian Haul wrote:

> On 17.Sep.2002 -- 04:19 PM, William Moore wrote:
>> Hello
>>
>> I am trying to use FormValidatorAction to check data before inserting it
>> into a database.
>>
>> The key on the database is one of the values on the form, and I want to
>> check if it already exists on the database so I can tell the user to 
>> enter
>> a different value.
>>
>> I cannot work out how to do this. The documentation suggests I should be
>> doing something with a DatabaseAction, but I do not know what.
>
> You could
> a) wait for an error and chose a different pipeline
> b) chaeck with a DatabaseSelectAction whether the key
>    already exists
>
>       Chris.
> --

a) makes me think my code is not clean.
b) I identified as a solution, but could not see how to make it work. I 
want to identify the duplicate key and any other errors on the form and 
report them back to the user in the same way as the formvalidation sample.
  I'll have to try some more.

William


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to