1

ZK 8 - Java 8 - LocalDate

asked 2017-06-06 02:47:27 +0800

pafi gravatar image pafi
11 1

Hello everybody,

is it possible to use Java 8 LocalDate (or LocalDateTime) with ZK <datebox> ? When I choose a date in the calendar it says "Cannot convert 07/06/17 00:00 of type class java.util.Date to class java.time.LocalDateTime".

Thank you for your answer.

delete flag offensive retag edit

4 Answers

Sort by ยป oldest newest most voted
1

answered 2019-02-04 09:43:30 +0800

cor3000 gravatar image cor3000
4466 2 7
ZK Team

1) I made your link clickable, and added karma so you can create links from now on. 2) If you want to report a problem or a feature request please do so in our issue tracker (that's the place were we plan for upcoming or future releases): https://tracker.zkoss.org/

However as long as ZK still supports Java 5/6/7 (and this is due to user's demand) the core components won't be able to use JDK 8 API's.

Besides that it should be possible to implement a @Converter that does what you need (converting from Date to LocalDate as needed).

About form proxies: it would be helpful to provide the exception (in most cases of immutable classes it's enough to ignore these particular classes from proxy generation) E.g. you can override the ignoreProxyClasses list using a librarypropery https://www.zkoss.org/wiki/ZKConfigurationReference/zk.xml/TheLibraryProperties/org.zkoss.bind.proxy.IgnoredProxyClasses

For dedicated report please contact us directly: https://www.zkoss.org/support

link publish delete flag offensive edit

Comments

Thank you cor3000. I will use the issue tracker in the future. Best!

YannUnil ( 2019-03-20 23:04:50 +0800 )edit
0

answered 2017-06-10 13:29:28 +0800

Darksu gravatar image Darksu
1991 1 4

Hello pafi,

To help you out please read the following forum post:

https://stackoverflow.com/questions/22929237/convert-java-time-localdate-into-java-util-date-type

Best,

Darksu

link publish delete flag offensive edit
0

answered 2019-02-01 22:31:33 +0800

YannUnil gravatar image YannUnil
51 1

updated 2019-02-04 09:25:03 +0800

cor3000 gravatar image cor3000
4466 2 7
ZK Team

Still not possible... I have opened issue 1521 on Zk's Github (not able to post the link).

I'm hoping not to get stuck for too long with that old Dates !

link publish delete flag offensive edit
0

answered 2019-02-07 18:30:14 +0800

siya50019 gravatar image siya50019
1

Great Post. Thanks for this valuable post on java

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2017-06-06 02:47:27 +0800

Seen: 28 times

Last updated: Feb 07

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More