We are pleased to announce the immediate availability of Servoy 4.1.0 beta 5.
Make a backup of your current Servoy installation (directory and database) before installing.
This version is available through the download page on the Servoy website (developer section). This version will also be available through auto update shortly.
Changes
[new] dataset as datasource via “dataset.createDataSource(…)”, this results in the possibility to use forms created in solutionModel on any dataset
[new] solutionModel now allows for query and create relations
[new] solutionModel form variable support
[new] case 158142: databaseManager.getTableFilterParams(…)
[enh] case 167168: aggregate error markers generated for missing/disabled servers instead of hunderds of errors
[enh] case 168711: link with editor now expands the form node and makes the expanded node visible
[chg] minor: default value “” when creating global integer and number will result in: " = null" in the .js file (because non-initialized numeric vars default to 0 in Servoy instead of expected null)
[fix] case 148300,169287: “clean import” for non-shared solutions not working
[fix] case 161647, 168918, 165283, 161951: tooltip problems in web client, when tooltip is too close to the edge scrollbars appear and disappear continuously
[fix] case 163086: changes to style sheets not reflected in debug webclient
[fix] case 164729: white screens while waiting for Eclipse to catch up
[fix] case 164992: form editor freezes due to decorators
[fix] case 166391: styesheet margins don’t work when border property of label is set to default
[fix] case 167741: simple label always anchors to the bottom in webclient
[fix] case 168485: when developer is not started as team server, the solution node on admin page gives an unclear message
[fix] case 168702: warnings for broken filestructure in developer show wrong path
[fix] case 168735: developer right-click on warning and select “Show In” results in a beep and the object does not get selected in the Solution Explorer
[fix] case 168998: more developer checks for duplicate element names on a form
[fix] case 169037: wrong HTML field display in web client table view
[fix] case 169039: “missing” column properties in column editor
[fix] case 169493: i18n in titled border labels not shown correctly in developer
[fix] case 169524: impossible to update stylesheet in developer
Known issues
switching workspaces occasionally hangs developer
still some small anchoring issues in web client; web client anchoring can be switched off via the ‘servoy.webclient.enableAnchors’ property in the servoy.properties config file, like: servoy.webclient.enableAnchors=false
svroemisse:
[new] dataset as datasource via “dataset.createDataSource(…)”, this results in the possibility to use forms created in solutionModel on any dataset
Here is a small example of a data set used in a form:
var fname = "testform"
if (!forms[fname])
{
// create dataset
ds = databaseManager.createEmptyDataSet()
ds.addColumn("x_id")
ds.addColumn("bla t")
ds.addRow([100, 'aap'])
ds.addRow([101, 'noot'])
ds.addRow([102, 'mies'])
//Create a new data source, returns an uri that can be used to build forms on
var uri = ds.createDataSource('mydata', [DM_COLUMNTYPE.INTEGER, DM_COLUMNTYPE.TEXT]);
// create form
var jsform = solutionModel.newForm(fname, uri, null, true, 300, 300);
jsform.newTextField("x_id",100,100,100,20);
jsform.newTextField("bla_t",100,130,100,20);
}
application.output(fname)
forms[fname].controller.show()
Essentially you can now create an on the fly form and base it on anything! For example on a query!
function createformbyq()
{
var query = 'select customerid, address, city, country from customers';
var dataset = databaseManager.getDataSetByQuery('example_data', query, null, 999);
var uri = dataset.createDataSource('mydata2', [DM_COLUMNTYPE.TEXT, DM_COLUMNTYPE.TEXT, DM_COLUMNTYPE.TEXT, DM_COLUMNTYPE.TEXT]);
var jsform = solutionModel.newForm('test', uri, null, true, 800, 600);
jsform.newTextField("customerid",100,100,100,20);
jsform.newTextField("address",100,130,100,20);
jsform.newTextField("city",100,160,100,20);
jsform.newTextField("country",100,190,100,20);
forms.test.controller.show()
}
4.1 desperately needs a function to create a solutionModel form from a regular form to keep this whole deal from being a truckload of coding work. Something like:
I really wonder why you would need to “copy a form” at solution model level.
The solution model also exposes the “Extend” property on a form, which is way more powerful mechanism than “copy a form”, just extend some form which has properties/elements/behaviour you want to see in/on/at other forms (and it saves a significant amount of memory at solution model side)
I suggest to have a real in depth look at the sample “servoy_sample_solutionModel” which is shipping with 4.1 versions (full install), this is the demo from ServoyWorld2008, and makes heavy use of “extends”
BTW solutionModel does allow to base sub-forms on different tables, which is not (yet) possible in current form designer.
I have a test instance of Servoy running on Ubuntu 8.04 (headless VPS).
It was running 4.0.1 just fine. I ran the update “java -jar servoy_updater.jar -beta” up to 4.1b5, and now the server will not start, with the following log entry:
0 [main] INFO com.servoy.j2db.util.Debug - Loading servoy.properties from /home/greg/servoy_test/application_server/servoy.properties
200 [main] INFO com.servoy.j2db.util.Debug - Loading - Done
Exception in thread "main" java.lang.IllegalAccessError: class com.servoy.j2db.scripting.InstanceJavaMembers cannot access its superclass org.mozilla.javascript.JavaMembers
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:637)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:336)
at com.servoy.j2db.dataprocessing.FoundSet.<clinit>(FoundSet.java)
at com.servoy.j2db.dataprocessing.ClientManager.<init>(ClientManager.java)
at com.servoy.j2db.dataprocessing.SQLEngine.<init>(SQLEngine.java)
at com.servoy.j2db.server.ApplicationServer.main(ApplicationServer.java)
It seems that you have an older version of js.jar in your classpath.
Maybe you can try adding -verbose:class to the java call in servoy_server.sh, it will log which class is loaded from which file.
Thanks, Rob. Found the culprit using -verbose:class.
Something worth noting. The Open JRE package, at least for Ubuntu, has Rhino at “/usr/lib/jvm/java-6-openjdk/jre/lib/rhino.jar” in it’s standard install. This was conflicting. I removed it and I’m back up and running.
You do get back an array of arrays. for each table filter a array of length 5 is returned with elements:
tableName, dataprovider, operator, value, filterName
var params = databaseManager.getTableFilterParams(controller.getServerName())
for (var i = 0; i < params.length; i++)
{
application.output("tableName="+params[i][0]+", dataprovider="+params[i][1]+", operator="+params[i][2]+", value="+params[i][3]+", filterName="+params[i][4])
}