DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33258>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33258

           Summary: errorStyleClass doesn't work with indexed lists
           Product: Struts
           Version: 1.2.6 Beta
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Validator Framework
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


errorStyleClass/id/style fails when using the following example:

<c:forEach items="foos" id="foo">
  <html:text errorStyleClass="fooError" name="foo" property="day" 
indexed="true" />
</c:forEach>

with a cooresponding validation:
<field indexedListProperty="foos" property="day" depends="mask">
...
</field>

The validator will store error property names as "foos[xx].day".  However, since
the input text name is "foo[xx].day", the errorStyleClass attribute will never
be used.

The most robust fix would be to add a "key" attribute to the validator dtd,
allowing the user to specify the error property name to store.  ie:
<field indexedListProperty="foos" property="day" depends="mask" key="foo[].day">

...Where any instance of [] in a key would be replaced by the index of the list
that failed validation.

Another possibility would be to force inclusion of the indexedProperty attribute
whenever indexedPropertyList is present.  The error key name would then be set
to the value of the indexedProperty attribute.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to