pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Separovic, Jason" <jseparo...@uecomm.com.au>
Subject TableView Objects with nested Objects
Date Thu, 23 May 2013 05:52:06 GMT
Hi,

I'm developing an app that is able to generate a generic CRUD type interface for a bunch of
JPA Classes in a given package.

For now, I've decided to use ListButtons for OneToOne mappings (and ListViews for OneToMany
mappings)

I'm testing the OneToOne bit and while I'm able to display the "toString" representation in
the listButton, I'm not too sure on what is needed to store the selected object back to the
row object prior to persisting it in the DB.

This is where I define the cell editor.

                                  Class columnClass = f.getType();
                                  List<Object> columnObjects = dao.getAll(columnClass);

                                  ListButton listButton = new ListButton();
                                  ArrayList listData = new ArrayList();

                                  listData.add(null);
                                  for(Object o : columnObjects) {
                                         listData.add(o);
                                  }

                                  listButton.setListData(listData);
                                  tableViewRowEditor.getCellEditors().put(f.getName(), listButton);

Do I need to use a data binding? I was wondering if someone could point me to an example I
can look at?

Cheers,

Jason

This message and its attachments may contain legally privileged or confidential information.
It is for the intended addressee(s) only.
If you are not the intended recipient you must not disclose or use the information contained
in it. If you have received this email in error please notify us immediately by return email
and delete the document.
Any views expressed in this message are those of the individual sender, except where the sender
specifies and with authority, states them to be the views of the Company.
Uecomm accepts no liability for any damage caused by this email or its attachments due to
viruses, interference, interception, corruption or unauthorised access.

#####################################################################################
This e-mail message has been scanned for Viruses and Content and cleared 
by NetIQ MailMarshal
#####################################################################################

Mime
View raw message