0

datebox problem

asked 2018-04-12 23:03:07 +0800

semyu gravatar image semyu
1

i have a datebox in my zk file and i want to save it in my database (sql) how do i declare it in java

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-04-13 23:50:06 +0800

jorgimello gravatar image jorgimello
16 1

Just have a Date from java.util.Date attached (@bind) to the component and persist it on the database.

<datebox format="dd/MM/yyyy"
     maxlength="10"             
 value="@bind(vm.date)" />

The attribute should be mapped correctly to the class:

@Temporal(TemporalType.TIMESTAMP)
@Column(name = "date")
private Date date;
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
1 follower

RSS

Stats

Asked: 2018-04-12 23:03:07 +0800

Seen: 7 times

Last updated: Apr 13

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