I'm not sure how to get error messages to appear directly next the
fields that are invalid, but Kent Tong's tapestry book gives a method
where you can iterate the error messages in a block above your form.
You can download chapters 1-4 for free (chapter 3 will tell you how to
do this) at http://www.agileskills2.org/EWDT/ . Hope this is of some help.
Tim Velten wrote:
I am having a problem using validators on TextFields.
My HTML looks like
<input jwcid="[EMAIL PROTECTED]" displayName="Id"
validators="validators:required" value="ognl:user.id" size="20"/>
When I submit my form the validator seems to work - the label changes to
red and a message is displayed in red - however the message is just "**"
- 2 asterisks (alsoin red).
I cannot seem to get the actual message to appear.
I have scoured the mailing list. I tried checking my locale and adding
<span jwcid="[EMAIL PROTECTED]" value="ognl:engine.locale"/> and my locale shows
up as en_US. I have extracted ValidationStrings.properties from the
tapestry jar file and put the file in my root and also WEB-INF dirs with
no luck. Also copied to ValidationStrings_en.properties and
app.properties with no luck.
I added <meta key="org.apache.tapestry.accepted-locales" value="en"/> to
my app.application file - no luck.
I tried validators="validators:required[my message here]" syntax - still
worked but my message did not appear.
I have tried putting everything in the Home.page file instead of the
HTML - same result.
Same problem using other validators as well, so it is not just
"required" validator.
I must have some fundamental configuration problem that I am missing.
Everything else tapestry-wise is working fine.
Anybody have any ideas ?
Thanks,
Tim
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]