Swing validation in Config file

S

sarath

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
 
R

Roedy Green

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,734
Latest member
manin

Latest Threads

Top