You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2004/12/14 14:41:04 UTC

DO NOT REPLY [Bug 32695] New: - Validation message - value, index not accessible

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=32695>.
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=32695

           Summary: Validation message - value, index not accessible
           Product: Struts
           Version: 1.2.4
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Validator Framework
        AssignedTo: dev@struts.apache.org
        ReportedBy: tomasz.bech@bull.com.pl


Unortunately the value and index is not accessible for displaying together with
the message. For example I would imagine:
 <field property="email" depends="email" indexedListProperty="mylist">
   <arg0 key="${this:value}" resource="false"/>
   <arg1 key="${this:index}" resource="false"/>
 </field>
So in the message would appear the value of the field email and the index of the
element in collection.
And more: for ValidWhen would be nice to have the value of the other field as
well ("${fielddane:value}").
I've put 'enhancement' but IMO it is the BASIC and trivial functionality which
validator should implement.
I said 'trivial' - it seemed to me. But after looking into the code of Struts
and commons-validator I don't think any longer that it is trivial. Simply
because not clean design of validator - example: commons-validator is treating
the indexedListProperty (reading from the bean indexedProperty), but reading the
value of the field is done in Struts (public static boolean validateMask(...)).
So there is no clean way now to read value of the bean on common-validators
level. And there is no clean way to read position/index in indexedProperty on
Struts level. It is what I mean not clean design.
I think validator needs real and smart refactoring before implementing this
feature (together with nested indexedListProperty).
(I recently moved from in-house C++ framework to JAVA-WEB-STRUTS and I found
plenty of strange limitations of STRUTS modules, I hope that I will spare time
at work to implement and give some patches)

-- 
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: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org