I am using a nightly build from about 1 week ago. I never updated my
dtd for validator though. Im going to do that and check out your
suggestion. Never occured to me that it mightnt be backwards
compatatable.

--b

On Tue, 13 Jul 2004 15:52:41 -0400, Bill Siggelkow
<[EMAIL PROTECTED]> wrote:
> Are you using Struts 1.2 or the nightly build? I had this issue the
> other day and I think I got around it by using the new <arg> element
> instead of <arg0> -- simply change arg0 to arg in your validation.xml.
> 
> <arg key="label.oldPassword"/>
> 
> Or you can try using the new position attribute:
> 
> <arg key="label.oldPassword" position="0"/>
> 
> Bill Siggelkow
> 
> 
> 
> 
> Bryan Hunt wrote:
> > I have the following jsp page
> > snip=
> > <html:errors/>
> >  <table width="712" border="0">
> >    <tr>
> >      <td width="197">
> >        <html:form action="/client-change-password-action">
> >          <table>
> >            <tr>
> >              <th align="right"><bean:message
> > key="label.oldPassword"/>:</th>
> >              <td>
> >                <html:text property="oldPassword"/>
> >              </td>
> > etc etc etc
> > =snip
> >
> > I have 4 struts config files default.xml,client.xml,admin.xml,sales.xml
> >
> > They are declared as so in my web.xml file.
> > snip=
> > <init-param>
> > <param-name>config</param-name>
> > <param-value>/WEB-INF/struts/default.xml,
> > /WEB-INF/struts/client.xml,
> > /WEB-INF/struts/sales.xml,
> > /WEB-INF/struts/admin.xml
> > </param-value>
> > </init-param>
> > =snip
> >
> > The default.xml contains the following lines which work just fine for
> > everything else
> > snip=
> > <message-resources parameter="ie.jestate.web.ApplicationResources"/>
> >
> > <!-- Plug Ins Configuration -->
> >
> >  <plug-in className="org.apache.struts.tiles.TilesPlugin" >
> >    <set-property property="definitions-config"
> > value="/WEB-INF/tiles/default-defs.xml,/WEB-INF/tiles/client-defs.xml,/WEB-INF/tiles/sales-defs.xml,/WEB-INF/tiles/admin-defs.xml"
> > />
> >    <set-property property="moduleAware" value="true" />
> >    <set-property property="definitions-parser-validate" value="true" />
> >  </plug-in>
> >
> >   <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
> >    <set-property property="pathnames"
> > value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
> >  </plug-in>
> > =snip
> >
> > My validation.xml file has the following relevant lines ...
> > snip=
> >  <form name="ClientChangePasswordForm">
> >            <field property="oldPassword" depends="required">
> >            <arg0 key="label.oldPassword"/>
> >            </field>
> >            <field property="newPassword" depends="required">
> >            <arg0 key="label.newPassword"/>
> >            </field>
> >            <field property="confirmNewPassword" depends="required">
> >            <arg0 key="label.confirmNewPassword" />
> >            </field>
> >        </form>
> > =snip
> >
> > My ApplicationResources.properties file has the following content
> > snip=
> > label.oldPassword=Old Password
> > label.newPassword=New Password
> > label.confirmNewPassword=Confirm New Password
> > errors.required={0} is required.<br>
> > errors.minlength={0} cannot be less than {1} characters.<br>
> >
> > =snip
> > Now everything works fine including the labels (ie <bean:message
> > key="label.oldPassword"/> ) but when
> > the form is submitted but not all the fields are filled out I get the
> > following messages ( output from <html:errors/>.
> >
> > null is required.
> > null is required.
> > null is required.
> >
> > Is this possibly a Struts bug or is it too late in the day and I drink
> > to many units at the weekend being an Irishman ?
> >
> > --b
> 
> ---------------------------------------------------------------------
> 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