Hi Ernst Yes, these two methods were removed (because they were redundant and hence made the contract more complex):
In 6.0, UIDataType.filterInput(int, String, String, AttributeSet) just delegated to UIDataType.filterInput(String, String), and UIDataType.filterInput(String, String) delegated to UIDataType.filterInput(String) by just ignoring the additional parameters. So, you were actually free to choose what method to override. In 6.1, you should override the method filterInput(int, String, String, AttributeSet) instead of the other methods and just ignore the additional parameters if you do not need them. I.e., in UIMyProxyDataType remove the methods filterInput(String) and filterInput(String, String). In UIMyRegexpDataType override filterInput(int, String, String, AttributeSet) instead of filterInput(String). Cheers Rolf -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Plüss Ernst, Bedag Sent: Freitag, 30. Juni 2006 08:12 To: [EMAIL PROTECTED] Subject: AW: [ULC-developer] ULCTextField input validation Hi All We're in the process of migrating our ULC extensions to ULC 6.1. We have an extension, which allows for a flexible handling of data types in ULCTextField. Unfortunately the implementation of the com.ulcjava.base.client.datatype.IDataType has changed. Since I don't have any further information on this interface I need your help. It seams that the methods: * filterInput(String) * filterInput(String, String) are no longer available. Could you please tell me how two change your attached code in order to get it running with ULC 6.1. TIA Ernst Plüss Bedag Informatik AG Abteilung GF GBA Gutenbergstrasse 1 3012 Bern Telefon: +41 (0)31 633 21 21 (direkt 633 25 89) E-Mail: mailto:[EMAIL PROTECTED] www.bedag.ch -----Ursprüngliche Nachricht----- Von: Rolf Pfenninger (ULC Support) [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 15. Juli 2005 13:05 An: Plüss Ernst, Bedag Cc: [EMAIL PROTECTED] Betreff: RE: [ULC-developer] ULCTextField input validation Hi Ernst Based on your suggestions, I wrote two sample implementations of datatypes. A) A proxy datatype that delegates all tasks to a "normal" datatype if an "active" flag is set true. If the "active" flag is false, it does not validate. You will find this implementation in the attached MyProxyDatatypeSnippet. It contains: - the sample application - the ULCMyProxyDataType inner class (server half of the datatype implementation) - the UIMyProxyDataType inner class (client half of the datatype implementation that delegates to the defined datatype or to the UIDataType super class that does not validate) B) A sample implementation of a regular expression datatype that allows configuration after uploading (requires JDK 1.4 for regex support). You will find this implementation in the attached MyRegexpDatatypeSnippet. It contains: - the sample application - the ULCMyRegexpDataType inner class (server half of the datatype implementation) - the UIMyRegexpDataType inner class (client half of the datatype implementation) Please note for both implementations: When reconfiguring the datatype for a textfield that already contains some text, the textfield will beep and hide the current text the next time you enter it if the value is not valid for the new configuration. You might consider resetting the value after you have changed the datatype. If you have any further questions, please don't hesitate to ask. Kind regards Rolf ************************************** Rolf Pfenninger Canoo Engineering AG Kirschgartenstrasse 7 CH-4051 Basel Tel +41 61 228 9444 Fax +41 61 228 9449 mailto:[EMAIL PROTECTED] http://www.canoo.com ULC - Rich Clients for J2EE http://www.canoo.com/ulc ************************************** > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of > [EMAIL PROTECTED] > Sent: Freitag, 15. Juli 2005 09:20 > To: [EMAIL PROTECTED] > Subject: AW: [ULC-developer] ULCTextField input validation > > > Hi Rolf > > AFAIK the proposed Workaround doesn't work for me. > We extended the ULC Widgets to be "data aware". At any point in > time the data or even the type of data of a text field may > change, that's up to the panel designer. Of course once the text > field knows it's showing let's say an int I'd like to make sure > nothing else can be entered. > In order to replace the text field once it knows about the data > type it must clone itself and replace it in its parent with the > exact layout settings. > > What about roling my own IDataType? Since I don't have the source > I can only guess about the best way to do this. > > A) Write my own IDataType which acts as a proxy to the real one. > If no proxy is set act transparently. > B) Write an extension of ULCStringDataType and add a simple > character filtering. As long I don't know the data type I could > set the filter to everything and the length to Integer.MAX_INT. > However this would solve only 90% of my requirements. > > May be you can give me some hints about how to write my own IDataType? > > Best Regards > Ernst > > > > -----Ursprüngliche Nachricht----- > Von: Rolf Pfenninger (ULC Support) [mailto:[EMAIL PROTECTED] > Gesendet: Mittwoch, 13. Juli 2005 14:36 > An: Plüss Ernst, Bedag > Cc: [EMAIL PROTECTED] > Betreff: RE: [ULC-developer] ULCTextField input validation > > > Hi Ernst > > I do not see a simple and clean solution for your requirement > (you would really need to write an extension for this). I added a > problem report (PR > 1041) to our issue database. > > As a workaround, you might consider removing and readding the > textfield or parts of your GUI. > > Kind regards > Rolf > > > ************************************** > Rolf Pfenninger > Canoo Engineering AG > Kirschgartenstrasse 7 > CH-4051 Basel > Tel +41 61 228 9444 > Fax +41 61 228 9449 > mailto:[EMAIL PROTECTED] > http://www.canoo.com > > ULC - Rich Clients for J2EE > http://www.canoo.com/ulc > ************************************** > > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Behalf Of > > [EMAIL PROTECTED] > > Sent: Dienstag, 12. Juli 2005 16:23 > > To: [EMAIL PROTECTED] > > Subject: [ULC-developer] ULCTextField input validation > > > > > > Hi All > > > > We're in the process of implementing validation functionality for our > > TextFields. The IDataType stuff commes in very handy at this point. > > > > Unfortunately we're struggling with the limitation, that it's not > > allowed to set a IDataType once the TextField has been uploaded. We > > run into situations, where we've no chance to know which IDataType > > implementation before the TextField is uploaded to the server. > > > > Is there an other way of doing simple input checking without having a > > serverroundtripp for every keystroke? The main thing i need is to > > specify the set of allowed characters and the maximum length of the > > input. > > > > Best Regards > > Ernst > > > > ************************************************************** > > > > Ernst Plüss > > Bedag Informatik AG > > GBA / EPL > > Gutenbergstrasse 1 > > 3011 Bern > > Telefon: +41 (0)31 633 21 21 (633 25 89) > > Fax: +41 (0)31 633 XX XX > > E-Mail: mailto:[EMAIL PROTECTED] > > Internet: www.bedag.ch > > > > ************************************************************** > > > > > > _______________________________________________ > > ULC-developer mailing list > > [email protected] > > http://lists.canoo.com/mailman/listinfo/ulc-developer > > > > _______________________________________________ > ULC-developer mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/ulc-developer >
