Will,

The *only* reason for my last note was to tell you *why*
you didn't find a validation.xml file on your system. As to the
part about "spout off about how much you know", well, that's
just too funny. I may even have to save that e-mail :)

have a good one,

-jeff

On Saturday, February 22, 2003, at 10:17 PM, w i l l i a m b o y d wrote:

jeff,

i *am* impressed. and the impression i get is that you have no interest
whatsoever in helping me solve my problem, except in as much as it gives you
a reason to spout off how much you know about the validation framework.
which i've already clarified, is of no use to me and my setup.


SHEESH!!!

----- Original Message -----
From: "Jeff Kyser" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, February 23, 2003 3:59 AM
Subject: Re: Help: ActionError - <html:errors /> does not expand
the{0}placeholder


Sorry, Will, I missed the 1.0.2 reference. Have only worked with 1.1.3,
and using the validation framework. In that situation, the
validation.xml
file is essentially a bridge between the validation rules (in
validator-rules.xml)
and the error messages in your resource bundle. And unless you'd
created one, it wouldn't exist. It could be named anything really, as
you
specify its name in your struts-config.xml file:


         <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>

but i guess all that's not much help.

-jeff

On Saturday, February 22, 2003, at 09:14  PM, w i l l i a m b o y d
wrote:

thanks for your reply, jeff.

i wasn't aware that struts 1.0.2 used a validation.xml file. there is
nothing like that anywhere on my system. besides, it's not the
validation
that is the problem. the validation is working fine. the problem is
that the
paramater being passed into the ActionError constructor isn't being
included
in the error message that is being output.

----- Original Message -----
From: "Jeff Kyser" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Sunday, February 23, 2003 3:06 AM
Subject: Re: Help: ActionError - <html:errors /> does not expand the
{0}placeholder


So what does your validation.xml file look like w.r.t. the rule in
question?

-jeff

On Saturday, February 22, 2003, at 09:00  PM, w i l l i a m b o y d
wrote:

hello all,

developing on w98 with tomcat 3.2.24, mysql 3.23.36, struts 1.0.2,
jdk
1.3.1., servlet 2.2. will be deploying on basically similar setup;
but
deployment os is xp.

i got a jsp page that has a choice box that allows multiple choices.
i
set a
validation rule in my action form's validate method, that disallows
users
from selecting more options than permitted by my limit. if a user
goes
over
the limit the form doesn't get submitted. the validation rule is
checked
just fine; struts creates an error for it and adds it to the errors
collection. but the error message that is displayed on the input page
does
not contain the parameterized message as expected. instead, it shows
the
complete, unformatted message, exactly (minus an apostrophe) as it
appears
in the resource bundle! does anybody know what i'm overlooking? is
this a
bug in 1.0.2?


here is what gets displayed (verbatim) on the input page after the
validation error is created:

Sorry! Youve selected too many choices for {0}. (what happened
to my
apostrophe in "You've" ?)


here is the appropriate line from my resource bundle:

      error.prefs.limit=Sorry! You've selected too many choices for
{0}.

here is a snip from my form's validate method:
      ...
      ActionErrors errors = new ActionErrors();
      ...
      if ( isTooManyPrefs ) {
         ActionError prefMusicError = new ActionError(
"error.prefs.limit",
"Preferred Music" );
  errors.add( "prefMusic", prefMusicError );

       }
      ...

here are the results of me looping through prefMusicError.getValues()
inside
validate:


      error.prefs.limit's replacement value # 0: Preferred Music
      error.prefs.limit's replacement value # 1: null
      error.prefs.limit's replacement value # 2: null
      error.prefs.limit's replacement value # 3: null


here is a snip from the input page that generates the validation error and to which struts reports the error:

      ...
      <td><html:errors />&nbsp;</td>
      ...

what's going on here? why doesn't struts format the message to
include
the
replacement value. it's obviously there! at least *i* can get at it
from the
object array that i get from ActionError.getValues()! please, help!
thanks
in advance.

will



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




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


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



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


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



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



Reply via email to