Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2007

Tip: Looking for answers? Try searching our database.

Swing validation in Config file

Thread view: 
sarath - 17 Jul 2007 12:50 GMT
I have a swing application, which includes a lot of validation in the
client side,
For Eg.
1, If you select a particular value in a combo box, one radio-button
should be grayed
2, If one check box is selected, one item should be added to a combo
box

Is there any approach so that I can put all these kinds of validations
into a config or an XML file so that validations would be done
accordingly? If some one has done anything similar to this, pls guide
me. Any help would be appreciated.

regards
sarath
Roedy Green - 17 Jul 2007 20:34 GMT
>Is there any approach so that I can put all these kinds of validations
>into a config or an XML file so that validations would be done
>accordingly?

Here are some approaches I would consider:

1. write a preprocessor so you can embed boilerplate generating code
in your Java.

2. write you apps in some new terse syntax, and convert them to Java
source.

3. write your java app in some new syntax (that allows calls to
dynamically loaded Java classes for complex logic).  Generate a set of
objects.  Send that tree to the app from the server. It then generates
the widgets.  In your syntax make use of the LIKE verb to bulk copy
attributes from various template objects.  It gives you a very
flexible form of inheritance.

see http://mindprod.com/jgloss/parser.html

XML is harder to maintain that Java source.  
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.