• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

struts 2 addFieldError not working.

 
Ranch Hand
Posts: 91
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear all,

I have below code trying to put the error next to the field control. But failed.

 
Raymond Chiu Wing Hing
Ranch Hand
Posts: 91
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I find out below things:

Within the form, if i put <s:fielderror fieldName="loanForm.loanAmountDesired"/> the top, it will show.
Am I put loanForm.xxxx as the fieldName the reason??
However, If I changed the name of s:textfield and s:fielderror to be xxxxxxx without loanForm.xxx, it still cannot.

--> No shown.
<s:bean name="com.aeon.onlineapplications.struts.form.LoanForm" var="loanForm">
<s:fielderror fieldName="loanForm.loanAmountDesired"/>

--> But if below, it will show.
<s:fielderror fieldName="loanForm.loanAmountDesired"/>
<s:bean name="com.aeon.onlineapplications.struts.form.LoanForm" var="loanForm">

reply
    Bookmark Topic Watch Topic
  • New Topic