Re: [Wicket-user] Converters

2007-04-14 Thread Doychi
Johan Compagner wrote: > > and it goes through that datatimeconverter? > do you see the value being converted? > It does when I display the DateTime, but apparently not when I try to save the string. ... I figured out what the problem is. The problem was that I had the getStarts() returning

Re: [Wicket-user] Converters

2007-04-14 Thread Johan Compagner
and it goes through that datatimeconverter? do you see the value being converted? else make a small sample/quickstart or unit test johan On 4/14/07, Doychi <[EMAIL PROTECTED]> wrote: I should also pointed out that I have implemented a DateTimeConverter, which looks like this: public class

Re: [Wicket-user] Converters

2007-04-13 Thread Doychi
I should also pointed out that I have implemented a DateTimeConverter, which looks like this: public class DateTimeConverter extends AbstractConverter { /** * The singleton instance for a DateTime converter */ public static final IConverter INSTANCE = new DateTi

Re: [Wicket-user] Converters

2007-04-13 Thread Doychi
No but it does have: public void setStarts(final DateTime starts) Which is what I thought would be needed as the object I'm trying to save is a DateTime object. Johan Compagner wrote: > > does your session object has a setStarts(Date) ?? > -- View this message in context: http://w

Re: [Wicket-user] Converters

2007-04-13 Thread Johan Compagner
does your session object has a setStarts(Date) ?? On 4/13/07, Doychi <[EMAIL PROTECTED]> wrote: Hi Again, The exact error message I'm getting is "WicketMessage: no set method defined for value: 2007-04-13T17:36:00.000+10:00 on object: [EMAIL PROTECTED]" and the code was accurate. Any help is

Re: [Wicket-user] Converters

2007-04-13 Thread Doychi
Hi Again, The exact error message I'm getting is "WicketMessage: no set method defined for value: 2007-04-13T17:36:00.000+10:00 on object: [EMAIL PROTECTED]" and the code was accurate. Any help is appreciated. -- View this message in context: http://www.nabble.com/Converters-tf3568876.html#a99

[Wicket-user] Converters

2007-04-12 Thread Doychi
Hi, I'm currently using Wicket 1.3 and trying to install a converter for Joda Time's DateTime. The converter seems to be installed, as it displays the correct format in the TextField but when I try to save the user's changes I get a message along the lines of wicket can't find a setter for the s

Re: [Wicket-user] Converters

2007-03-15 Thread Anders Peterson
When I read some old posts discussing changes to the converts I thought you where trying to re-invent Format. All that would be required is a factory/cache that finds/builds the correct instance and perhaps some new Format subclasses. If you can code MyOwnBigDecimal, then my would it be impossi

Re: [Wicket-user] Converters

2007-03-14 Thread Igor Vaynberg
do i control the factory? what if i have MyOwnBigDecimal class and i want to write a formatter to go between that and a string automatically. how do i integrate that into the jdk api so it works transparently like it would if i used wicket's converters? -igor On 3/14/07, Anders Peterson <[EMAIL

Re: [Wicket-user] Converters

2007-03-14 Thread Anders Peterson
Not sure what you mean, but if you control the factory you control the formatters. /Anders Igor Vaynberg wrote: > and does that api support registering your own converters? > > -igor > > > On 3/14/07, *Anders Peterson* <[EMAIL PROTECTED] > > wrote: > > No. You c

Re: [Wicket-user] Converters

2007-03-14 Thread Eelco Hillenius
On 3/14/07, Anders Peterson <[EMAIL PROTECTED]> wrote: > No. You create them specifying which Locale to use. Look at the static > factory methods in NumbverFormat. > > http://java.sun.com/j2se/1.5.0/docs/api/java/text/NumberFormat.html > > All Wicket would needs is a FormatFactory that reads the Lo

Re: [Wicket-user] Converters

2007-03-14 Thread Igor Vaynberg
and does that api support registering your own converters? -igor On 3/14/07, Anders Peterson <[EMAIL PROTECTED]> wrote: No. You create them specifying which Locale to use. Look at the static factory methods in NumbverFormat. http://java.sun.com/j2se/1.5.0/docs/api/java/text/NumberFormat.html

Re: [Wicket-user] Converters

2007-03-14 Thread Anders Peterson
No. You create them specifying which Locale to use. Look at the static factory methods in NumbverFormat. http://java.sun.com/j2se/1.5.0/docs/api/java/text/NumberFormat.html All Wicket would needs is a FormatFactory that reads the Locale from the request/session/user and instantiates correct For

Re: [Wicket-user] Converters

2007-03-14 Thread Martijn Dashorst
On 3/14/07, Anders Peterson <[EMAIL PROTECTED]> wrote: > One of my questions remain: Why does Wicket need converters at all? Java > already has java.text.Format with two-way conversion between String and > some other class. But they assume the VM's locale, not the locale of the request/session/use

Re: [Wicket-user] Converters

2007-03-14 Thread Anders Peterson
From reading old posts I know that the converters have been improved for 1.3/2.0 but I'm doing my best to stay away from beta versions. I have built two new ITypeConverters, a new IConverter and a new IConverterFactory and ... it kind of works. Strangely I don't see the correct format everywhe

Re: [Wicket-user] Converters

2007-03-14 Thread Eelco Hillenius
> Why have converters at all? Because dates and numbers and possibly other things should transparently be presented and parsed in a locale aware fashion. Eelco - Take Surveys. Earn Cash. Influence the Future of IT Join Sourc

Re: [Wicket-user] Converters

2007-03-14 Thread Johan Compagner
please look at the converters that are now in 1.3. those are much simpler and you should be able to do what you want pretty quickly in 1.2.x it is also possible. But it is a bit harder Because if you want BigDecimals support for both ways you have to make 2 and then register one for String->BigDe

[Wicket-user] Converters

2007-03-14 Thread Anders Peterson
Hi, I use Wicket 1.2.5 and have been looking at Converters (IConverter & ITypeConverter). The problem I want to solve is "formatting" my BigDecimals correctly. Can't understand why this should be so complicated. Why have converters at all? Java already has java.text.Format with the methods: O

Re: [Wicket-user] Converters

2005-07-22 Thread Nick Heudecker
ail-archive.com/wicket-user@lists.sourceforge.net/msg01584.html > > Igor > > > > -Original Message- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On Behalf Of > > Nick Heudecker > > Sent: Friday, July 22, 2005 2:28 PM > > To: wicket-user@lis

RE: [Wicket-user] Converters

2005-07-22 Thread Igor Vaynberg
t; To: wicket-user@lists.sourceforge.net > Subject: Re: [Wicket-user] Converters > > That's what I looked at and added this to my application class: > > public IConverterFactory getConverterFactory() { > return new IConverterFactory() { >

Re: [Wicket-user] Converters

2005-07-22 Thread Nick Heudecker
That's what I looked at and added this to my application class: public IConverterFactory getConverterFactory() { return new IConverterFactory() { public IConverter newConverter(Locale locale) { SimpleDateFormat format = new SimpleDateFormat("-MM-dd");

Re: [Wicket-user] Converters

2005-07-22 Thread Eelco Hillenius
Does this: http://wicket.sourceforge.net/wiki/index.php/Using_custom_converters help? Eelco Nick Heudecker wrote: Hi, I'd like to have dates in my application formatted as -MM-DD. I've been able to get it working for submitted dates, but displayed dates are still being returned as DD/M

[Wicket-user] Converters

2005-07-20 Thread Nick Heudecker
Hi, I'd like to have dates in my application formatted as -MM-DD. I've been able to get it working for submitted dates, but displayed dates are still being returned as DD/MM/YY. How do I properly setup the converter for this? Also, I'm having a problem with BigDecimals and OGNL. If the fie

Re: [Wicket-user] Converters/Formatters

2005-02-22 Thread Jonathan Carlson
Thanks Eelco!  It looks good.  The extra TextField constructor parameter of Type will do me fine for now.    - Jon   >>> [EMAIL PROTECTED] 2005-02-21 2:31:29 PM >>>Furthermore:- you can access the currently used instance of IConverter by calling getConverter() on any component;- an instance of

Re: [Wicket-user] Converters/Formatters

2005-02-21 Thread Eelco Hillenius
Furthermore: - you can access the currently used instance of IConverter by calling getConverter() on any component; - an instance of IConverterFactory creates the instance of IConverter to be used by the current session. There is a usefull default, but you can override this by overriding getConv

Re: [Wicket-user] Converters/Formatters

2005-02-21 Thread Eelco Hillenius
Oops. Sorry that those changes did not reach you (there were lengthy discussions on the developer list). I'll paste in the mail John sent about the changes we made. The multi-directional thing did not happen. The new structure is quite elegant and very flexible though. Depending on what you wan

[Wicket-user] Converters/Formatters

2005-02-21 Thread Jonathan Carlson
A while ago Eelco discussed changing the converter interface to be multi-directional.   Is this still in the queue of things to do or did I misinterpret what was going to happen?   I'm getting ready for these changes, but I don't want to push you developers if you are still busy with other t

[Wicket-user] Converters [was: is this approach correct?]

2005-02-02 Thread Jonathan Carlson
Eelco, your ideas sound very good.  I'll look for the changes.   - Jonathan >>> [EMAIL PROTECTED] 2005-02-02 4:36:47 AM >>>No, what I meant is that the converters were initially copied (and slightly altered) from the BeanUtils package. As they lacked the possibility of formatting (BeanUtils us