"Though his eyes could see he still was a blind man" lol
On Wed, Apr 13, 2011 at 10:27 AM, Eric Lentz wrote:
> I'm now buying what you're selling. I did have a misunderstanding about
> when the JSP is called relative to validation. I once was blind, but now I
> see. Thanks for clearing that up.
> prepare method is set to execute BEFORE the params from your form are
read and processed into your action class
So prepare() is my *dumb* friend. Thanks for the tip!
On Wed, Apr 13, 2011 at 11:27 AM, Eric Lentz wrote:
> Thanks for the help. My problem appears to be solved! prepare() is my
> friend.
One subtle gotcha you should be aware of in case it bites you later:
In the default interceptor stack, the prepare method is set to execute
BEFORE the params from
Whew!
Dave
On Wed, Apr 13, 2011 at 11:27 AM, Eric Lentz wrote:
> I'm now buying what you're selling. I did have a misunderstanding about
> when the JSP is called relative to validation. I once was blind, but now I
> see. Thanks for clearing that up. I now see how to make the application
> work c
I'm now buying what you're selling. I did have a misunderstanding about
when the JSP is called relative to validation. I once was blind, but now I
see. Thanks for clearing that up. I now see how to make the application
work correctly.
BTW, I do know about redirectAction, and use it normally. I
On Wed, Apr 13, 2011 at 10:05 AM, Eric Lentz wrote:
> The real application is not a SSCCE, but exhibits the same symptoms.
Okay.
To make sure I have this correctly reasoned (and have read previous
emails correctly).
Q1: Which path(s) through the app are you saying are a bug?
You said:
> If I a
>And I assume the zipcode thing is just for test
>purposes, since zipcodes aren't numeric
This is someone's code I downloaded from the Internet for play. The real
application is not a SSCCE, but exhibits the same symptoms.
On Wed, Apr 13, 2011 at 9:51 AM, Eric Lentz wrote:
>>Create and post an SSCCE demonstrating the perceived issue, here or
>>preferably on a pastebin-like service.
>
> I assume an SSCCE is a JIRA report for Struts2? I started one but am
> waiting to hit submit in case you have something else in mind.
>Create and post an SSCCE demonstrating the perceived issue, here or
>preferably on a pastebin-like service.
I assume an SSCCE is a JIRA report for Struts2? I started one but am
waiting to hit submit in case you have something else in mind.
Is this what you have in mind for pasttebin: http://pas
Create and post an SSCCE demonstrating the perceived issue, here or
preferably on a pastebin-like service.
The bottom line is that the JSP is being hit, because it's where the
error message is coming from, because the list isn't present.
I assume you have devMode switched on and are logging at th
>It's not going to execute the JSP unless there's a reason to.
>Something's sending it back to the JSP. Rendering the JSP is the last
>thing it does during action execution, after type conversion, after
>validation. It's not going to execute the JSP that requires the list
>unless there's an executi
On Wed, Apr 13, 2011 at 8:49 AM, Eric Lentz wrote:
> I totally agree with your analysis of the operation of a validation error /
> input page. I don't believe that's what is happening though. I ran Struts in
> debug mode and stepped through where it was getting tripped up and it fails
> very early
> If there's a validation error, the input page will be displayed.
>
> If the input page is being displayed, the JSP references the list.
>
> If the JSP references the list, it's needed.
>
> If the JSP page isn't being displayed, you cannot get the error
> message your getting.
I totally agree wit
(For completeness, it could also be a type conversion error.)
d.
-
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org
lp. The only thing I'm left
> wondering is if I should log a bug with the Struts team. Something seems
> wrong here. The framework should not suddenly cause a page to start
> failing just because I add a validation XML file. If I have validation
> errors, that's another story, but
dea of having it all in one place.
Thanks to everyone for their suggestions and help. The only thing I'm left
wondering is if I should log a bug with the Struts team. Something seems
wrong here. The framework should not suddenly cause a page to start
failing just because I add a validation XML
On Tue, Apr 12, 2011 at 3:12 PM, Eric Lentz wrote:
> I'm not sure if you meant it this way, but my point is that I don't *need*
> the list - or at least I shouldn't need it IMO.
The page displays the list--how could you not need it?
d.
Do you by chance need a @SkipValidation on a method(s) in your action? How
have you named your validation file?
On Apr 12, 2011 2:27 PM, "Eric Lentz" wrote:
>> since I don't use that XML Validation stuff.
>
> What do you use?
I prefer to implement the validate() method and perform my own validations.
It gives me a lot more control over the tests. There's just so many useful
validations that can't be specified through XML, and I prefer the ability to
see all of my tests in one place.
(*Chris*)
On Apr 12, 2011 12:27 PM
> since I don't use that XML Validation stuff.
What do you use?
It's most likely trying to validate that the value supplied is one of the
values from the list. But that's just conjecture, since I don't use that
XML Validation stuff.
(*Chris*)
On Tue, Apr 12, 2011 at 12:12 PM, Eric Lentz wrote:
> > I second Chris's suggestion to initialize the list when yo
> I second Chris's suggestion to initialize the list when you need it.
Cool getting feedback from you guys.
I'm not sure if you meant it this way, but my point is that I don't *need*
the list - or at least I shouldn't need it IMO.
As a user, I hit the submit button on a form that has a select l
On Tue, Apr 12, 2011 at 1:16 PM, Eric Lentz wrote:
>
>
> If I add a validation file, validating anything, not even specifically the
> list, the page fails telling me that the [gender list could not be found].
>
> This seems like a bug.
I second Chris's suggestion to initialize the list when you n
My suggestion would be to make your action implement Preparable and
initialize the list in the prepare() method.
(*Chris*)
On Tue, Apr 12, 2011 at 10:16 AM, Eric Lentz wrote:
> Struts 2.2.1
> I have a page with a list:
>listKey="code" listValue="description" list="gende
Struts 2.2.1
I have a page with a list:
and I populate genderList when I display the page.
If I add a validation file, validating anything, not even specifically the
list, the page fails telling me that the list "could not be resolved as a
collection/array/map/enumeration/iterator type.
e the system slower
thank you very much
2009/11/30 Denis Cabasson
> Everything seems to be looking good.
>
> Is your validation xml file in the same package as your action? Are you
> using the defaultStack interceptor stack?
>
> If you leave txtName or txtPass empty, are
Everything seems to be looking good.
Is your validation xml file in the same package as your action? Are you
using the defaultStack interceptor stack?
If you leave txtName or txtPass empty, are you still proceeding to
C0002_Home.jsp?
Something must not be in place, because your example
I think i have it. here is the detail
C0002_Home.jsp
login.jsp
Here is the HTML tag for the submit button
Please tell me what should i correct?
thank you very much
2009/11/30 Denis Cabasson
> Do you have a result named "input" tied to your LoginAction? What is it?
>
> Denis.
>
> Nguyen Xuan
Do you have a result named "input" tied to your LoginAction? What is it?
Denis.
Nguyen Xuan Son a écrit :
Dear all
I have these in the LoginAction-validation.xml file
false
error
false
error
but it seems that even there is a error it still continue to implement the
LoginAction.java
Dear all
I have these in the LoginAction-validation.xml file
false
error
false
error
but it seems that even there is a error it still continue to implement the
LoginAction.java file
what should i do if i want it stop implementing the LoginAction.java
whenever there is any error appear
t
red. So far every thing works fine.
>
> Now the problem comes.. I decided not to have the validation anymore. So I
> deleted my validation xml file and also
> in my struts.xml file, in the action mapping I have removed the name="input" > entry that i added earlier
is doing what it is supposed to do. If the fields are
empty, the validation is getting fired. So far every thing works fine.
Now the problem comes.. I decided not to have the validation anymore. So I
deleted my validation xml file and also
in my struts.xml file, in the action mapping I have
o the update() method when
the input is correct, and why does it look for a non-existent method called
updateSchedule() otherwise?
Thanks in advance.
--
View this message in context:
http://old.nabble.com/s2%3A-Validation-xml-file-not-being-used-when-validating-a-method-tp26399337p26416537.html
e (and not persist)
Chris
-Original Message-
From: Musachy Barroso
To: Struts Users Mailing List
Sent: Tue, Nov 17, 2009 6:17 pm
Subject: Re: s2: Validation xml file not being used when validating a method
It can be done like that as well, but, your first attempt should
s that the validation was not invoked.
Thank you very much for your help, Oscar Calderón-2 and Musachy Barroso !!
--
View this message in context:
http://old.nabble.com/s2%3A-Validation-xml-file-not-being-used-when-validating-a-method-tp26399337p26399958.html
Sent from the Struts - User mailing list
:10 PM, ben_979 wrote:
>
> So it's done strictly by exclusion? I *thought* I had read that the
> validation could be focused on a specific method through the naming
> convention of the validation file(s). Is that idea totally wrong?
>
> --
> View this message in context
So it's done strictly by exclusion? I *thought* I had read that the
validation could be focused on a specific method through the naming
convention of the validation file(s). Is that idea totally wrong?
--
View this message in context:
http://old.nabble.com/s2%3A-Validation-xml-file-not-
ben_979 escribió:
I'm trying to figure out the validation framework, and I don't have a clear
understanding from the docs I've read where I'm going wrong, so if someone
could point me in the right direction I'd appreciate it.
I'm trying to validate ONLY when a particular method of an action clas
t you feel about this.
>>> Maybe this can be added as an enhancement in future versions of struts2.
>>>
>>> Arup
>>>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For
;
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabbl
I thought you could also specify validation rules against model classes
as well, which might help if the rules that are repeated are always the
same for a particular model property; I can't find mention of that
capability in the validation docs off-hand, though.
You may also be able to leverag
Have you looked at the visitor validator? It might serve your purposes
if the fields are on objects in the action.
/Ian
Arup Francis wrote:
Hi,
We have this problem of having to repeat certain validations for the same
fields in multiple validation xml files because they occur in multiple
you feel about this.
Maybe this can be added as an enhancement in future versions of struts2.
Arup
--
View this message in context:
http://www.nabble.com/Adding-the-ability-to-include-a-validation-xml-file-from-another-inside-another-validation-xml-file-in-Struts2-tf4601659.html#a13138482
Sent
43 matches
Mail list logo