Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » DataBinding DateTime?
DataBinding DateTime? [message #516690] Wed, 24 February 2010 14:10 Go to next message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
What is the correct method for databinding a DateTime ?

Are there any snippets, or documentation, available ?

Thanks

Charlie
Re: DataBinding DateTime? [message #518428 is a reply to message #516690] Thu, 04 March 2010 01:00 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew HallFriend
Messages: 368
Registered: July 2009
Senior Member
This should work for you:

bindingContext.bindValue(WidgetProperties.selection().observ e(dateTime),
modelObservable);

or

bindingContext.bindValue(SWTObservables.observeSelection(dat eTime),
modelObservable);

See also DateAndTimeObservableValue if you have separate widgets for
date and time, and you need to combine the date and time components into
a single timestamp-style observable.

Hope this helps,

Matthew

exquisitus wrote:
> What is the correct method for databinding a DateTime ?
>
> Are there any snippets, or documentation, available ?
>
> Thanks
>
> Charlie
Re: DataBinding DateTime? [message #518676 is a reply to message #518428] Thu, 04 March 2010 17:44 Go to previous message
Charlie Kelly is currently offline Charlie KellyFriend
Messages: 276
Registered: July 2009
Senior Member
Hi Matthew,

Yes, this helps.

Thank you

Charlie

Matthew Hall wrote:
> This should work for you:
>
> bindingContext.bindValue(WidgetProperties.selection().observ e(dateTime),
> modelObservable);
>
> or
>
> bindingContext.bindValue(SWTObservables.observeSelection(dat eTime),
> modelObservable);
>
> See also DateAndTimeObservableValue if you have separate widgets for
> date and time, and you need to combine the date and time components into
> a single timestamp-style observable.
>
> Hope this helps,
>
> Matthew
>
> exquisitus wrote:
>> What is the correct method for databinding a DateTime ?
>>
>> Are there any snippets, or documentation, available ?
>>
>> Thanks
>>
>> Charlie
Previous Topic:[Databinding] binding to sub objects
Next Topic:[Databinding] Transform Boolean value bound to checkbox control into string and save it as a map val
Goto Forum:
  


Current Time: Fri Apr 19 13:05:05 GMT 2024

Powered by FUDForum. Page generated in 0.02290 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top