You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2006/02/27 19:04:00 UTC

DO NOT REPLY [Bug 38798] New: - validator argument - resource="false" ignored

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

           Summary: validator argument - resource="false" ignored
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: other
            Status: UNCONFIRMED
          Keywords: ErrorMessage
          Severity: normal
          Priority: P4
         Component: Validator
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: ros@ml.lv


In ValidationResources.java function addOldArgRules does not set value of
�resource�, like: 
String resource = attributes.getValue("resource");
if (resource != null && !"".equals(resource)) {
	arg.setResource(resource);
}
As a result I've got struts validation message "Field can not be less than null
characters."

Because in config there is defined a value '2' for minlength, but commons.jar
searches for resource with name '2' in resource bundule.

Configuration:

              <field property="name"
                     depends="required,minlength,maxlength">

                  <arg0 key="fieldForm.name"/>
                  <arg1
                      name="minlength"
                    key="${var:minlength}"
                      resource="false"
                  />
                  <arg1
                      name="maxlength"
                    key="${var:maxlength}"
                      resource="false"
                  />
                  <var>
                    <var-name>minlength</var-name>
                    <var-value>2</var-value>
                  </var>
                  <var>
                    <var-name>maxlength</var-name>
                    <var-value>4</var-value>
                  </var>
              </field>

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


DO NOT REPLY [Bug 38798] - [validator] validator argument - resource="false" ignored

Posted by bu...@apache.org.
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=38798>.
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=38798





------- Additional Comments From niallp@apache.org  2006-02-28 12:38 -------
Sorry, I'm not an XDoclet user - you'll have to ask XDoclet about this.

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


DO NOT REPLY [Bug 38798] - [validator] validator argument - resource="false" ignored

Posted by bu...@apache.org.
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=38798>.
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=38798





------- Additional Comments From ros@ml.lv  2006-02-28 08:51 -------
Thank you!

I use Xdoclet to generate config file. In my case it's 
	 * @struts.validator type="minlength" arg1value="${var:minlength}"
	 * @struts.validator-var name="minlength" value="2"

How can I switch to the new format using XDoclet?

>  <arg position="1"
>      name="minlength"
>      key="${var:minlength}"
>      resource="false"
>  />
> 



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


DO NOT REPLY [Bug 38798] - [validator] validator argument - resource="false" ignored

Posted by bu...@apache.org.
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=38798>.
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=38798


niallp@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
            Summary|validator argument -        |[validator] validator
                   |resource="false" ignored    |argument - resource="false"
                   |                            |ignored




------- Additional Comments From niallp@apache.org  2006-02-27 21:14 -------
I have fixed this, thanks for reporting it:

  http://svn.apache.org/viewcvs?rev=381425&view=rev

This affects only the deprecared arg0 - arg3 elements. If you switch to the 
newer "arg" format (available in the 1.1 dtd) then you shouldn't have any 
problems:

 <arg position="1"
     name="minlength"
     key="${var:minlength}"
     resource="false"
 />


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