Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Eric Lentz
@Dave The page displays the list--how could you not need it? Right, during display I need it. During *SAVE* I do not need it. During the save is when Struts is demanding it (incorrectly I feel). @stanlick Do you by chance need a @SkipValidation on a method(s) in your action? How have you

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Dave Newton
On Wed, Apr 13, 2011 at 7:56 AM, Eric Lentz eric.le...@sherwin.com wrote: @Dave The page displays the list--how could you not need it? Right, during display I need it. During *SAVE* I do not need it. During the save is when Struts is demanding it (incorrectly I feel). If there's a validation

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Dave Newton
(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

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Eric Lentz
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 with your

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Dave Newton
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 in

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Eric Lentz
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 execution

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Dave Newton
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

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Eric Lentz
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:

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Dave Newton
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.

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Eric Lentz
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.

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Dave Newton
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

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Eric Lentz
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

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Dave Newton
Whew! Dave On Wed, Apr 13, 2011 at 11:27 AM, Eric Lentz eric.le...@sherwin.com 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

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Aaron Brown
On Wed, Apr 13, 2011 at 11:27 AM, Eric Lentz eric.le...@sherwin.com 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

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread Eric Lentz
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!

Re: Select collection not found only when validation xml file is used

2011-04-13 Thread stanlick
Though his eyes could see he still was a blind man lol On Wed, Apr 13, 2011 at 10:27 AM, Eric Lentz eric.le...@sherwin.com 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

Select collection not found only when validation xml file is used

2011-04-12 Thread Eric Lentz
Struts 2.2.1 I have a page with a list: s:select name=user.gender headerKey= headerValue=Select Gender listKey=code listValue=description list=genderList / and I populate genderList when I display the page. If I add a validation file, validating anything, not even

Re: Select collection not found only when validation xml file is used

2011-04-12 Thread Chris Pratt
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 eric.le...@sherwin.com wrote: Struts 2.2.1 I have a page with a list: s:select name=user.gender headerKey=

Re: Select collection not found only when validation xml file is used

2011-04-12 Thread Dave Newton
On Tue, Apr 12, 2011 at 1:16 PM, Eric Lentz wrote: s:select name=user.gender ... list=genderList / 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

Re: Select collection not found only when validation xml file is used

2011-04-12 Thread Eric Lentz
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

Re: Select collection not found only when validation xml file is used

2011-04-12 Thread Chris Pratt
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 eric.le...@sherwin.com wrote: I second Chris's suggestion to

Re: Select collection not found only when validation xml file is used

2011-04-12 Thread Eric Lentz
since I don't use that XML Validation stuff. What do you use?

Re: Select collection not found only when validation xml file is used

2011-04-12 Thread Chris Pratt
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

Re: Select collection not found only when validation xml file is used

2011-04-12 Thread stanlick
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 eric.le...@sherwin.com wrote: since I don't use that XML Validation stuff. What do you use?

Re: Select collection not found only when validation xml file is used

2011-04-12 Thread Dave Newton
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.