Re: format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-06 Thread Benedikt Schlegel
Maybe I should indeed post this on the developers forum? Or open a JIRA?

Greets


2012/11/5 Benedikt Schlegel codecab.dri...@googlemail.com

 What I need is not what I want in this case.. I want to reuse wicket
 components as much as possible. I don't want to reinvent the wheel.

 In wicket, there are two separate, Date-specific TextField components:
 - org.apache.wicket.extensions.markup.html.form.DateTextField
 - org.apache.wicket.datetime.markup.html.form.DateTextField

 Both use different DateConverters, to be located at:
 - org.apache.wicket.util.convert.converter.DateConverter
 - org.apache.wicket.datetime.DateConverter

 The components in wicket-datetime are more convenient and powerful, so I'm
 gonna use them. The only drawback I see is the spartanic
 ConversionException, in which e.g. the dateformat information is missing.
 The exception created by wicket-etensions's DateConverter holds that
 information. So yes, I guess this is a break.


 That also raises a much bigger question: Why is that legacy code (my
 guess) in wicket-extensions still there? Why don't consolidate those two?
 As I see it, same authors were working on both packages?



 2012/11/5 Martin Grigorov mgrigo...@apache.org

 Hi,

 We follow users@ mailing list too :-)

 Since
 1) DateConverter is not final
 2) the related methods in it are public, non-final
 3) it is possible to register custom converter for Date.class in
 ConverterLocator

 I think you should be able to do what you need.
 Are there any breaks ?

 On Sun, Nov 4, 2012 at 1:59 PM, Simon B simon.bott...@gmail.com wrote:
  Hi Benedikt
 
  Should this be posted on the Forum for Wicket Core developers forum?
 
  Simon
 
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/format-value-missing-in-ConversionException-thrown-by-wicket-datetime-s-DateConverter-tp4653598p4653603.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





Re: format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-06 Thread Jesse Long

Hi Benedikt,

wicket-datetime implementation is much nicer, but requires the Joda Time 
dependency, which the wicket-extensions version is based on normal JDK API.


When JSR310 comes out in Wicket's minimum required Java version (Java 
8?) we can probably merge them.


Cheers,
Jesse

On 05/11/2012 13:40, Benedikt Schlegel wrote:

What I need is not what I want in this case.. I want to reuse wicket
components as much as possible. I don't want to reinvent the wheel.

In wicket, there are two separate, Date-specific TextField components:
- org.apache.wicket.extensions.markup.html.form.DateTextField
- org.apache.wicket.datetime.markup.html.form.DateTextField

Both use different DateConverters, to be located at:
- org.apache.wicket.util.convert.converter.DateConverter
- org.apache.wicket.datetime.DateConverter

The components in wicket-datetime are more convenient and powerful, so I'm
gonna use them. The only drawback I see is the spartanic
ConversionException, in which e.g. the dateformat information is missing.
The exception created by wicket-etensions's DateConverter holds that
information. So yes, I guess this is a break.


That also raises a much bigger question: Why is that legacy code (my guess)
in wicket-extensions still there? Why don't consolidate those two? As I see
it, same authors were working on both packages?


2012/11/5 Martin Grigorov mgrigo...@apache.org


Hi,

We follow users@ mailing list too :-)

Since
1) DateConverter is not final
2) the related methods in it are public, non-final
3) it is possible to register custom converter for Date.class in
ConverterLocator

I think you should be able to do what you need.
Are there any breaks ?

On Sun, Nov 4, 2012 at 1:59 PM, Simon B simon.bott...@gmail.com wrote:

Hi Benedikt

Should this be posted on the Forum for Wicket Core developers forum?

Simon



--
View this message in context:

http://apache-wicket.1842946.n4.nabble.com/format-value-missing-in-ConversionException-thrown-by-wicket-datetime-s-DateConverter-tp4653598p4653603.html

Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-06 Thread Benedikt Schlegel
Ok, so they won't get merged any time soon. Maybe in about 2 years, if
we're lucky :-(

But still, is it possible to make some smaller enhancements on those until
we finally get Java 8?


2012/11/6 Jesse Long j...@unknown.za.net

 Hi Benedikt,

 wicket-datetime implementation is much nicer, but requires the Joda Time
 dependency, which the wicket-extensions version is based on normal JDK API.

 When JSR310 comes out in Wicket's minimum required Java version (Java 8?)
 we can probably merge them.

 Cheers,
 Jesse


 On 05/11/2012 13:40, Benedikt Schlegel wrote:

 What I need is not what I want in this case.. I want to reuse wicket
 components as much as possible. I don't want to reinvent the wheel.

 In wicket, there are two separate, Date-specific TextField components:
 - org.apache.wicket.extensions.**markup.html.form.DateTextField
 - org.apache.wicket.datetime.**markup.html.form.DateTextField

 Both use different DateConverters, to be located at:
 - org.apache.wicket.util.**convert.converter.**DateConverter
 - org.apache.wicket.datetime.**DateConverter

 The components in wicket-datetime are more convenient and powerful, so I'm
 gonna use them. The only drawback I see is the spartanic
 ConversionException, in which e.g. the dateformat information is missing.
 The exception created by wicket-etensions's DateConverter holds that
 information. So yes, I guess this is a break.


 That also raises a much bigger question: Why is that legacy code (my
 guess)
 in wicket-extensions still there? Why don't consolidate those two? As I
 see
 it, same authors were working on both packages?


 2012/11/5 Martin Grigorov mgrigo...@apache.org

  Hi,

 We follow users@ mailing list too :-)

 Since
 1) DateConverter is not final
 2) the related methods in it are public, non-final
 3) it is possible to register custom converter for Date.class in
 ConverterLocator

 I think you should be able to do what you need.
 Are there any breaks ?

 On Sun, Nov 4, 2012 at 1:59 PM, Simon B simon.bott...@gmail.com wrote:

 Hi Benedikt

 Should this be posted on the Forum for Wicket Core developers forum?

 Simon



 --
 View this message in context:

 http://apache-wicket.1842946.**n4.nabble.com/format-value-**missing-in-*
 *ConversionException-thrown-by-**wicket-datetime-s-**DateConverter-**
 tp4653598p4653603.htmlhttp://apache-wicket.1842946.n4.nabble.com/format-value-missing-in-ConversionException-thrown-by-wicket-datetime-s-DateConverter-tp4653598p4653603.html

 Sent from the Users forum mailing list archive at Nabble.com.

 --**--**
 -
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 --**--**
 -
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




 --**--**-
 To unsubscribe, e-mail: 
 users-unsubscribe@wicket.**apache.orgusers-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-06 Thread Martin Grigorov
Hi,

Everything is possible.
Create a Jira, describe the problem, attach a patch and it will be applied
much sooner than Wicket 8.


On Tue, Nov 6, 2012 at 7:21 PM, Benedikt Schlegel 
codecab.dri...@googlemail.com wrote:

 Ok, so they won't get merged any time soon. Maybe in about 2 years, if
 we're lucky :-(

 But still, is it possible to make some smaller enhancements on those until
 we finally get Java 8?


 2012/11/6 Jesse Long j...@unknown.za.net

  Hi Benedikt,
 
  wicket-datetime implementation is much nicer, but requires the Joda Time
  dependency, which the wicket-extensions version is based on normal JDK
 API.
 
  When JSR310 comes out in Wicket's minimum required Java version (Java 8?)
  we can probably merge them.
 
  Cheers,
  Jesse
 
 
  On 05/11/2012 13:40, Benedikt Schlegel wrote:
 
  What I need is not what I want in this case.. I want to reuse wicket
  components as much as possible. I don't want to reinvent the wheel.
 
  In wicket, there are two separate, Date-specific TextField components:
  - org.apache.wicket.extensions.**markup.html.form.DateTextField
  - org.apache.wicket.datetime.**markup.html.form.DateTextField
 
  Both use different DateConverters, to be located at:
  - org.apache.wicket.util.**convert.converter.**DateConverter
  - org.apache.wicket.datetime.**DateConverter
 
  The components in wicket-datetime are more convenient and powerful, so
 I'm
  gonna use them. The only drawback I see is the spartanic
  ConversionException, in which e.g. the dateformat information is
 missing.
  The exception created by wicket-etensions's DateConverter holds that
  information. So yes, I guess this is a break.
 
 
  That also raises a much bigger question: Why is that legacy code (my
  guess)
  in wicket-extensions still there? Why don't consolidate those two? As I
  see
  it, same authors were working on both packages?
 
 
  2012/11/5 Martin Grigorov mgrigo...@apache.org
 
   Hi,
 
  We follow users@ mailing list too :-)
 
  Since
  1) DateConverter is not final
  2) the related methods in it are public, non-final
  3) it is possible to register custom converter for Date.class in
  ConverterLocator
 
  I think you should be able to do what you need.
  Are there any breaks ?
 
  On Sun, Nov 4, 2012 at 1:59 PM, Simon B simon.bott...@gmail.com
 wrote:
 
  Hi Benedikt
 
  Should this be posted on the Forum for Wicket Core developers forum?
 
  Simon
 
 
 
  --
  View this message in context:
 
  http://apache-wicket.1842946.**
 n4.nabble.com/format-value-**missing-in-*
  *ConversionException-thrown-by-**wicket-datetime-s-**DateConverter-**
  tp4653598p4653603.html
 http://apache-wicket.1842946.n4.nabble.com/format-value-missing-in-ConversionException-thrown-by-wicket-datetime-s-DateConverter-tp4653598p4653603.html
 
 
  Sent from the Users forum mailing list archive at Nabble.com.
 
  --**--**
  -
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
  --
  Martin Grigorov
  jWeekend
  Training, Consulting, Development
  http://jWeekend.com
 
  --**--**
  -
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 
  --**--**-
  To unsubscribe, e-mail: users-unsubscribe@wicket.**apache.org
 users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com http://jweekend.com/


Re: format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-05 Thread Benedikt Schlegel
What I need is not what I want in this case.. I want to reuse wicket
components as much as possible. I don't want to reinvent the wheel.

In wicket, there are two separate, Date-specific TextField components:
- org.apache.wicket.extensions.markup.html.form.DateTextField
- org.apache.wicket.datetime.markup.html.form.DateTextField

Both use different DateConverters, to be located at:
- org.apache.wicket.util.convert.converter.DateConverter
- org.apache.wicket.datetime.DateConverter

The components in wicket-datetime are more convenient and powerful, so I'm
gonna use them. The only drawback I see is the spartanic
ConversionException, in which e.g. the dateformat information is missing.
The exception created by wicket-etensions's DateConverter holds that
information. So yes, I guess this is a break.


That also raises a much bigger question: Why is that legacy code (my guess)
in wicket-extensions still there? Why don't consolidate those two? As I see
it, same authors were working on both packages?


2012/11/5 Martin Grigorov mgrigo...@apache.org

 Hi,

 We follow users@ mailing list too :-)

 Since
 1) DateConverter is not final
 2) the related methods in it are public, non-final
 3) it is possible to register custom converter for Date.class in
 ConverterLocator

 I think you should be able to do what you need.
 Are there any breaks ?

 On Sun, Nov 4, 2012 at 1:59 PM, Simon B simon.bott...@gmail.com wrote:
  Hi Benedikt
 
  Should this be posted on the Forum for Wicket Core developers forum?
 
  Simon
 
 
 
  --
  View this message in context:
 http://apache-wicket.1842946.n4.nabble.com/format-value-missing-in-ConversionException-thrown-by-wicket-datetime-s-DateConverter-tp4653598p4653603.html
  Sent from the Users forum mailing list archive at Nabble.com.
 
  -
  To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 



 --
 Martin Grigorov
 jWeekend
 Training, Consulting, Development
 http://jWeekend.com

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




Re: format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-04 Thread Simon B
Hi Benedikt

Should this be posted on the Forum for Wicket Core developers forum?

Simon



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/format-value-missing-in-ConversionException-thrown-by-wicket-datetime-s-DateConverter-tp4653598p4653603.html
Sent from the Users forum mailing list archive at Nabble.com.

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-04 Thread Martin Grigorov
Hi,

We follow users@ mailing list too :-)

Since
1) DateConverter is not final
2) the related methods in it are public, non-final
3) it is possible to register custom converter for Date.class in
ConverterLocator

I think you should be able to do what you need.
Are there any breaks ?

On Sun, Nov 4, 2012 at 1:59 PM, Simon B simon.bott...@gmail.com wrote:
 Hi Benedikt

 Should this be posted on the Forum for Wicket Core developers forum?

 Simon



 --
 View this message in context: 
 http://apache-wicket.1842946.n4.nabble.com/format-value-missing-in-ConversionException-thrown-by-wicket-datetime-s-DateConverter-tp4653598p4653603.html
 Sent from the Users forum mailing list archive at Nabble.com.

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



format value missing in ConversionException thrown by wicket-datetime's DateConverter

2012-11-03 Thread Benedikt Schlegel
Hi,
I just thought how neat it'd be, if the ConversionException created and
thrown by DateConverter.convertToObject() would contain the format used for
the parse attempt..

A call on .setFormat(format) on the created ConversionException would do
the job, and one could present a more specific error message than (in my
case) 'start' is not a valid Date.

How's that?