Luxor XUL as a GUI engine for Beanshell scripts

Dimitri Pissarenko <[email protected]> Tue, 04 Nov 2003 15:34:52 +0100
Newsgroups gmane.comp.java.luxor-xul.user
Message-ID <[email protected]>
Hello!

I want to use Luxor XUL as a GUI engine in Beanshell scripts.
Beanshell scripts (http://www.beanshell.org/) offer the advantage of
scripting languages (flexibility) and at the same time allow to
transform some parts of the script into normal Java code if needed.

One can say, that one can program in the following way:

a) all simple tasks (which need not to be tested with JUnit; like
output of some calculated value into a file) are performed in the
Beanshell script

b) all tasks, which are either complex, or must be JUnit-tested (like
calculation of some value), are performed in Java objects, whose
methods are called from within the Beanshell scripts.

I've already been using this scheme for some months and think that it
is suitable for some of my projects.

Now, I've thought about whether it is possible to simplify the
development according to this scheme by means of simplifiying one of
the most tedious tasks - creation of GUI forms (we are doing it with
Together ControCenter 6.0 at the moment).

I want to be able to do following:

<example>
fileName = "someFile.xml";
dialog = createDialgog(fileName);
dialog.show();
if (dialog.isClosedWithOk())
{
  valueA = (String)dialog.getValue("A");
  valueB = (Double)dialog.getValue("B");
}

</example>

That is, first I write a description of the UI and store it in a file,
like an HTML form. Then, Luxor creates a dialog box from this file,
and this dialog box is made visible.

After ther user closed the dialog, I check whether he pressed OK or
Cancel and then retrieve the data he entered.

I would like to know, whether there is a simple way to do this with
Luxor. I've played a bit around with it, but did not find a solution.
Could you give me some hints about how to implement this in the most
simple way?

Do I really need the server inside Luxor for just displaying a simple
form?

TIA

Dimitri Pissarenko


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/