NetBeans Forums

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

non-SQL persistant tree-like CRUD

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
timotheus2



Joined: 21 Sep 2009
Posts: 37

PostPosted: Fri Oct 02, 2009 10:48 pm    Post subject: non-SQL persistant tree-like CRUD Reply with quote

I am creating a CRUD application as follows.

(1) Module "ModuleData" has a serializable tree of POJOs (set and get data objects). Level0 contains a list of Level1 objects. Level1 has data fields and a list of Level2 objects. Level2 has different data fields and list of Level3 objects. Level3 has data fields that differ from the other levels.

(2) Module "ModuleExplorer" has an explorer window that uses the Nodes API to show a root folder as Level0; which expands to a list of Level1 nodes, which then expand to show lists of Level2 nodes downto Level3, similar to the FeedReader tutorial.

(3) Module "ModuleEditor" has an editor window with text fields to edit the POJO fields, similar to the CRUD tutorial. A panel class exists that correlates to each of the POJOs.


I am somewhat confused. How do I start implementing the following using the Netbeans APIs?

(a) Whenever a node is selected in the explorer window, a different panel with different fields should be active in the editor window.

(b) Only one tree of instances of the Level0-2 objects should be created. Those instances need to be associated with both the nodes in the explorer window and the editor window. For every node the corresponding data/level object should exist. And for ever data/level object, the corresponding editor panel should exist and be displayed.


Is this a good low-coupling implementation, or should I be attempting the same functionality in a different way?
Back to top
tomwheeler



Joined: 03 Sep 2008
Posts: 950

PostPosted: Fri Oct 02, 2009 11:10 pm    Post subject: non-SQL persistant tree-like CRUD Reply with quote

It's rather late on a Friday, so I will preface my advice by saying I
probably didn't understand every detail of your explanation. But the
two pieces of advice I'd offer are:

You can (and almost certainly should) use Lookups for loosely-coupled
communication between things in NetBeans. This is probably the most
important oy any NetBeans API, so I recommend reading up on it:

http://wiki.netbeans.org/DevFaqLookup

It sounds to me like you're trying to create a master-detail view or
some variation thereof. If so, the orange "Rich Client Programming"
book by Tim Boudreau, Jaroslav Tulach and Geertjan Wielenga has an
example (and lots of explanation) for something similar in chapter 9.

On Fri, Oct 2, 2009 at 5:49 PM, timotheus2 <address-removed> wrote:
Quote:
I am creating a CRUD application as follows.



(1) Module "ModuleData" has a serializable tree of POJOs (set and get data objects). Level0 contains a list of Level1 objects. Level1 has data fields and a list of Level2 objects. Level2 has different data fields and list of Level3 objects. Level3 has data fields that differ from the other levels.



(2) Module "ModuleExplorer" has an explorer window that uses the Nodes API to show a root folder as Level0; which expands to a list of Level1 nodes, which then expand to show lists of Level2 nodes downto Level3, similar to the FeedReader tutorial.



(3) Module "ModuleEditor" has an editor window with text fields to edit the POJO fields, similar to the CRUD tutorial. A panel class exists that correlates to each of the POJOs.





I am somewhat confused. How do I start implementing the following using the Netbeans APIs?



(a) Whenever a node is selected in the explorer window, a different panel with different fields should be active in the editor window.



(b) Only one tree of instances of the Level0-2 objects should be created. Those instances need to be associated with both the nodes in the explorer window and the editor window. For every node the corresponding data/level object should exist. And for ever data/level object, the corresponding editor panel should exist and be displayed.





Is this a good low-coupling implementation, or should I be attempting the same functionality in a different way?








--
Tom Wheeler
http://www.tomwheeler.com/
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users 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
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo