• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Displaying error message - Struts2

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How I can I display error message on right side of <s:textfield> tag? In my page, I have a set of s:textfield for user inputs and want to dispaly the vidation eror for each of the s:textfield, not as group.

I' using struts 2 and using validator framework.

Thanks
/Abhi
 
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which theme you are using. For simple theme this feature is not available. So you are on your own to implement it. Though for xHTML(default) and AJAX- this feature is already there. Now I am not sure will this be of any help in your scenario or not.
 
Abhi Roy
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Sam, thanks for your response. I'm using AJAX theme, but with this theme the respective field errors are appearing on the top. But I want it as below

UserName 595696 X Invalid User
Password X Password required

How can I achive this?
Thanks
/Abhi


untitled.JPG
[Thumbnail for untitled.JPG]
 
Shashank Rudra
Ranch Hand
Posts: 131
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now that is something to do with the extending/wrapping the pre-exisitng tags available. For that you can use
http://struts.apache.org/2.0.6/docs/xhtml-theme.html
http://struts.apache.org/2.0.6/docs/template-loading.html

I think there is a way to just set align attribute of <s:error-tag.>
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you found solution for this problem
 
Cob is sand, clay and sometimes straw. This tiny ad is made of cob:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
    Bookmark Topic Watch Topic
  • New Topic