Yes, I will include the Wicket/Shades Library example. Probably not get to it until this weekend.
--- [EMAIL PROTECTED] wrote: > Send Wicket-user mailing list submissions to > wicket-user@lists.sourceforge.net > > To subscribe or unsubscribe via the World Wide Web, > visit > > https://lists.sourceforge.net/lists/listinfo/wicket-user > or, via email, send a message with subject or body > 'help' to > [EMAIL PROTECTED] > > You can reach the person managing the list at > [EMAIL PROTECTED] > > When replying, please edit your Subject line so it > is more specific > than "Re: Contents of Wicket-user digest..." > > > Today's Topics: > > 1. Re: Normalizing phone numbers with a Converter > (Stefan Arentz) > 2. Fwd: Wicket WebApp as a Portlet (T-Systems - > Barcelona) > (Juergen Donnerstag) > 3. Infinite Loop on Session.getPage() (Iman > Rahmatizadeh) > 4. Re: shades project on sourceforge (middledot) > 5. Re: Custom date component... (Erik Brakkee) > 6. Re: Is it possible to surround a tag with > extra tags in > onComponentTag? (Roland Kaercher) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Thu, 7 Sep 2006 14:31:08 +0200 > From: "Stefan Arentz" <[EMAIL PROTECTED]> > Subject: Re: [Wicket-user] Normalizing phone numbers > with a Converter > To: wicket-user@lists.sourceforge.net > Message-ID: > > <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=ISO-8859-1; > format=flowed > > I will create a simple and isolated test case and > debug that. > > S. > > On 9/7/06, Johan Compagner <[EMAIL PROTECTED]> > wrote: > > Can you debug to see if the model that holds the > number is getting the new > > object > > even if a validation error is thrown? > > Because that shouldn't happen. But it seems like > it happens at your case > > because > > if you say that the object after the bad submit is > converted then it has to > > come from > > the model object because only the model object is > converted. Not the raw > > data which > > should be displayed back when you have an error. > > > > johan > > > > > > > > On 9/7/06, Stefan Arentz <[EMAIL PROTECTED]> > wrote: > > > > > I have an entity with a phoneNumber field. The > format of this phone > > number is +9912345678..., the international number > notation. > > > > What I want to do is to have a text field that > accepts phonenumbers in > > different formats. For example 0612345678, "06 > 12345678" but also > > +31612345678. Based on the locale I want to > 'normalize' 0612345678 to > > +3112345678. > > > > I would like people to be able to enter a number > in any format in a > > form field but have the model behind that to be > updated to the > > international notation. (+NNNNNNNNNNNN) > > > > I wrote a simple SimpleConverterAdapter > implementation: > > > > public class PhoneNumberConverter extends > SimpleConverterAdapter > > { > > public String toString(Object value) > > { > > if (value instanceof String) > > { > > String phoneNumber = (String) value; > > > > // Always match on an international > phone number > > > > if > (internationalPhoneNumberPattern.matcher > > (phoneNumber).matches()) > > { > > return phoneNumber; > > } > > > > // Recognize dutch mobile numbers > (06NNNNNNNN) > > > > if > (dutchPhoneNumber.matcher(phoneNumber).matches()) { > > return "+31" + > phoneNumber.substring(1); > > } > > } > > > > // If we cannot convert the object then > throw an > > IllegalArgumentException. > > > > throw new IllegalArgumentException("Cannot > convert > > non String objects"); > > } > > > > public Object toObject(String value) > > { > > return value == null ? null : > value.toString(); > > } > > } > > > > but the behaviour is very odd. When I enter > '0612345678' in the form > > and submit it, I get an error message saying that > 0612345678 is not a > > valid phone number (this is done by the > PhoneNumberValidator) but the > > phone number form field is updated to > +316512345678. When I press > > submit again then all is ok of course. > > > > I'm not sure what I'm doing wrong here. I simply > want to accept input > > in several formats. > > > > S. > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support > web services, security? > > Get stuff done quickly with pre-integrated > technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 > based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > ------------------------------------------------------------------------- > > Using Tomcat but need to do more? Need to support > web services, security? > > Get stuff done quickly with pre-integrated > technology to make your job > > easier > > Download IBM WebSphere Application Server v.1.0.1 > based on Apache Geronimo > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > > > > _______________________________________________ > > Wicket-user mailing list > > Wicket-user@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > > > > > > > === message truncated === ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user