Revision history [back]

click to hide/show revision 1
initial version

asked 2012-10-31 13:35:10 +0800

terrytornado gravatar image terrytornado flag of Germany

http://www.oxitec.de/

timebox BUG ?

Hi all,

ZK 5.0.11

i have a zul-file with annotated databinded datebox and timebox to the same bean property..

if i initialize the bean date property and call a binder.loadAll() there are different dates in it.

<hbox>
   <datebox id="dateb_Comment_Date" value="@{controller.comment.date}" constraint="no empty" disabled="true" width="110px" ></datebox>
   <timebox id="timeb_Comment_Time" value="@{controller.comment.date}" constraint="no empty" disabled="true" width="110px" ></timebox>
</hbox>

.

        Comment comment = getXXXXXXXXXXXService().getNewComment(tenant.getId(), objType);
        comment.setDate(new java.util.Date());

        // Refresh the binding mechanism
                . . .
        getCommentDetailCtrl().getBinder().loadAll();

                // For Console Output
        java.util.Date dt = getCommentDetailCtrl().dateb_Comment_Date.getValue();
        System.out.println("### datebox ###" + dt.toString());
        java.util.Date dt2 = getCommentDetailCtrl().timeb_Comment_Time.getValue();
        System.out.println("#### timebox ######" + dt2.toString());

datebox ###Wed Oct 31 00:00:00 CET 2012

timebox ######Thu Jan 01 14:25:30 CET 1970

The problem is that the timebox resets the datebox to '01.01.1970'. This occurs NOT if i change some of the timebox (hh:mm:ss) value in the view, than it's the same date.

any hint on this?

thanks Stephan

after binder.loadAll() image

after binder.saveAll() and saving image

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