Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Tabbed text field using Jface databinding(Pouplate tabbed text field using jface databinding)
Tabbed text field using Jface databinding [message #995769] Sun, 30 December 2012 23:07 Go to next message
Prashant p is currently offline Prashant p
Messages: 57
Registered: October 2012
Member
Hi,

I have, for example SSN number (1234-5678). This need to be in two text fields as per attached screenshot. I tried to create, but one only SSN number 1234 gets populated in both text field. What i did is i created POJO which holds SSN value and bind to 2 text field. Instead do i need to create 2 ssn fields in POJO? For example

Initial version

class A{

private string ssn;
}

Planned change

class A{
private string ssn1
private string ssn2
}

please help me out
Re: Tabbed text field using Jface databinding [message #1008409 is a reply to message #995769] Tue, 12 February 2013 06:16 Go to previous message
Nigel Westbury is currently offline Nigel Westbury
Messages: 13
Registered: July 2009
Junior Member
Hi Prashant,

You can use the DateAndTimeObservableValue class as an example of how to
do this properly. That class splits a single Date timestamp field into
a Date containing the date part only and a Date containing the time part
only, so these can be bound to two controls, one showing the date part
and one the time part.

I know that class is quite big and more complex than perhaps you might
expect. I am hoping this will be addressed in e4 and made simpler.

Nigel Westbury

On 31/12/2012 04:07, Prashant p wrote:
> Hi,
>
> I have, for example SSN number (1234-5678). This need to be in two text fields as per attached screenshot. I tried to create, but one only SSN number 1234 gets populated in both text field. What i did is i created POJO which holds SSN value and bind to 2 text field. Instead do i need to create 2 ssn fields in POJO? For example
>
> Initial version
>
> class A{
>
> private string ssn;
> }
>
> Planned change
>
> class A{
> private string ssn1
> private string ssn2
> }
>
> please help me out
>
Previous Topic:Arrays as dynamic properties (TableViewer Databinding)
Next Topic:How to bind a list-size to a label
Goto Forum:
  


Current Time: Wed Apr 23 20:59:26 EDT 2014

Powered by FUDForum. Page generated in 0.01816 seconds