It might be fieldName; case-sensitive.
I'm not very familiar with the Velocity tag support, but it may be
similar to Freemarker in that some tags are in-line tags, some are block
tags, and decisions were made at some point to try and cover the most
common use-case.
If that's the case then you'll probably have to loop over the field
names of interest.
Dave
Robin Mannering wrote:
Thanks for your response.
Unfortunately, #sfielderror ("fieldname=username") does not work.
All the current field errors are rendered in an unordered list.
Using struts2 tags, it would be:
<s:fielderror>
<s:param>field1</s:param>
<s:param>field2</s:param>
</s:fielderror>
OR
<s:fielderror>
<s:param value="%{'field1'}" />
<s:param value="%{'field2'}" />
</s:fielderror>
These are two tags nested which I'm having trouble translating into
Velocity. Any other ideas?
Dave Newton wrote:
Robin Mannering wrote:
From the documentation at
http://struts.apache.org/2.1.6/docs/velocity-tags.html, I see the
format is:
#s**tag **(...) ... #end
However, I'm having difficult using the tags. The following is ok
and works as expected
#stextfield ("label=Employee Name" "name=empname" "size=15"
"maxlength=10")
However, I would like to display fieldErrors as I need by name. I'm
trying the following which doesn't seem to work.
#sfielderror #sparam ("value=username")
#end
The 'end' tag is not expected on this one
Can anybody point me in the right direction?
Does #sfielderror ("fieldname=username") not work, or do you need
multiple fields?
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org