• 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

How to remove auto message... struts2.

 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys,

How to remove the auto messages? I have already put these fields. <s:actionerror /> and <s:fielderror />. Howerver when error is triggered on the validate() method.. my error message will pop up on the <s:actionerror /><s:fielderror />. However the messages would also popout above my fields... I want to remove the messages on top of my fields.. How can i do this? I am stock guys..

Thanks,
Victor
 
victor chiong
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please help?



LOT MOVEMENT

*UserID must not be blanks
*Password must not be blanks


UserID must not be blanks ---> I want to remove this one because i already has an error message above.
UserName:

Password must not be blanks--->I want to remove this one because i already has an error message above.
Password:
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Victor,

The messages which are coming on top of your page is coming from validate method which returns the actionerror and those error are displayed on jsp as you have mentioned <s:actionerror />.
remove <s:actionerror> through which you can remove the mesages top of the page.

Validate method in actionform is server side validation which you should keep and i advise you to remove the javascript validation.

Regards
Jatan

 
victor chiong
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for the advice

"Validate method in actionform is server side validation which you should keep and i advise you to remove the javascript validation. " -- any reason? I decided to use the action error because it looks good? it does not destroy the allignment of the fields... I want to know your reason because I am new to this world of struts.

Thanks,
Vic
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to get rid of the error messages at the top of the page, remove the <s:actionerror /> tag. I think this is what Jatan is talking about.
If you want to get rid of the messages next to your fields, you have to use the "simple" tag theme. This is explained in this FAQ entry and the default theme documentation
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic