> > Im not sure where to place my properties file.
I almost always put my messages to file named package.properties in
the same folder as my action's classes.
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
-
To un
--- Tauri Valor <[EMAIL PROTECTED]> wrote:
> I tried as you advised. I get the default error message 'Please enter a
> value for first name ' which is in the "message" .
>
> Im expecting the error messaage from the properties file.
>
> I think Im placing my properties file in the wrong location.
enter a value for First name")
>
> error.required = ${fieldName} is required!
>
>
--
View this message in context:
http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16320151.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
Hi,
You mess too many thing, please try like this:
@RequiredStringValidator(key = "error.required", message = "Please
enter a value for First name")
error.required = ${fieldName} is required!
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
---
tringValidator(key = "some.key")
> public void setFirstName(String firstName) {
> this.firstName = firstName;
> }
>
>
>
>
>
--
View this message in context:
http://www.nabble.com/Struts2-A
> Is it possible for me to have multilingual Validations using Annotation
> Based Validations in Struts2 ?
Yes, you can, just add key = some.error.message to your annotation, like below
@RequiredStringValidator(key = "some.key")
public void setFirstName(String firstName) {
this.
>> Regards
>> --
>> Lukasz
>>
>> http://www.linkedin.com/in/lukaszlenart
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
--
View this message in con
t; Lukasz
>
> http://www.linkedin.com/in/lukaszlenart
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://ww
>
By default s:password tag don't shows value of your password, you can
change such behaviour by adding attribute showPassword=true, but you
should consider security issue.
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
-
nart
>
> -----
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Struts2-Annotation-based-Validation-tp160
>
>
> width="115">First Name
> width="142"> class="form_field">
>
>
>
>
>
>> Regards
>> --
>> Lukasz
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
>
--
mmands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16116146.html
Sent from the Struts - User mailing list archive at Nabble.com.
-
> But when I enter the value in the textbox and click submit again, the
> validation error for next is displayed correctly but entered value
> disappears in the textbox which is abnormal .
Maybe you are redirecting to the next page? Could you paste snippet
for your struts.xml and jsp?
Regards
--
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16115634.h
> In Struts2 error messages are stored in the ValueStack in an object
Yes, I made mistake, I've mean in request scope, not in request object ;-)
Regards
--
Lukasz
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional comm
Lukasz Lenart wrote:
Hi,
Error messages are stored in request, you have to subclass
ActionSupport and add some mechanism to store messages in session.
Regards
In Struts2 error messages are stored in the ValueStack in an object
implementing ValidationAware.
If your action extends ActionSu
IL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16090926.html
Sent from the Struts - User mailing list archive at Nabble.com.
--
Hi,
Error messages are stored in request, you have to subclass
ActionSupport and add some mechanism to store messages in session.
Regards
--
Lukasz
http://www.linkedin.com/in/lukaszlenart
-
To unsubscribe, e-mail: [EMAIL PROT
fielderror stored in a request or a session object ?
Please help me understand this .
Thanks,
Tauri.
--
View this message in context:
http://www.nabble.com/Struts2-Annotation-based-Validation-tp16089678p16089678.html
Sent from the Struts - User mailing list archive at Nabble.com
OK, that worked, in that the validators ran and error messages were
written to the log, however my execute method still executed and
nothing happened on the UI with the error message tags.
I guess the larger question here is, if I'm trying to learn Struts, is
the best strategy to dig into Struts 1
Dave,
How do we use the action-alias XML approach if we've the same alias
but different methods on the same action ?
ex :
say myAction has methodA(), methodB() etc. which are invoked using
different submit buttons in the jsp
In this case, we could have myAction-abc-validation.xml , but how
--- meisam sarabadani wrote:
> can somebody tell me why we need the struts.xml and
> build.xml or web.xml? what are their duties ?
Google can tell you.
struts.xml is the usual name for the Struts 2
configuration file. build.xml is for Apache Ant.
web.xml is for configuring your web application.
can somebody tell me why we need the struts.xml and build.xml or
web.xml?what are their duties ?
On 8/16/07, j alex <[EMAIL PROTECTED]> wrote:
>
> try changing @RequiredFieldValidator to @RequiredStringValidator
>
> the RequiredFieldValidator only looks for "not null" and even if the
> field is n
try changing @RequiredFieldValidator to @RequiredStringValidator
the RequiredFieldValidator only looks for "not null" and even if the
field is not entered, but is present on the form, it'll be populated
with "" (empty) and not a java null.
-Joseph
On 8/16/07, David Copeland <[EMAIL PROTECTED]> w
Here's my struts.xml
/Register.jsp
my web.xml:
NoShame
struts2
org.apache.struts2.dispatcher.FilterDispatcher
actionPackages
com.naildrivin5.applications.noshame.client
--- j alex <[EMAIL PROTECTED]> wrote:
> ex : if an Action has multiple methods and only
> certain fields are tied to each method, we can
> bunch together validations for each method
> using annotations, but this is not possible using
> XML
You can create validation XML files on an action-alias
bas
I think annotations give you more flexibility than XML .
ex : if an Action has multiple methods and only certain fields are
tied to each method, we can bunch together validations for each method
using annotations, but this is not possible using XML
On 8/15/07, Laurie Harper <[EMAIL PROTECTED]> wr
David Copeland wrote:
I'm a Struts newb and am trying to get up to speed on Struts 2.
The scant documentation is throwing me a bit; I'm trying to do
everything annotation-based, and for Validation, it seems to be simply
not working at all.
Per the docs, I have tagged my action class with @Valid
I'm a Struts newb and am trying to get up to speed on Struts 2.
The scant documentation is throwing me a bit; I'm trying to do
everything annotation-based, and for Validation, it seems to be simply
not working at all.
Per the docs, I have tagged my action class with @Validator and tagged
my setXX
30 matches
Mail list logo