FeaturesPluginsDocs & SupportCommunityPartners

NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Beans binding in Matisse forces use of JPA queries/results

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers
View previous topic :: View next topic  
Author Message
Erik Post



Joined: 31 Aug 2008
Posts: 4
Location: The Netherlands

PostPosted: Thu Sep 04, 2008 3:06 pm    Post subject: Beans binding in Matisse forces use of JPA queries/results Reply with quote

Hi all,

(I posted this message in nbusers before...)

I have been using the Swing GUI builder for a while now, and I'm a bit surprised at how some of the binding stuff works. Say I have a JTable (e.g. myTable) that displays the results of a list (myList). To my understanding, this would require the following components:

- a JTable myTable, bound to...
- a JPA query result List myList, bound to...
- a JPA Query myQuery, using...
- a JPA EntityManager

If I want to bind a table to a list using the GUI builder, regardless of whether this table has anything to do with JPA at all, I am forced to create a query and possibly an entity manager as well. Then I have to hand-edit their code to fool the GUI
builder into thinking I'm using them, while they are essentially just dummy objects created for the sake of the GUI builder. (Incidentally, there were some bugs in previous NB versions which I think have mostly disappeared now, which made customizing the declaration and initialization near impossible for me. So the GUI builder was mostly getting in the way
of what I wanted to do instead of helping me out.)

Anyway, I think this is a separation of concerns issue; although it might be convenient in some cases to bind to a query result list, this is just one of many possible use cases. It would be good to be able to bind to regular (non-JPA) lists. Suppose I had a JTable bound to a list:

Code:

java.util.List<Person> myPersonList;


Then the GUI builder might infer from the declaration (or from some additional property or whatever) that the list is of type <Person>, so we could still use the GUI builder to specify our JTable columns. Would this be very difficult to do? I haven't looked at the sources for the query result components and such.

I'm wondering if nobody else has come across this problem... Having the functionality I just described stikes me as a bit of a no-brainer, so I'm also wondering if this isn't a planned feature for future versions of Matisse?

Thanks in advance for any comments.

Cheers,
Erik
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Developers All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB