Customizing Date input Ridgets [message #19503] |
Sat, 24 January 2009 09:37  |
Eclipse User |
|
|
|
In my application I need to provide a wide range of (legacy) input
shortcuts for dates. Users can type X for today X+1 for tomorrow etc.
What's the best way to do this in Riena?
--
Thanks,
Ron
rpomeroy at mac.com
|
|
|
Re: Customizing Date input Ridgets [message #19728 is a reply to message #19503] |
Tue, 27 January 2009 07:42  |
Eclipse User |
|
|
|
Ronald Pomeroy schrieb:
> In my application I need to provide a wide range of (legacy) input
> shortcuts for dates. Users can type X for today X+1 for tomorrow etc.
>
> What's the best way to do this in Riena?
>
Hi Ronald,
sorry it took us so long to come back to you. (missunderstand in the team)
Since we are internally using JFace Databinding, I dont think the answer to your question is any different than what you
would do if you use only SWT and JFace.
So what comes in my mind is that you can use an IConverter that converts the data from the widget to the model. And then
implement a convert to convert X to the current date.
So the IDateTextRidget has method setUIControlToModelConverter(IConverter converter) and that IConverter that you write
needs to contain the code to convert X to the current date ?
Does that make sense ? If not or it doesnt work, let me know
christian
|
|
|
Re: Customizing Date input Ridgets [message #578206 is a reply to message #19503] |
Tue, 27 January 2009 07:42  |
Eclipse User |
|
|
|
Ronald Pomeroy schrieb:
> In my application I need to provide a wide range of (legacy) input
> shortcuts for dates. Users can type X for today X+1 for tomorrow etc.
>
> What's the best way to do this in Riena?
>
Hi Ronald,
sorry it took us so long to come back to you. (missunderstand in the team)
Since we are internally using JFace Databinding, I dont think the answer to your question is any different than what you
would do if you use only SWT and JFace.
So what comes in my mind is that you can use an IConverter that converts the data from the widget to the model. And then
implement a convert to convert X to the current date.
So the IDateTextRidget has method setUIControlToModelConverter(IConverter converter) and that IConverter that you write
needs to contain the code to convert X to the current date ?
Does that make sense ? If not or it doesnt work, let me know
christian
|
|
|
Powered by
FUDForum. Page generated in 0.03360 seconds