• 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

Struts (v1.1b3) html:errors property attribute?

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having difficulty getting the 'property' element to work when the error(s) I'm trying to present are produced by global exceptions.
I have configured a couple of global-exception types that my business tier could throw and want to present the messages at the top of the form.
On the same form, I also am handling presentation validation and presenting the errors next to the related input field on the form using the 'property' attribute:
<html:input property="foo"/><html:errors property="foo"/>
I only want the errors produced by the global exceptions to appear at the top of the page.
If I simply use <html:errors/> at the top of the page, the property-specific errors are repeated there as well as next to the input fields.
I thought I understood that the errors produced by a global exception could be referenced by the ActionErrors.GLOBAL_PROPERTY property key.
However, the following produces no output:
<html:errors property="<%=ActionErrors.GLOBAL_ERROR"%>"/>
If I don't specify the 'property' attribute, the global ex errors are presented.
So, how should a global exception's ActionError's get referenced?
 
Look! It's Leonardo da Vinci! And he brought a tiny ad!
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic