Re: T5: regexp for commas
Hello, thanks evrybody for attempting to help me with that problem. I tried every suggest you gave, with no positve result. Now I think this is a Tapetry internal problem. Any idea for an alternative solution method? Meanwhile I have to be happy without the regexp check. THX Thomas Michael Courcy [EMAIL PROTECTED] schrieb am Mo, Jan 14, 2008 um 4:18 in Nachricht [EMAIL PROTECTED]: well I wonder if the comma is not playing a role in the interpretation of the annotation ? did you try to replace the comma by its unicode value : \u002C Thomas Zenglein a écrit : Hello Michael, I've just tried following lines. public class Test { public static void main(String[] args) { String foo = ,; if (foo.matches([a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+)){ System.out.println(:)); } else { System.out.println(:(); } } } With the aim to decide weather String foo contains a ',' ( or another blabla that I allow) or not. Fortunately that works fine :). Now I want the same functionality in T5. Thomas Michael Courcy [EMAIL PROTECTED] schrieb am Mo, Jan 14, 2008 um 1:33 in Nachricht [EMAIL PROTECTED]: Did you try this regexp with in a regular java program ? Thomas Zenglein a écrit : Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate(required,regexp=[a-zA-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend the regexp to handle that case. @Validate(required,regexp=[a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to Coercion of [a-zA-Z to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 8 [a-zA-Z ^ @Validate(required,regexp=[a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to following error: Coercion of [a-z\ to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 7 [a-z\ ^ Has anybody an idea for the correct code??? I use tapestry 5.0.6. THX Thomas - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: regexp for commas
Thomas Zenglein a écrit : Hello, thanks evrybody for attempting to help me with that problem. I tried every suggest you gave, with no positve result. Now I think this is a Tapetry internal problem. Any idea for an alternative solution method? Meanwhile I have to be happy without the regexp check. Well you could do that inside the onValidate method of your form ... No ? THX Thomas Michael Courcy [EMAIL PROTECTED] schrieb am Mo, Jan 14, 2008 um 4:18 in Nachricht [EMAIL PROTECTED]: well I wonder if the comma is not playing a role in the interpretation of the annotation ? did you try to replace the comma by its unicode value : \u002C Thomas Zenglein a écrit : Hello Michael, I've just tried following lines. public class Test { public static void main(String[] args) { String foo = ,; if (foo.matches([a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+)){ System.out.println(:)); } else { System.out.println(:(); } } } With the aim to decide weather String foo contains a ',' ( or another blabla that I allow) or not. Fortunately that works fine :). Now I want the same functionality in T5. Thomas Michael Courcy [EMAIL PROTECTED] schrieb am Mo, Jan 14, 2008 um 1:33 in Nachricht [EMAIL PROTECTED]: Did you try this regexp with in a regular java program ? Thomas Zenglein a écrit : Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate(required,regexp=[a-zA-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend the regexp to handle that case. @Validate(required,regexp=[a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to Coercion of [a-zA-Z to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 8 [a-zA-Z ^ @Validate(required,regexp=[a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to following error: Coercion of [a-z\ to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 7 [a-z\ ^ Has anybody an idea for the correct code??? I use tapestry 5.0.6. THX Thomas - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: regexp for commas
All the IDEs have some form of regexp testing plugin; I use the intellij one all the time. On Jan 14, 2008 4:33 AM, Michael Courcy [EMAIL PROTECTED] wrote: Did you try this regexp with in a regular java program ? Thomas Zenglein a écrit : Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate(required,regexp=[a-zA-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend the regexp to handle that case. @Validate(required,regexp=[a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to Coercion of [a-zA-Z to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 8 [a-zA-Z ^ @Validate(required,regexp=[a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to following error: Coercion of [a-z\ to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 7 [a-z\ ^ Has anybody an idea for the correct code??? I use tapestry 5.0.6. THX Thomas - 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] -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
T5: regexp for commas
Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate(required,regexp=[a-zA-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend the regexp to handle that case. @Validate(required,regexp=[a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to Coercion of [a-zA-Z to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 8 [a-zA-Z ^ @Validate(required,regexp=[a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to following error: Coercion of [a-z\ to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 7 [a-z\ ^ Has anybody an idea for the correct code??? I use tapestry 5.0.6. THX Thomas - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: T5: regexp for commas
Did you try this regexp with in a regular java program ? Thomas Zenglein a écrit : Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate(required,regexp=[a-zA-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend the regexp to handle that case. @Validate(required,regexp=[a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to Coercion of [a-zA-Z to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 8 [a-zA-Z ^ @Validate(required,regexp=[a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to following error: Coercion of [a-z\ to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 7 [a-z\ ^ Has anybody an idea for the correct code??? I use tapestry 5.0.6. THX Thomas - 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]
Antw: Re: T5: regexp for commas
Hello Michael, I've just tried following lines. public class Test { public static void main(String[] args) { String foo = ,; if (foo.matches([a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+)){ System.out.println(:)); } else { System.out.println(:(); } } } With the aim to decide weather String foo contains a ',' ( or another blabla that I allow) or not. Fortunately that works fine :). Now I want the same functionality in T5. Thomas Michael Courcy [EMAIL PROTECTED] schrieb am Mo, Jan 14, 2008 um 1:33 in Nachricht [EMAIL PROTECTED]: Did you try this regexp with in a regular java program ? Thomas Zenglein a écrit : Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate(required,regexp=[a-zA-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend the regexp to handle that case. @Validate(required,regexp=[a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to Coercion of [a-zA-Z to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 8 [a-zA-Z ^ @Validate(required,regexp=[a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to following error: Coercion of [a-z\ to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 7 [a-z\ ^ Has anybody an idea for the correct code??? I use tapestry 5.0.6. THX Thomas - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Re: T5: regexp for commas
i'm not sure, but have you tried this: @Validate(required,regexp=prop:myRegExpCheck) public String getMyRegExpCheck() { return [a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+; } 2008/1/14, Thomas Zenglein [EMAIL PROTECTED]: Hello Michael, I've just tried following lines. public class Test { public static void main(String[] args) { String foo = ,; if (foo.matches([a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+)){ System.out.println(:)); } else { System.out.println(:(); } } } With the aim to decide weather String foo contains a ',' ( or another blabla that I allow) or not. Fortunately that works fine :). Now I want the same functionality in T5. Thomas Michael Courcy [EMAIL PROTECTED] schrieb am Mo, Jan 14, 2008 um 1:33 in Nachricht [EMAIL PROTECTED]: Did you try this regexp with in a regular java program ? Thomas Zenglein a écrit : Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate(required,regexp=[a-zA-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend the regexp to handle that case. @Validate(required,regexp=[a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to Coercion of [a-zA-Z to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 8 [a-zA-Z ^ @Validate(required,regexp=[a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to following error: Coercion of [a-z\ to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 7 [a-z\ ^ Has anybody an idea for the correct code??? I use tapestry 5.0.6. THX Thomas - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- with regards Sven Homburg
Re: Antw: Re: T5: regexp for commas
well I wonder if the comma is not playing a role in the interpretation of the annotation ? did you try to replace the comma by its unicode value : \u002C Thomas Zenglein a écrit : Hello Michael, I've just tried following lines. public class Test { public static void main(String[] args) { String foo = ,; if (foo.matches([a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+)){ System.out.println(:)); } else { System.out.println(:(); } } } With the aim to decide weather String foo contains a ',' ( or another blabla that I allow) or not. Fortunately that works fine :). Now I want the same functionality in T5. Thomas Michael Courcy [EMAIL PROTECTED] schrieb am Mo, Jan 14, 2008 um 1:33 in Nachricht [EMAIL PROTECTED]: Did you try this regexp with in a regular java program ? Thomas Zenglein a écrit : Hello everybody, I want my textfield to allow a couple of signs. For that I have the following code. @Validate(required,regexp=[a-zA-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) public void setName(String name) { this.name = name; } Comma signs should also be allowed here. So I want to extend the regexp to handle that case. @Validate(required,regexp=[a-zA-Z,öäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to Coercion of [a-zA-Z to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 8 [a-zA-Z ^ @Validate(required,regexp=[a-z\\,A-ZöäüÖÄÜß0-9\\.\\'?!§$%\\-+*:/ ]+) leads to following error: Coercion of [a-z\ to type java.util.regex.Pattern (via String -- java.util.regex.Pattern) failed: Unclosed character class near index 7 [a-z\ ^ Has anybody an idea for the correct code??? I use tapestry 5.0.6. THX Thomas - 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] - 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]