X

Geertjan's Blog

  • December 9, 2008

NetBeans Platform CRUD

Geertjan Wielenga
Product Manager
One thing I'm meant to be working on is writing a tutorial for creating a CRUD application on the NetBeans Platform. The related issue and interesting documentation relating to this point can be found in the issue:

http://www.netbeans.org/issues/show_bug.cgi?id=146402

And here's where things are right now:

It is a prototype that uses the Database Explorer API to display information in a NetBeans Explorer View via the Nodes API. It also prints column names to the Output window when a node is double-clicked. Now the column names need to end up in the columns in the Details view. One way in which this might be done is to add the column names to the global Lookup whenever a table name is selected. The global Lookup would then be available to the Details view, which would then display them as the columns of the table. Seems like a NetBeans-centric approach to me. Any advice from anyone out there on this point?

Join the discussion

Comments ( 9 )
  • Tom Wheeler Tuesday, December 9, 2008

    Of course there are multiple ways to solve any problem, but the way I'd approach it would be to create a business object (i.e. a simple JavaBean named Customer) for each record in the table. The fields of that object would correspond to the columns in the table. I'd then create a Node instance for each of these objects and make each field a Node.Property of that node. Using a BeanNode is probably the simplest approach if you don't require much customization. Your table could then be an explorer view of some sort.

    I'd also place an instance of the business object in the Lookup of that node. That will allow other code to listen to the global selection and be able to access the current customer object and react to selection changes easily.


  • Gilberto Monday, December 15, 2008

    I am waiting... anxious!!

    []'s


  • jerry Tuesday, December 16, 2008

    Also waiting patiently. Serious benefit will accrue from a clear HOW-TO documentation set for building CRUD Application on top of Netbeans Platform


  • Eduardo Catarino Wednesday, December 17, 2008

    Please update your sample documentation as soon as possible.

    I'm waiting for an example for quite long time...

    Thanks!


  • Geertjan Wednesday, December 17, 2008

    Eduardo, what do you mean? What needs to be updated? Everything has been updated already so it's not clear what you're talking about.


  • Eduardo Catarino Friday, December 19, 2008

    I'm talking about the tutorial for creating a CRUD application. I'm developing a RCP application and I would like to use the Netbeans CRUD functionalities. However I did not manage to do it and I was waiting for a sample application to se what I'm doing wrong.....


  • darek Sunday, January 11, 2009

    It would be nice.

    But what about JPA support in Netbeans (with hibernate for example). I've tried to add hibernate to platform but I'd failed :/


  • sinema izle Tuesday, March 10, 2009

    I'm waiting for an example for quite long time...Thanks


  • Randin Saturday, May 9, 2009

    How about an JPA example that uses a more complex example, Netbeans has one with a two table DB but one with 5+ tables would be more useful, with examples of the various relationships...


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.