You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dmitry Kashin <kd...@exch.inec.kharkov.com> on 2003/04/11 18:04:59 UTC

Re[2]: Validation javascripts include

It would be very good.

Where I can found detailed description of this??? How Validator know
which file currently used??? And what will happen if script composed
from few files???
I don't find this info in docs.

Thanks in advance

JK> The validator plugin allows you to specify multiple files,
JK> so I don't see why you couldn't break things up as you
JK> saw fit, placing less frequently used rules in a separate
JK> file.

JK> Like you say, you'd have to sort out any common
JK> stuff yourself, although I don't see any

JK> -jeff

JK> On Friday, April 11, 2003, at 10:35  AM, Dmitry Kashin wrote:

>> Hello All
>>
>>  Can you explain me how to include only used in current form validator
>>  javascripts from validation-rules.xml
>>  By default all present scripts rendered by <html:javascript 
>> formName="formName"/>
>>  and in case of large validation-rules.xml file included scripts
>>  mostly not used.
>>  May be it's possible to split somehow validation-rules.xml??? But in
>>  this case difficult to share common scripts.
>>
>>  Thanks in advance
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>


JK> ---------------------------------------------------------------------
JK> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
JK> For additional commands, e-mail: struts-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Re[2]: Validation javascripts include

Posted by Jeff Kyser <kt...@comcast.net>.
So sorry, Dmitry, a beautiful Spring day here, and the running trail
was calling my dog and me for an outing, mud, wildflowers, and all :-)

Its the 'pathnames' property where you can specify multiple files. In
the example below from my struts-config file, i've got three separate
files: the 'standard' rule file, one with some custom rules I found or
developed that apply to many apps, and one that contains the rule
mappings specific to this application.

     <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
         <set-property property="pathnames"
                       value="/WEB-INF/validator-rules.xml,
                              /WEB-INF/validator-custom-rules.xml,
                              /WEB-INF/validation.xml">
         </set-property>
     </plug-in>

As far as documentation resources, the following link is where I
got most of the stuff I used, that plus the PDF copy of chapter
12 of 'Struts in Action' also available at the bottom of the
page specified by this link:

	http://jakarta.apache.org/struts/userGuide/dev_validator.html

HTH,

-jeff

On Friday, April 11, 2003, at 11:04  AM, Dmitry Kashin wrote:

> It would be very good.
>
> Where I can found detailed description of this??? How Validator know
> which file currently used??? And what will happen if script composed
> from few files???
> I don't find this info in docs.
>
> Thanks in advance
>
> JK> The validator plugin allows you to specify multiple files,
> JK> so I don't see why you couldn't break things up as you
> JK> saw fit, placing less frequently used rules in a separate
> JK> file.
>
> JK> Like you say, you'd have to sort out any common
> JK> stuff yourself, although I don't see any
>
> JK> -jeff
>
> JK> On Friday, April 11, 2003, at 10:35  AM, Dmitry Kashin wrote:
>
>>> Hello All
>>>
>>>  Can you explain me how to include only used in current form 
>>> validator
>>>  javascripts from validation-rules.xml
>>>  By default all present scripts rendered by <html:javascript
>>> formName="formName"/>
>>>  and in case of large validation-rules.xml file included scripts
>>>  mostly not used.
>>>  May be it's possible to split somehow validation-rules.xml??? But in
>>>  this case difficult to share common scripts.
>>>
>>>  Thanks in advance
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>>>
>
>
> JK> 
> ---------------------------------------------------------------------
> JK> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> JK> For additional commands, e-mail: 
> struts-user-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org