You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by BugRat Mail System <to...@cortexity.com> on 2000/12/20 14:35:29 UTC

BugRat Report #634 has been filed.

Bug report #634 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com/BugRatViewer/ShowReport/634>

REPORT #634 Details.

Project: Struts
Category: Feature Requests
SubCategory: Enhancement
Class: feature
State: received
Priority: medium
Severity: non-critical
Confidence: public
Environment: 
   Release: 20001205
   JVM Release: 1.2
   Operating System: WinNT
   OS Release: 4.0
   Platform: Intel

Synopsis: 
add public method in ActionErrors to iterate across property names

Description:
i would like to propose that a public method be 
added to the ActionErrors class to retrieve an
enumeration of all the property names that 
have errors associated with them.  additionally, 
a size method should be added to return the 
count of the number of properties that have 
errors associated with them.
(In addition, it may be useful or desired to associate
an ActionError instance directly with a property in
the ActionError class itself).

there currently is no way to associate an ActionError 
with a particular property unless you a priori 
know the property name in question.  this
is particularly troublesome when trying to 
use a generic error page to display validation errors.  typically, in such a page, one needs to display
the field/property name associated with its errors. 
See, for example, this rendition of an error page:

     Validation Failure:
        
           property1     -     some error message1
                         -     some error message2
           property2     -     some error message3
           property3     -     some error message4
                         -     some error message5

Additionally, when the user goes back to the page 
with the relevant form, it is useful to somehow 
visually highlight the labels for the form entry fields 
in question.  without being able to get at the property 
names with errors, it's extremely difficult to 
accomplish this. The _errors_ tag certainly provides 
no help in any of these situations.  perhaps create
some new error tags that allow you to iterate errors
grouped by property and to get at the property and 
error messages independently (embedded in 
HTML markup in JSP).