Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Server Scripting Error

    SmartClient Version: v10.0p_2015-01-23/Pro Deployment (built 2015-01-23)
    Browser: Chrome 61.0.3163.79 (Official Build) (64-bit)

    I'm getting an error when trying to do basic server scripting with the Java language. I get the error shown in the attached image file when I perform a fetch on a grid that uses my data source. The data source has the following definition:

    <DataSource ID="employeeDS" schema="PUB" tableName="Employee">
    <script language="java">
    if (DataSource.isAdd(dsRequest.getOperationType())) {
    dsRequest.setFieldValue("FirstName", "John");
    } else {
    dsRequest.setCriteriaValue("FirstName", "John");
    }
    </script>
    <fields>
    <field name="EmployeeID" primaryKey="true"/>
    <field name="FirstName"/>
    </fields>
    </DataSource>


    The contents of my test JavaScript file are the following:

    isc.DataSource.load("employeeDS", function() {
    var employeeGrid = isc.ListGrid.create({
    left: 50,
    top: 50,
    width: 800,
    dataSource: "employeeDS"
    });

    employeeGrid.fetchData();
    });


    Incidentally, I found that I get a similar error in the SmartClient example program at the URL https://www.smartclient.com/smartcli...erSpecificData
    How can I resolve this issue?
    Attached Files

    #2
    The engine that we were using to evaluate Java as a server scripting language has run into strange incompatibilities with the internals of other libraries, with no resolution in sight, so we switched our recommendation to use Groovy, which a Java developer can use without really learning it (since it accepts Java syntax with very few exceptions).

    The more recent version of the same sample now shows Groovy, and the code is identical to the Java code.

    Comment

    Working...
    X