Hi, great Gurus !
I'm trying to make work in my project the example of SmartGWT's documentation (Part 5. Databinding -> DataSource).
I'm using:
- SmartGWT 2.4
- Firefox 4.01
I think the main problem comes from the the path of DatsSourceLoader.
Which servlet-mapping should I put in web.xml ?
Here is mine:
or should I add a servlet ? Like this ?
Which is the path of the DatasSourceLoader I should put in the header of Tipi_v1.html :
I'm trying this but it doesn't work:
When I try this:
this is the result in "development mode":
Console Logs:
And this "tipi_v1/war/ds/contact.ds.xml" (the exact copy of the example of the doc):
I tried to put the same file in : "tipi_v1/src/com/tipi_v1/shared/ds/contact.ds.xml". It doesn't change anything.
If anyone has got an idea, thanx 1000 times !
I'm trying to make work in my project the example of SmartGWT's documentation (Part 5. Databinding -> DataSource).
I'm using:
- SmartGWT 2.4
- Firefox 4.01
I think the main problem comes from the the path of DatsSourceLoader.
Which servlet-mapping should I put in web.xml ?
Here is mine:
Code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <session-config> <session-timeout>1</session-timeout> </session-config> <!-- Servlets --> <servlet> <servlet-name>tipiServlet</servlet-name> <servlet-class>com.tipi_v1.server.TipiServiceImpl</servlet-class> </servlet> <servlet-mapping> <servlet-name>tipiServlet</servlet-name> <url-pattern>/tipi_v1/tipi</url-pattern> </servlet-mapping> <!-- Default page to serve --> <welcome-file-list> <welcome-file>Tipi_v1.html</welcome-file> </welcome-file-list> </web-app>
Code:
<servlet> <servlet-name>DataSourceLoader</servlet-name> <servlet-class>com.isomorphic.servlet.DataSourceLoader</servlet-class> </servlet>
I'm trying this but it doesn't work:
Code:
<script src="/src/DataSourceLoader?dataSource=contacts"></script>
Code:
DataSource contactsDS = DataSource.get("contacts"); ListGrid grid = new ListGrid(); grid.setDataSource(contactsDS);
this is the result in "development mode":
Code:
18:01:35.830 [ERROR] [tipi_v1] Failed to load module 'tipi_v1' from user agent 'Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1' at 127.0.0.1:63680
Console Logs:
Code:
log4j:WARN No appenders could be found for logger (org.apache.jasper.compiler.JspRuntimeContext). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. [WARN] 404 - GET /src/DataSourceLoader?dataSource=contacts (127.0.0.1) 1406 bytes Request headers Host: 127.0.0.1:8888 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Accept: */* Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Referer: http://127.0.0.1:8888/Tipi_v1.html?gwt.codesvr=127.0.0.1:9997 Cookie: JSESSIONID=slr6zuokurx8 Cache-Control: max-age=0 Response headers Content-Type: text/html; charset=iso-8859-1 Content-Length: 1406 [WARN] 404 - GET /src/DataSourceLoader?dataSource=contacts (127.0.0.1) 1406 bytes Request headers Host: 127.0.0.1:8888 User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Accept: */* Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding: gzip, deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Cookie: JSESSIONID=slr6zuokurx8 Cache-Control: max-age=0 Referer: http://127.0.0.1:8888/Tipi_v1.html?gwt.codesvr=127.0.0.1:9997 Response headers Content-Type: text/html; charset=iso-8859-1 Content-Length: 1406
Code:
com.smartgwt.client.core.JsObject$SGWT_WARN: 17:43:17.619:WARN:Log:TypeError: isc.StatefulCanvas.$cc is undefined Img.initWidget(=>{Obj}, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef, undefined=>undef) Canvas.init(_1=>{Obj}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) Class.completeCreation(_1=>{Obj}, _2=>undef, _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef) [c]Class.create(_1=>{Obj}) unnamed() unnamed(null, undef) [c]Page.handleEvent(_1=>null, _2=>"load") [c]EventHandler.handleLoad(_1=>[object Event]) unnamed() at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105) at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71) at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157) at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281) at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531) at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352) at java.lang.Thread.run(Thread.java:662)
And this "tipi_v1/war/ds/contact.ds.xml" (the exact copy of the example of the doc):
Code:
<DataSource ID="contacts"> <fields> <field primaryKey="true" name="id" hidden="true" type="sequence" /> <field name="salutation" title="Title" type="text" > <valueMap> <value>Ms</value> <value>Mr</value> <value>Mrs</value> </valueMap> </field> <field name="firstname" title="First Name" type="text" /> <field name="lastname" title="Last Name" type="text" /> <field name="birthday" title="Birthday" type="date" /> <field name="employment" title="Status" type="text" > <valueMap> <value>Employed</value> <value>Unemployed</value> </valueMap> </field> <field name="bio" title="Bio" type="text" length="2000" /> <field name="followup" title="Follow up" type="boolean" /> </fields> </DataSource>
If anyone has got an idea, thanx 1000 times !
Comment