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?

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
------------------------------------------------------------------------


No virus found in this incoming message.
Checked by AVG - www.avg.com Version: 8.5.375 / Virus Database: 270.12.93/2205 - Release Date: 06/27/09 05:53:00

Reply via email to