Good day
I’ve installed Smartclient on a JBoss 4.0 server running in eclipse. When I try and run a datasource SmartClient application I get the following error “Unable to load DataSource for ID”. I’ve further copied the examples folder into the webroot directory of the environment that I’m running it in, the examples give the same error without any changes to the code.
I have not yet fully developed the whole app, I’m trying to test certain areas first. The application is a simple Proof of concept application involving different technologies working together on a specified architechture.
The DataSource is defined as follows
<DataSource ID="salesRepDS" serverType="generic">
<fields>
<field primaryKey="true" name="id" hidden="true" type="sequence" />
<field name="address" title="Address" type="text" length="2000" />
<field name="name" title="Name and Surname" type="text" />
<field name="age" title="Age" type="integer" />
<field name="sex" title="Gender" type="text" >
<valueMap>
<value>Male</value>
<value>Female</value>
</valueMap>
</field>
</fields>
<serverObject lookupStyle="new" className="com.stracienta.PoC.BusinessLogicTier.BusinessLogic"/>
</DataSource>
The jsp page’s source is as follows
<?xml version="1.0" encoding="ISO-8859-1" ?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:isomorphic="isomorphic" version="2.0">
<jsp:directive.page language="java"
contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1" />
<jsp:text>
<![CDATA[ <?xml version="1.0" encoding="ISO-8859-1" ?> ]]>
</jsp:text>
<jsp:text>
<![CDATA[ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ]]>
</jsp:text>
<html><head>
<isomorphic:loadISC skin="SmartClient"/>
<isomorphic:loadDS ID="salesRepDS" />
</head>
<body>
<script>
var salesRepDS = DataSource.create({
fields: ...,
clientOnly : true,
testData :
<isomorphic:XML filename="DataDefs/salesRepDS.xml"/>
});
var form = isc.DynamicForm.create({width:500, dataSource:salesRepDS});
var deleteButton = isc.Button.create({title:"Delete", click:"delete()", width:200});
var addButton = isc.Button.create({title:"Add", click:"add()", width:200});
var updateButton = isc.Button.create({title:"Update", click:"update()", width:200});
var cancelButton = isc.Button.create({title:"Cancel", click:"cancel()", width:200});
var list = isc.ListGrid.create({width:500, dataSource:salesRepDS});
</script>
</body>
</html>
</jsp:root>
Please see if there is anything that I need to change or supply to get this to work.