Re: S2 Action Validation
Yup :-) James Mitchell wrote: IIRC, 'Laurie' is short for Lawrence (not a girl) :D -- James Mitchell On Apr 12, 2007, at 5:07 PM, [EMAIL PROTECTED] wrote: Laurie -- Thanks girl. I guess I'm just going to have to bite the bullet and consider the theme modifications another step. I guess it's not a problem with new releases overlaying these modified files? Scott On 4/11/07, Laurie Harper <[EMAIL PROTECTED]> wrote: I think labelPosition will only affect the field label, not the error message placement. You'll probably have to go with customizing the theme for that. L. [EMAIL PROTECTED] wrote: > I can't get labelposition or requiredposition to do anything! > top/bottom/right/left/*random* -- I tried them all. > > On 4/10/07, Dave Newton <[EMAIL PROTECTED]> wrote: >> >> --- [EMAIL PROTECTED] wrote: >> > addFieldError("course.text"... >> > I really do not like placing a jsp field >> > name name in Java source code, but I could >> > not find another way to correlate the >> > message to the field. >> >> No, I think that's how it works. Technically >> you already have the field name in the java >> code since you're using a Java object. I'm >> not really sure what the alternatices would be. >> >> > is there an easy way to get the messages to >> > appear to the right of the field as opposed >> > to the top? >> >> There's a "labelposition" parameter but I don't recall >> what the options are; I think if you want any "major" >> changes you'd have to modify the theme. >> >> A general comment (not directed specifically at you): >> my view is that the default themes and templates are >> intended to serve as a launching point: they cover >> simple use cases, but if your pages have a specific >> layout then extension, modification, and/or creation >> of existing or new templates is almost certain to be >> required. >> >> > And lastly, can I specify the color I would >> > like the messages to be. >> >> CSS-ily, "errorMessage" class. >> >> d. >> >> >> >> >> >> >> >> Get your own web address. >> Have a HUGE year through Yahoo! Small Business. >> http://smallbusiness.yahoo.com/domains/?p=BESTDEAL >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --Scott [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
--- [EMAIL PROTECTED] wrote: > Laurie -- > Thanks girl. Ouch. > I guess I'm just going to have to bite the bullet and > consider the theme modifications another step. I > guess it's not a problem with new releases overlaying > these modified files? What do you mean by that? The distro files are in the JAR; won't yours be local to the web-app? d. Food fight? Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. http://answers.yahoo.com/dir/?link=list&sid=396545367 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
IIRC, 'Laurie' is short for Lawrence (not a girl) :D -- James Mitchell On Apr 12, 2007, at 5:07 PM, [EMAIL PROTECTED] wrote: Laurie -- Thanks girl. I guess I'm just going to have to bite the bullet and consider the theme modifications another step. I guess it's not a problem with new releases overlaying these modified files? Scott On 4/11/07, Laurie Harper <[EMAIL PROTECTED]> wrote: I think labelPosition will only affect the field label, not the error message placement. You'll probably have to go with customizing the theme for that. L. [EMAIL PROTECTED] wrote: > I can't get labelposition or requiredposition to do anything! > top/bottom/right/left/*random* -- I tried them all. > > On 4/10/07, Dave Newton <[EMAIL PROTECTED]> wrote: >> >> --- [EMAIL PROTECTED] wrote: >> > addFieldError("course.text"... >> > I really do not like placing a jsp field >> > name name in Java source code, but I could >> > not find another way to correlate the >> > message to the field. >> >> No, I think that's how it works. Technically >> you already have the field name in the java >> code since you're using a Java object. I'm >> not really sure what the alternatices would be. >> >> > is there an easy way to get the messages to >> > appear to the right of the field as opposed >> > to the top? >> >> There's a "labelposition" parameter but I don't recall >> what the options are; I think if you want any "major" >> changes you'd have to modify the theme. >> >> A general comment (not directed specifically at you): >> my view is that the default themes and templates are >> intended to serve as a launching point: they cover >> simple use cases, but if your pages have a specific >> layout then extension, modification, and/or creation >> of existing or new templates is almost certain to be >> required. >> >> > And lastly, can I specify the color I would >> > like the messages to be. >> >> CSS-ily, "errorMessage" class. >> >> d. >> >> >> >> >> >> _ ___ >> >> Get your own web address. >> Have a HUGE year through Yahoo! Small Business. >> http://smallbusiness.yahoo.com/domains/?p=BESTDEAL >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
Laurie -- Thanks girl. I guess I'm just going to have to bite the bullet and consider the theme modifications another step. I guess it's not a problem with new releases overlaying these modified files? Scott On 4/11/07, Laurie Harper <[EMAIL PROTECTED]> wrote: I think labelPosition will only affect the field label, not the error message placement. You'll probably have to go with customizing the theme for that. L. [EMAIL PROTECTED] wrote: > I can't get labelposition or requiredposition to do anything! > top/bottom/right/left/*random* -- I tried them all. > > On 4/10/07, Dave Newton <[EMAIL PROTECTED]> wrote: >> >> --- [EMAIL PROTECTED] wrote: >> > addFieldError("course.text"... >> > I really do not like placing a jsp field >> > name name in Java source code, but I could >> > not find another way to correlate the >> > message to the field. >> >> No, I think that's how it works. Technically >> you already have the field name in the java >> code since you're using a Java object. I'm >> not really sure what the alternatices would be. >> >> > is there an easy way to get the messages to >> > appear to the right of the field as opposed >> > to the top? >> >> There's a "labelposition" parameter but I don't recall >> what the options are; I think if you want any "major" >> changes you'd have to modify the theme. >> >> A general comment (not directed specifically at you): >> my view is that the default themes and templates are >> intended to serve as a launching point: they cover >> simple use cases, but if your pages have a specific >> layout then extension, modification, and/or creation >> of existing or new templates is almost certain to be >> required. >> >> > And lastly, can I specify the color I would >> > like the messages to be. >> >> CSS-ily, "errorMessage" class. >> >> d. >> >> >> >> >> >> >> >> Get your own web address. >> Have a HUGE year through Yahoo! Small Business. >> http://smallbusiness.yahoo.com/domains/?p=BESTDEAL >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: S2 Action Validation
--- Laurie Harper <[EMAIL PROTECTED]> wrote: > I think labelPosition will only affect the field > label, not the error message placement. D'oh, yeah, that's right; my bad. d. Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
I think labelPosition will only affect the field label, not the error message placement. You'll probably have to go with customizing the theme for that. L. [EMAIL PROTECTED] wrote: I can't get labelposition or requiredposition to do anything! top/bottom/right/left/*random* -- I tried them all. On 4/10/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- [EMAIL PROTECTED] wrote: > addFieldError("course.text"... > I really do not like placing a jsp field > name name in Java source code, but I could > not find another way to correlate the > message to the field. No, I think that's how it works. Technically you already have the field name in the java code since you're using a Java object. I'm not really sure what the alternatices would be. > is there an easy way to get the messages to > appear to the right of the field as opposed > to the top? There's a "labelposition" parameter but I don't recall what the options are; I think if you want any "major" changes you'd have to modify the theme. A general comment (not directed specifically at you): my view is that the default themes and templates are intended to serve as a launching point: they cover simple use cases, but if your pages have a specific layout then extension, modification, and/or creation of existing or new templates is almost certain to be required. > And lastly, can I specify the color I would > like the messages to be. CSS-ily, "errorMessage" class. d. Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
I can't get labelposition or requiredposition to do anything! top/bottom/right/left/*random* -- I tried them all. On 4/10/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- [EMAIL PROTECTED] wrote: > addFieldError("course.text"... > I really do not like placing a jsp field > name name in Java source code, but I could > not find another way to correlate the > message to the field. No, I think that's how it works. Technically you already have the field name in the java code since you're using a Java object. I'm not really sure what the alternatices would be. > is there an easy way to get the messages to > appear to the right of the field as opposed > to the top? There's a "labelposition" parameter but I don't recall what the options are; I think if you want any "major" changes you'd have to modify the theme. A general comment (not directed specifically at you): my view is that the default themes and templates are intended to serve as a launching point: they cover simple use cases, but if your pages have a specific layout then extension, modification, and/or creation of existing or new templates is almost certain to be required. > And lastly, can I specify the color I would > like the messages to be. CSS-ily, "errorMessage" class. d. Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: S2 Action Validation
--- [EMAIL PROTECTED] wrote: > addFieldError("course.text"... > I really do not like placing a jsp field > name name in Java source code, but I could > not find another way to correlate the > message to the field. No, I think that's how it works. Technically you already have the field name in the java code since you're using a Java object. I'm not really sure what the alternatices would be. > is there an easy way to get the messages to > appear to the right of the field as opposed > to the top? There's a "labelposition" parameter but I don't recall what the options are; I think if you want any "major" changes you'd have to modify the theme. A general comment (not directed specifically at you): my view is that the default themes and templates are intended to serve as a launching point: they cover simple use cases, but if your pages have a specific layout then extension, modification, and/or creation of existing or new templates is almost certain to be required. > And lastly, can I specify the color I would > like the messages to be. CSS-ily, "errorMessage" class. d. Get your own web address. Have a HUGE year through Yahoo! Small Business. http://smallbusiness.yahoo.com/domains/?p=BESTDEAL - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
How will S2 know which field the message is associated with? I was able to get this to work last night, but I would like to get your feedback as to whether or not it was an end around solution: addFieldError("course.text", getText("label.duplicate")); I really do not like placing a jsp field name name in Java source code, but I could not find another way to correlate the message to the field. Also, is there an easy way (interpreted as not needing to change Freemarker code) to get the messages to appear to the right of the field as opposed to the top? And lastly, can I specify the color I would like the messages to be. Thanks, Scott On 4/9/07, Dave Newton <[EMAIL PROTECTED]> wrote: --- [EMAIL PROTECTED] wrote: > Beyond this, how do I get an S2 action class to > display a message on the web page? See http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html#addActionMessage(java.lang.String) It takes a String, I18N provided by ActionSupport's standard getText method. To display on a JSP page: http://struts.apache.org/2.x/docs/actionmessage.html > Also, is there a way to search through the messages > from this forum? Search via your email client, search one of the archives (see below), or keep a knowledge base containing only the important bits and tag it however your system allows (this is the best solution for several reasons). > Does this not work like a NewsGroup? Nope, it works like a mailing list. There are some archives available; see: http://struts.apache.org/mail.html d. We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Scott [EMAIL PROTECTED]
Re: S2 Action Validation
Personally I would suggest nabble.com google for "nabble struts user" Dave Newton-4 wrote: > > --- [EMAIL PROTECTED] wrote: >> Beyond this, how do I get an S2 action class to >> display a message on the web page? > > See > > http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html#addActionMessage(java.lang.String) > > It takes a String, I18N provided by ActionSupport's > standard getText method. > > To display on a JSP page: > > http://struts.apache.org/2.x/docs/actionmessage.html > >> Also, is there a way to search through the messages >> from this forum? > > Search via your email client, search one of the > archives (see below), or keep a knowledge base > containing only the important bits and tag it however > your system allows (this is the best solution for > several reasons). > >> Does this not work like a NewsGroup? > > Nope, it works like a mailing list. There are some > archives available; see: > > http://struts.apache.org/mail.html > > d. > > > > > > We won't tell. Get more on shows you hate to love > (and love to hate): Yahoo! TV's Guilty Pleasures list. > http://tv.yahoo.com/collections/265 > > ----- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/S2-Action-Validation-tf3549366.html#a9917015 Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
--- [EMAIL PROTECTED] wrote: > Beyond this, how do I get an S2 action class to > display a message on the web page? See http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/ActionSupport.html#addActionMessage(java.lang.String) It takes a String, I18N provided by ActionSupport's standard getText method. To display on a JSP page: http://struts.apache.org/2.x/docs/actionmessage.html > Also, is there a way to search through the messages > from this forum? Search via your email client, search one of the archives (see below), or keep a knowledge base containing only the important bits and tag it however your system allows (this is the best solution for several reasons). > Does this not work like a NewsGroup? Nope, it works like a mailing list. There are some archives available; see: http://struts.apache.org/mail.html d. We won't tell. Get more on shows you hate to love (and love to hate): Yahoo! TV's Guilty Pleasures list. http://tv.yahoo.com/collections/265 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: S2 Action Validation
Hi Scott: All you have to do is: YouAction{ public String your_execute_method() { If(some error){ / * Chose what is appropriate for you - Field errors display the message on top of the field on HTML page*/ this.addActionError(); this.addActionMessage() this.addFieldError(); return INPUT ; /* or ERROR */ and display the same .jsp on the struts .xml file } } Please let me know if you still need more clarification/ help. -- Sincerely, Harring Figueiredo Sr. Software Engineer Email: [EMAIL PROTECTED] "We never become truly spiritual by sitting down and wishing to become so. You must undertake something so great that you cannot accomplish it unaided." On 4/9/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: I have a situation where an attempt could be made to enter a description for an item that already exists in the database. I am using Hibernate and suspect the easiest way to prevent this is to use HQL prior to my save. Beyond this, how do I get an S2 action class to display a message on the web page? My action extends ActionSupport so I see a few methods here that look interesting: getFieldErrors() getActionErrors() getActionMessages() getErrorMessages() However, I can't tell what I need to add to these Collections as in one case it wants the name of the field in error. This too is unknown since the name I give a screen field is not what the name ultimately becomes once rendered. It appears the S2 tag expands the name of the field. I also see a ValidationAware interface that can be implemented. I would be happy to read about the technique if someone could point me in the right direction. I cannot seem to find anything on the S2 site when I need it. Is there a search facility somewhere? I would probably post far fewer questions if the available docs were search-able. Also, is there a way to search through the messages from this forum? I am starting to wonder how many of us have personal collections of email messages storing up so we can get back to that useful tip someone shared three weeks ago Tuesday! Does this not work like a NewsGroup? -- Scott [EMAIL PROTECTED]
S2 Action Validation
I have a situation where an attempt could be made to enter a description for an item that already exists in the database. I am using Hibernate and suspect the easiest way to prevent this is to use HQL prior to my save. Beyond this, how do I get an S2 action class to display a message on the web page? My action extends ActionSupport so I see a few methods here that look interesting: getFieldErrors() getActionErrors() getActionMessages() getErrorMessages() However, I can't tell what I need to add to these Collections as in one case it wants the name of the field in error. This too is unknown since the name I give a screen field is not what the name ultimately becomes once rendered. It appears the S2 tag expands the name of the field. I also see a ValidationAware interface that can be implemented. I would be happy to read about the technique if someone could point me in the right direction. I cannot seem to find anything on the S2 site when I need it. Is there a search facility somewhere? I would probably post far fewer questions if the available docs were search-able. Also, is there a way to search through the messages from this forum? I am starting to wonder how many of us have personal collections of email messages storing up so we can get back to that useful tip someone shared three weeks ago Tuesday! Does this not work like a NewsGroup? -- Scott [EMAIL PROTECTED]