Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » DataBinding DateTime?
DataBinding DateTime? [message #516690] Wed, 24 February 2010 09:10 Go to next message
Charlie Kelly is currently offline Charlie Kelly
Messages: 274
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] Wed, 03 March 2010 20:00 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew Hall
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 12:44 Go to previous message
Charlie Kelly is currently offline Charlie Kelly
Messages: 274
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:Customizable error area in a wizard
Next Topic:Why TreeViewer is not intended to be subclassed by clients.
Goto Forum:
  


Current Time: Tue Jul 22 05:19:13 EDT 2014

Powered by FUDForum. Page generated in 0.02104 seconds