Re: Validate associate Map
If you can tell me how to put XML example code into an audio form I might start to believe you about them selling as anything more than a novelty. The biggest problem is that when dealing with computers you are extremely rarely dealing with the English language and the various code snippets, configuration files, etc. are only really of benefit when available visually as reference when reading (or hearing) the other parts of the text. But hey, if you want to record a podcast that has code snippets/configuration examples in it and prove me wrong feel free to go for it. Al. P.S. I've you want some career advice, work on the attention span. I've seen a number of people fired for looking incompetent because they kept disrupting co-workers with questions which could have been answered by reading the manual and they got bored of the job they have to do and churn out some really s**t code whilst messing around with other things.. most employers really don't like it. [EMAIL PROTECTED] wrote: Dude, I totally think technical books on audio would sell! Most NERDS (like myself) have the attention span of a moth and are so busy chasing shiny things they can never get to the end of a book! I would slam an aBook in my iPod for the commute. For a great example of what I mean by attention span disorder, check this http://www.coudal.com/regrets.php out. On Sat, Aug 16, 2008 at 3:23 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sat, 8/16/08, Al Sutton wrote: lol... I've just had a mental image of Dave reading the XML examples. I have a very soothing XML voice. I'm like the Isaac Hayes (but alive-ier) of structured text. Dave - 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: Validate associate Map
Big Al -- I started working on the Podcast last night and after a few moments playing with the recording spftware, decided to switch over to the You Tube format. It seemed that video and audio would solve many of the code snippet problems. After a few minutes working on this, I detected an AC/DC song on the radio and decided to play my drums awhile, after which I decided technology is boring! P.S. I will be uploading several hours of my home concert footage to You Tube later today. Peace, Scott On Sun, Aug 17, 2008 at 7:32 AM, Al Sutton [EMAIL PROTECTED] wrote: If you can tell me how to put XML example code into an audio form I might start to believe you about them selling as anything more than a novelty. The biggest problem is that when dealing with computers you are extremely rarely dealing with the English language and the various code snippets, configuration files, etc. are only really of benefit when available visually as reference when reading (or hearing) the other parts of the text. But hey, if you want to record a podcast that has code snippets/configuration examples in it and prove me wrong feel free to go for it. Al. P.S. I've you want some career advice, work on the attention span. I've seen a number of people fired for looking incompetent because they kept disrupting co-workers with questions which could have been answered by reading the manual and they got bored of the job they have to do and churn out some really s**t code whilst messing around with other things.. most employers really don't like it. [EMAIL PROTECTED] wrote: Dude, I totally think technical books on audio would sell! Most NERDS (like myself) have the attention span of a moth and are so busy chasing shiny things they can never get to the end of a book! I would slam an aBook in my iPod for the commute. For a great example of what I mean by attention span disorder, check this http://www.coudal.com/regrets.php out. On Sat, Aug 16, 2008 at 3:23 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sat, 8/16/08, Al Sutton wrote: lol... I've just had a mental image of Dave reading the XML examples. I have a very soothing XML voice. I'm like the Isaac Hayes (but alive-ier) of structured text. Dave - 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: Validate associate Map
i guess the short answer is: write it validateSave()-Method. The workflow interceptor should only call it if save is the invoke method. I have to write custom validation method where I iterate all PageText class and validate it. I want to use validate() method from ActionSupport class but the method is invoke always. I need invoke validator method only when is invoke method save(); Is better resolution? One option would be to read the documentation for the validation interceptor [1,2] and its superclass, MethodFilterInterceptor [3]. Dave [1] Validation interceptor overview: http://struts.apache.org/2.x/docs/validation-interceptor.html [2] ValidationInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html [3] MethodFilterInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- GMX startet ShortView.de. Hier findest Du Leute mit Deinen Interessen! Jetzt dabei sein: http://www.shortview.de/[EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Validate associate Map
Hi konference How can I validate classes which are associated in collection. The class Page contents Map with PageText classes: Page.java -- private MapLanguageName, PageText texts = new HashMap(); ... getter / setter PageText.java -- private String description; @StringLengthFieldValidator(message=Length too short, key=validate.minLength.6, trim=true, mimLength = 6) public void setDescription(String description) { this.description = description; } Action.java --- private Page page; //it work but I need validate all classes in Map, not only ['en'] @Validations( visitorFields = { @VisitorFieldValidator( message = Default message, key = i18n.key, fieldName= page.texts['en'], appendPrefix = false) } ) public String execute() throws Exception{ return Action.SUCCESS; } When I set: fieldName= page.texts['en'] it work, but in Map are a lots of classes. I need validate all class in collection. When I set only: fieldName= page.texts it dont work. I need set something of : fieldName= page.texts[*] but it dont work. How can I determine in attribute fieldName as to validate all classes in page.texts ? Is it possible or I must resolve it otherwise? Thanks a lot - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/Validate-associate-Map-tp19010237p19010237.html 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: Validate associate Map
I have to write custom validation method where I iterate all PageText class and validate it. I want to use validate() method from ActionSupport class but the method is invoke always. I need invoke validator method only when is invoke method save(); Is better resolution? public String save() throws Exception{ if (!isValid()) return INPUT; pageService.update(page); return execute(); } private boolean isValid(){ boolean success = true; for (Map.EntryLanguageName, PageText e : page.getTexts().entrySet()){ if (e.getValue().getDescription().length() 6 ){ addFieldError(getComponentName(e.getValue(), description), getText(validation.page.texts.description)); success = false; } } return success; //== } Kibo wrote: Hi konference How can I validate classes which are associated in collection. The class Page contents Map with PageText classes: Page.java -- private MapLanguageName, PageText texts = new HashMap(); ... getter / setter PageText.java -- private String description; @StringLengthFieldValidator(message=Length too short, key=validate.minLength.6, trim=true, mimLength = 6) public void setDescription(String description) { this.description = description; } Action.java --- private Page page; //it work but I need validate all classes in Map, not only ['en'] @Validations( visitorFields = { @VisitorFieldValidator( message = Default message, key = i18n.key, fieldName= page.texts['en'], appendPrefix = false) } ) public String execute() throws Exception{ return Action.SUCCESS; } When I set: fieldName= page.texts['en'] it work, but in Map are a lots of classes. I need validate all class in collection. When I set only: fieldName= page.texts it dont work. I need set something of : fieldName= page.texts[*] but it dont work. How can I determine in attribute fieldName as to validate all classes in page.texts ? Is it possible or I must resolve it otherwise? Thanks a lot - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/Validate-associate-Map-tp19010237p19011738.html 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: Validate associate Map
--- On Sat, 8/16/08, Kibo wrote: I have to write custom validation method where I iterate all PageText class and validate it. I want to use validate() method from ActionSupport class but the method is invoke always. I need invoke validator method only when is invoke method save(); Is better resolution? One option would be to read the documentation for the validation interceptor [1,2] and its superclass, MethodFilterInterceptor [3]. Dave [1] Validation interceptor overview: http://struts.apache.org/2.x/docs/validation-interceptor.html [2] ValidationInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html [3] MethodFilterInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validate associate Map
Can you record *yourself *reading these documents and just post the Podcast? On Sat, Aug 16, 2008 at 9:24 AM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sat, 8/16/08, Kibo wrote: I have to write custom validation method where I iterate all PageText class and validate it. I want to use validate() method from ActionSupport class but the method is invoke always. I need invoke validator method only when is invoke method save(); Is better resolution? One option would be to read the documentation for the validation interceptor [1,2] and its superclass, MethodFilterInterceptor [3]. Dave [1] Validation interceptor overview: http://struts.apache.org/2.x/docs/validation-interceptor.html [2] ValidationInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html [3] MethodFilterInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validate associate Map
lol... I've just had a mental image of Dave reading the XML examples. Some things just don't work in audio. Al. [EMAIL PROTECTED] wrote: Can you record *yourself *reading these documents and just post the Podcast? On Sat, Aug 16, 2008 at 9:24 AM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sat, 8/16/08, Kibo wrote: I have to write custom validation method where I iterate all PageText class and validate it. I want to use validate() method from ActionSupport class but the method is invoke always. I need invoke validator method only when is invoke method save(); Is better resolution? One option would be to read the documentation for the validation interceptor [1,2] and its superclass, MethodFilterInterceptor [3]. Dave [1] Validation interceptor overview: http://struts.apache.org/2.x/docs/validation-interceptor.html [2] ValidationInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html [3] MethodFilterInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html - 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: Validate associate Map
I'll offer it as a service along with my mad meta-Google skillz. --- On Sat, 8/16/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: From: [EMAIL PROTECTED] [EMAIL PROTECTED] Subject: Re: Validate associate Map To: Struts Users Mailing List user@struts.apache.org, [EMAIL PROTECTED] Date: Saturday, August 16, 2008, 2:35 PM Can you record *yourself *reading these documents and just post the Podcast? On Sat, Aug 16, 2008 at 9:24 AM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sat, 8/16/08, Kibo wrote: I have to write custom validation method where I iterate all PageText class and validate it. I want to use validate() method from ActionSupport class but the method is invoke always. I need invoke validator method only when is invoke method save(); Is better resolution? One option would be to read the documentation for the validation interceptor [1,2] and its superclass, MethodFilterInterceptor [3]. Dave [1] Validation interceptor overview: http://struts.apache.org/2.x/docs/validation-interceptor.html [2] ValidationInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html [3] MethodFilterInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html - 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: Validate associate Map
Hi Dave Thanks a lot for your help. I found out that the VisitorFieldValidator can work with Object, Arrays and Collections. Then I convert the Map to Collection and it begins work correct. @Validations( visitorFields = { @VisitorFieldValidator( message = Default message, key = i18n.key, fieldName= page.texts.values, appendPrefix = false) } ) public String save() throws Exception{ LOG.debug(ManagerPagesAction - method:save); pageService.update(page); return execute(); } ... -- lt;interceptor-ref name=validationgt; lt;param name=validateAnnotatedMethodOnlygt;truelt;/paramgt; lt;/interceptor-refgt; Thanks newton.dave wrote: --- On Sat, 8/16/08, Kibo wrote: I have to write custom validation method where I iterate all PageText class and validate it. I want to use validate() method from ActionSupport class but the method is invoke always. I need invoke validator method only when is invoke method save(); Is better resolution? One option would be to read the documentation for the validation interceptor [1,2] and its superclass, MethodFilterInterceptor [3]. Dave [1] Validation interceptor overview: http://struts.apache.org/2.x/docs/validation-interceptor.html [2] ValidationInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html [3] MethodFilterInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/Validate-associate-Map-tp19010237p19014275.html 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: Validate associate Map
--- On Sat, 8/16/08, Kibo [EMAIL PROTECTED] wrote: Thanks a lot for your help. I found out that the VisitorFieldValidator can work with Object, Arrays and Collections. Wow, that's nothing like the question I answered; glad it's working for you, although I'm a little confused now. Dave Then I convert the Map to Collection and it begins work correct. @Validations( visitorFields = { @VisitorFieldValidator( message = Default message, key = i18n.key, fieldName= page.texts.values, appendPrefix = false) } ) public String save() throws Exception{ LOG.debug(ManagerPagesAction - method:save); pageService.update(page); return execute(); } ... -- lt;interceptor-ref name=validationgt; lt;param name=validateAnnotatedMethodOnlygt;truelt;/paramgt; lt;/interceptor-refgt; Thanks newton.dave wrote: --- On Sat, 8/16/08, Kibo wrote: I have to write custom validation method where I iterate all PageText class and validate it. I want to use validate() method from ActionSupport class but the method is invoke always. I need invoke validator method only when is invoke method save(); Is better resolution? One option would be to read the documentation for the validation interceptor [1,2] and its superclass, MethodFilterInterceptor [3]. Dave [1] Validation interceptor overview: http://struts.apache.org/2.x/docs/validation-interceptor.html [2] ValidationInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/validator/ValidationInterceptor.html [3] MethodFilterInterceptor Javadocs: http://struts.apache.org/2.x/struts2-core/apidocs/com/opensymphony/xwork2/interceptor/MethodFilterInterceptor.html - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - Tomas Jurman Czech Republic -- View this message in context: http://www.nabble.com/Validate-associate-Map-tp19010237p19014275.html Sent from the Struts - User mailing list archive at Nabble.com. - 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: Validate associate Map
--- On Sat, 8/16/08, Al Sutton wrote: lol... I've just had a mental image of Dave reading the XML examples. I have a very soothing XML voice. I'm like the Isaac Hayes (but alive-ier) of structured text. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validate associate Map
Dude, I totally think technical books on audio would sell! Most NERDS (like myself) have the attention span of a moth and are so busy chasing shiny things they can never get to the end of a book! I would slam an aBook in my iPod for the commute. For a great example of what I mean by attention span disorder, check this http://www.coudal.com/regrets.php out. On Sat, Aug 16, 2008 at 3:23 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sat, 8/16/08, Al Sutton wrote: lol... I've just had a mental image of Dave reading the XML examples. I have a very soothing XML voice. I'm like the Isaac Hayes (but alive-ier) of structured text. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Validate associate Map
On a vaguely-related side note, I spent yesterday floating in my kayak counting herons (1 great blue), egrets (4, species unknown), and, parenthetically, turtles, wondering where my bug spray was. The variety in turtle size was astonishing; some were bigger than my head (I know, right?!) while others were smaller than the palm of my hand (but still managed to avoid me--apparently they can swim). If I could just figure out a decent laptop mount for the cockpit I'd be all set. --- On Sat, 8/16/08, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dude, I totally think technical books on audio would sell! Most NERDS (like myself) have the attention span of a moth and are so busy chasing shiny things they can never get to the end of a book! I would slam an aBook in my iPod for the commute. For a great example of what I mean by attention span disorder, check this http://www.coudal.com/regrets.php out. On Sat, Aug 16, 2008 at 3:23 PM, Dave Newton [EMAIL PROTECTED] wrote: --- On Sat, 8/16/08, Al Sutton wrote: lol... I've just had a mental image of Dave reading the XML examples. I have a very soothing XML voice. I'm like the Isaac Hayes (but alive-ier) of structured text. Dave - 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]