2013/3/9 john lee :
> i just checked your demo, looks like the first tricky is to define proxy
> action name signin in struts.xml
It isn't any trick, it's the normal why how to define many actions
base on one action class.
> struts.xml
>
>
> /example/Login.jsp
> Welcome
>
>
> *
?
is this the only way to lett struts2/spring validation works?
thanks so much in advance
john
From: Lukasz Lenart
To: Struts Users Mailing List ; john lee
Sent: Friday, March 8, 2013 7:27 AM
Subject: Re: struts 2 validation if use with spring
2013/3/
2013/3/8 john lee :
> Lukasz,
>
> thanks for your help, i just tried, but still not works
>
> any other suggestion?
I have prepared a small demo app
https://github.com/lukaszlenart/struts2-spring-validation
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
--
Lukasz,
thanks for your help, i just tried, but still not works
any other suggestion?
thanks in advance
john
From: Lukasz Lenart
To: Struts Users Mailing List
Sent: Friday, March 8, 2013 12:01 AM
Subject: Re: struts 2 validation if use with spring
2013/3/8 john lee :
>
As specified in the docs [1][2], validation file name must match schema:
class-name-validation.xml -> LoginAction-signin-validation.xml
[1]
http://struts.apache.org/development/2.x/docs/validation.html#Validation-DefiningValidationRules
[2]
http://struts
2013/3/7 john lee :
> Java backtrace for programmers:
> --
> freemarker.template.TemplateModelException: Method public java.util.List
> org.apache.struts2.components.Form.getValidators(java.lang.String) threw an
> exception when invoked on org.apache.struts2.components.Form@d6147e
>
If you define action alias for specific methods in your struts.xml (you
can do so with wildcards too), then you can use this format
--validation.xml as stated below.
http://struts.apache.org/2.1.8.1/docs/validation.html
Defining Validation Rules
Validation rules can be specified:
Per Action c
See the FAQ
http://struts.apache.org/2.x/docs/how-do-we-repopulate-controls-when-validation-fails.html
On Mon, Jan 4, 2010 at 2:40 AM, Rakesh K nair wrote:
>
> Hi
>
> In my struts2 jsp page there is a "selection list".I am populating the
> "list" from action class before rendering the page.I hav
Hi Rakesh,
use preparable interface and in prepare method initialize anything
that is necessary to show that page.
Best greetings,
Pawel Wielgus.
2010/1/4, Rakesh K nair :
>
> Hi
>
> In my struts2 jsp page there is a "selection list".I am populating the
> "list" from action class before rendering
The code below works a treat but just to help anyone out who might be
trying to do the same thing you can also use the tag
which does a similar thing but without the fine control on the
formatting.
Quoting Greg Lindholm :
So, fieldErrors is a Map>, the key is the field name
and the value
More info for the committer:
It looks like the javadoc on org.apache.struts2.components.IteratorComponent
contains info that Map is supported but it is not getting into the tag doc
perhaps because the is messed up and not on
it's own line.
Also a note that a Map will iterate on the entrySet() wo
Hey, you are correct.
Just dove into the code and I found that is uses a MakeIterator utility
class that if given a Map will call entrySet().
Maybe a commiter will be kind enough update the iterator tag doc to include
a Map example and a note on how Map is converted to an Iterator.
2009/10/2
Hi Greg,
i was about writing that one should read iterator tag docs
because one can use maps in s:iterator value,
but instead i've just read it myself and the info about iterating maps
is not there.
I use s:iterator where value is a map and it works in 2.1.6
just adding key or value inside iterator
Thanks Greg, that does the trick. I am now able to display the
validation errors at the top of the form.
Quoting Greg Lindholm :
So, fieldErrors is a Map>, the key is the field name
and the value is a List of messages.
I don't think you can use directly on a Map
as a Map is not iteratable (
So, fieldErrors is a Map>, the key is the field name
and the value is a List of messages.
I don't think you can use directly on a Map
as a Map is not iteratable (check the iterator tag doc [1]).
I think you will need to iterate on either the entry set or the key set .
As for %{top}, this gives
Okay that makes sense. Thanks for that!
But your example used a hardcoded fieldname. In order to dynamically
loop the fieldnames and display the errors for each of those fields I
have tried:
ERROR1:
ERROR2
But it always outputs the whole list, ie firs
There are three buckets for error messages; general errors, general messages
and field errors.
and display the general errors and
general messages.
Most validation will product field errors which by default get rendered
beside the field with the error.
You can control how field errors get displa
Hello
Struts 2 in action is good book to resolve yours questions.
Greeting
- Original Message -
From: "Eileen Hurley"
To:
Sent: Thursday, October 22, 2009 10:07 AM
Subject: Struts 2 Validation issues
All,
I have problems with xml validation and Struts 2 (2.0.14). The
validat
i.
> Date: Wed, 8 Jul 2009 15:23:53 -0700
> From: robsonsil...@gmail.com
> To: user@struts.apache.org
> Subject: Re: Struts 2 Validation
>
>
> People,
>
> If someone want help me about my university project, here is my e-mail:
> robsonsil...@gmail.com . I can
People,
If someone want help me about my university project, here is my e-mail:
robsonsil...@gmail.com . I can send to you the entire projcect.
This project is about control of stock and MRP. I´m using Struts2, Hibernate
and MYSQL. It is separate on three layers with MVC.
Robson Rodrigues wr
Someone can solve my problem? the validator always say the validation failed
:(
Robson Rodrigues wrote:
>
> Hello People,
>
>
>
> i´m using the struts 2 in a project and i´m with a problem on the
> validation. When i try validate a form, the struts say the validation
> failed, even when the
Hi,
Thanks for your response, now I am able to validate Date fields. But
still I have 2 more doubts.
1) How to change the Date format?
If I enter Date in MM/DD/ in the text field, it is validating but I want
the format as DD/MM/. How do I change the date format?
I tried like thi
NR031 wrote:
1) How to validate a Date format in Struts 2
I have my -validation.xml like this :
Please enter your Date of birth
Perhaps with the date validator:
http://struts.apache.org/2.x/docs/date-validator.html
2) How to compare two fields
I a
Hi Lukasz,
Thanks for the solution. I will try this.
Regards,
Jitendra
_
From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com]
Sent: Monday, January 19, 2009 2:39 PM
To: Struts Users Mailing List
Subject: Re: Struts 2 validation is not working for comma separated number
2009/1/19 jitendra :
> My question is how I can validate the Integer value which has the commas in
> it. Basically, we don't want to add any custom validator for this field
> because if we do so then we have to apply this validation through out our
> application and it is around 150 places.
The be
Hello,
I don't see this happening in 2.0.14.
Are you using any custom validators? Any custom stack?
Felipe Fraga
On Wed, Dec 31, 2008 at 5:42 AM, Windy Hung wrote:
> Hi
> I use action field validation for my form.
> When I press "submit" button multiple times to test a field validation of
>
Thank you.
Jeromy Evans - Blue Sky Minds wrote:
>
> If if failing to show any data this can only mean the data
> is blank (unlikely) or the object is not available on the Value Stack.
> If we look at your two use cases:
> Case 1.data is posted to your application, the params are set in your
If if failing to show any data this can only mean the data
is blank (unlikely) or the object is not available on the Value Stack.
If we look at your two use cases:
Case 1.data is posted to your application, the params are set in your
action and your action is invoked. Your code in the action
Thanks, I extended DefaultActionSupport and now it's working
On Feb 3, 2008 12:47 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> > Oh, it's just a regular bean, doesn't implements or extends anything
>
> That'll be an issue.
>
> The workflow inter
--- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> Oh, it's just a regular bean, doesn't implements or extends anything
That'll be an issue.
The workflow interceptor depends on the ValidationAware interface to decide
if it should modify the result.
Dave
> On Feb 3, 2008 12:32 PM, Dave Newton <
Oh, it's just a regular bean, doesn't implements or extends anything
On Feb 3, 2008 12:32 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> > Action Class is: com.maca.web.BookAction
> > Validation file is placed next to the class:
> BookAction-save-
--- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> Action Class is: com.maca.web.BookAction
> Validation file is placed next to the class: BookAction-save-validation.xml
> Validation file for the book entity is: Book-validation.xml and it's placed
> next to the Book class
"Signature" means "How i
Action Class is: com.maca.web.BookAction
Validation file is placed next to the class: BookAction-save-validation.xml
Validation file for the book entity is: Book-validation.xml and it's placed
next to the Book class
On Feb 3, 2008 12:20 PM, Dave Newton <[EMAIL PROTECTED]> wrote:
> --- Martin Cas
--- Martin Castellanos <[EMAIL PROTECTED]> wrote:
> Hi, I'm trying to use the xml validation, the validation is executing and
> detecting errors, but after the validation the method save gets called
> instead of invoking the input action it's executing the 'success' action.
> I've tried several thi
If you haven't solved this, here are the things I would try.
* Check that the that the Validation files seem like valid XML. A
quick way to do that is to open them in IE.
* Deploy the MailReader example to the same environment, to be sure
its validation works.
* Deploy your application to anot
Thanks alot. This has solved my problem. I really appreciate it.
Thanks once again.
Regards,
Shoaib Ahmad
- Original Message
From: Dave Newton <[EMAIL PROTECTED]>
To: Struts Users Mailing List
Sent: Thursday, November 22, 2007 10:42:10 AM
Subject: Re: Struts 2 validation off a
An action's validation will fire unless an action
method specifically excluded by the validation
interceptor, the validation file is for a specific
action class/method alias, or a couple other things
not relevant in your case.
There are a few ways around this, the simplest being
to run the "input"
That validation config doesn't seem to make much sense to me. The field
accountNumber cannot be both int and string, so you have to use required
instead of requiredstring if you want to process the input as int. If you
want it as string, you have to use something else than the int validator,
possib
Just use the getText() method to resolve the key of your choice. For
example: addActionError(getText("my.message.key"));
Don
On 7/10/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi,
I have written my customised java class to do the form validation within
the action class.
I want to render
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Perryn,
Fowler, Perryn wrote:
> If I have a form that I want to submit with a POST, I want the
> response to this to always be a REDIRECT to a GET.
>
> I probably want this even in the case of validation failures that
> cause the form to be re-displa
I think what you are after is a flash scope implementation. There is a
flash result and flash interceptor that Pat/Toby checked into the
webwork project. With a couple small changes they will work in s2. At
some point I guess they should be moved across.
/Ian
Fowler, Perryn wrote:
Hi,
41 matches
Mail list logo