You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by kimbuba <ki...@yahoo.it> on 2003/10/29 03:15:40 UTC

Validator. key: {0} doesn't display.

hello all!
i don't know if i've found a bug or i made a mistake.
I set up a validator. All works but the key to be display on forms in case
of errors.

---i have my app divided into modules.
---on my main config file i have resource message:
The one i use for Form Errors.
<message-resources key="users.error"
parameter="it.kimbuba.webapps.struts3.users.messages.User-Errors"
null="false"/>
inside it, i have pairs of keys & values
in example:
#Formskeys
InsertForm.name=NameField
....
//in case of error the {0} doesn't display the key. Nothing is display
instead of the {0}!
errors.required= {0} is required.

---My formSet:
<formset>

 <form name="insertForm">
             <field  property="name" depends="required">
                    <arg0 key="InsertForm.name"/>
             </field>

--On my JSP i have
<html:errors bundle="users.error" property="name"/>

but only this is display:
"is required."
instead of  "NameField is required."



Does anyone with the same config had any problems?
Is this a common problem or only mine?

the config is : having modules and a different resource bundle(not the
application one).



thnx to all!








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


Re: Validator. key: {0} doesn't display.

Posted by kimbuba <ki...@yahoo.it>.
Hi Adam.
Thnx for answering.
I'll try with no config and than incrementally i'll see what's goin on.

Thnx!

> Hi Kimbuba,
> I had this error too when I first set up Validator, but unfortunately I
> can't remember what it was. I suspect it is some small configuration
> problem. I suggest you make a test with the minimum possible
> configuration and see if the error still occurs. Also try setting null
> to true for the message resource. Sorry I can't be more specific.
>
> Adam
>
> -- 
> struts 1.1 + tomcat 5.0.12 + java 1.4.2
> Linux 2.4.20 RH9




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


Re: Validator. key: {0} doesn't display.

Posted by Adam Hardy <ah...@cyberspaceroad.com>.
On 10/29/2003 03:15 AM kimbuba wrote:
> hello all!
> i don't know if i've found a bug or i made a mistake.
> I set up a validator. All works but the key to be display on forms in case
> of errors.
> 
> ---i have my app divided into modules.
> ---on my main config file i have resource message:
> The one i use for Form Errors.
> <message-resources key="users.error"
> parameter="it.kimbuba.webapps.struts3.users.messages.User-Errors"
> null="false"/>
> inside it, i have pairs of keys & values
> in example:
> #Formskeys
> InsertForm.name=NameField
> ....
> //in case of error the {0} doesn't display the key. Nothing is display
> instead of the {0}!
> errors.required= {0} is required.
> 
> ---My formSet:
> <formset>
> 
>  <form name="insertForm">
>              <field  property="name" depends="required">
>                     <arg0 key="InsertForm.name"/>
>              </field>
> 
> --On my JSP i have
> <html:errors bundle="users.error" property="name"/>
> 
> but only this is display:
> "is required."
> instead of  "NameField is required."
> 
> 
> 
> Does anyone with the same config had any problems?
> Is this a common problem or only mine?
> 
> the config is : having modules and a different resource bundle(not the
> application one).

Hi Kimbuba,
I had this error too when I first set up Validator, but unfortunately I 
can't remember what it was. I suspect it is some small configuration 
problem. I suggest you make a test with the minimum possible 
configuration and see if the error still occurs. Also try setting null 
to true for the message resource. Sorry I can't be more specific.

Adam

-- 
struts 1.1 + tomcat 5.0.12 + java 1.4.2
Linux 2.4.20 RH9


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