Re: faster development with xul
Anakreon <[email protected]> Thu, 15 Apr 2004 13:05:54 +0300
| Newsgroups | gmane.comp.java.luxor-xul.user |
|---|---|
| Message-ID | <[email protected]> |
The reason why jsp was created is because of the unconvinience html + java code
creates.
You example would resemble to a Servlet which does just that.If you'd like to
make a modification to the xml,
then a recompilation is necessary.
> 1. create XUL form in separate file
It should be easier to write:
<vbox>
<hbox>
<label value="Select country "/>
<spacer flex="1"/>
<checkwidget id="currentCountry"/>
</hbox>
</vbox>
then
" <vbox>"
+ " <hbox>"
+ " <label value=\"Select country \"/>"
+ " <spacer flex=\"1\"/>"
+ " <checkwidget id=\"currentCountry\"/>"
+ " </hbox>"
+ " </vbox>";
> 2. make sure it will be loaded with xul-loader
This isn't a big deal.Put the xul files in a jar which is included in the class
path.You have other alternatives also.
> 3. write some java class
In your example, this will happen anyway.
>
> So, I offering to allow using "dynamic xul's", then everything will be
> in one place. For example:
>
> class MyXulForm extends DynamicXulForm {
> public MyXulForm {
> super();
> }
>
> //this method can be implemented in different ways
> // - return custom (dynamic) xul form
> // - return xul form loaded in standard way, by ID
> protected Xul getXulFormDefinition() {
> Xul xul = "
> <vbox>
> <hbox>
> <label value="Select country "/>
> <spacer flex="1"/>
> <checkwidget id="currentCountry"/>
> </hbox>
> </vbox>
> "
> }
>
> Map getInitFields() {
> Map map = new HashMap();
> map.put(new Country());
> return map;
> }
> }
>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click