Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Config Options

 
Kevin Broderick
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am inspired by Andrew Monkhouse's example of doing the config so I decided to try and create my configuration dialog like his such that I have a seperate panel holding the configuration options (for database location and port number, depending on the mode) and this panel is embeded on the main dialog.

I just wondering if I should use an observer pattern that he uses on validating the config options or is there another way that's not as complex.

Thanks in advance

Kevin
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Kevin!

Well champion, here's what I did: for each mode the application can be started, there's one dialog where the user provides specific properties (for more information, please take a look here). These dialogs are displayed to the user before the application starts. After the user presses the OK button, some validation is performed. If everything's ok, these properties are saved in the suncertify.properties file and the main window is displayed. That is, the area where the user provides the properties are separate from the main window.
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kevin,

I followed a similar approach as in Andrew's book: I have a panel to enter configuration settings, which is used in the dialog (shown at startup of the client) and in the server window. The panel knows in which mode it is running. Depending on this mode the panel is created and specific validations are executed. So validations are a part of this panel. I don't know if this is different than the approach in Andrew's book, but I do know that the validation was not sufficient.

Kind regards,
Roel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic