Ooops..can't believe I didn't see it. I'll try soon.
Thanks,
Blama
Announcement
Collapse
No announcement yet.
X
-
Please read the intro docs for SmartGWT.mobile. They explain what RestHandler is.
Leave a comment:
-
Hi,
I investigated further and found
in my web.xml as well as http://www.smartclient.com/smartgwte...e-summary.html, where I can see "what actually happens in /[PROJECT]/sc/".Code:<!-- RPCManager uses this URL by default for Built-in DataSource operations --> <servlet-mapping> <servlet-name>IDACall</servlet-name> <url-pattern>/demo4c/sc/IDACall/*</url-pattern> </servlet-mapping>
Nevertheless, when I set "DataSource.setDefaultDataURL("/demo4c/sc/IDACall/");", I get the error in the console for tableView.fetchData():
Do you have an advice on this?Code:=== 2012-04-21 10:57:55,913 [l0-0] INFO RequestContext - URL: '/demo4c/sc/IDACall', User-Agent: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19': Safari with Accept-Encoding header === 2012-04-21 10:57:55,924 [l0-0] ERROR IDACall - Top-level servlet error: java.lang.Exception: Non-RPC request ignored. at com.isomorphic.rpc.RPCManager.parseRequest(RPCManager.java:1787) at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:296) at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:281) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:116) at com.isomorphic.servlet.IDACall.doGet(IDACall.java:81) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097) at com.isomorphic.servlet.CompressionFilter.doFilter(CompressionFilter.java:259) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:829) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) === 2012-04-21 10:57:55,926 [l0-0] INFO Compression - /demo4c/sc/IDACall: 2216 -> 607 bytes
Thanks,
BlamaLast edited by Blama; 21 Apr 2012, 02:10.
Leave a comment:
-
Hi Isomorphic,
thanks for the answer. I got the DS from ds.xml.
Now two problems popping up:
1) Mobile doesn't seem to like this Operation-binding definition in .ds.xml, which might be a bug:
2) If I remove it, I works, but then I get the next problem at fetchData() here:Code:<operationBindings> <operationBinding operationType="fetch"> <tableClause>T_STUNDEN INNER JOIN T_MODUL ON T_STUNDEN.MODUL_ID = T_MODUL.ID INNER JOIN T_PROJEKT ON T_MODUL.PROJEKT_ID = T_PROJEKT.ID </tableClause> </operationBinding> </operationBindings>
It goes toCode:DataSource.load("T_STUNDEN", new LoadDSCallback() { public void execute(DataSource[] dsList) { // start creating and binding widgets tableView.setDataSource(dsList[0]); tableView.fetchData(); } });
which gives a 404. With DataSource.setDefaultDataURL I can change the URL, but I don't know to what?Code:/isomorphic/RESTHandler?_operationType=fetch&_operationId=&_startRow=0&_endRow=1&_sortBy=&_textMatchStyle=&_oldValues=&_componentId=
In the directory that handles my DS calls
there is no "RESTHandler" file/directory. As there is also no "DataSourceLoader" file/directory, I assume that Jetty has some URL Redirection in work here, but I can't find out where the requests go in the end. Could you provide a list of what actually happens in "/[PROJECT]/sc/"?Code:DataSource.setLoaderUrl("/demo4c/sc/DataSourceLoader");
DataSource.setDefaultDataURL("/demo4c/sc/RESTHandler") did not solve the problem.
Best regards,
Blama
Leave a comment:
-
isomorphicDir doesn't apply for SmartGWT.mobile. Use DataSource.setLoaderUrl() to change the URL used for the DataSourceLoader.
Leave a comment:
-
SmartGWT.mobile: Requesting DSLoader from wrong directory?
Hi Isomorphic,
I just tried SmartGWT.mobile beta out of curiosity and integrated it in my current EE testcase.
Setup works so far, thanks to the detailed instructions. One pitfall I had was that I forgot to "<entry-point class='com.smartgwt.sample.mobile.client.HelloWorld' />". This is done in the samples, I just forgot it.
But I have a question regarding Datasources: My Desktop-testcase as this line in .html:
<script>var isomorphicDir = "demo4c/sc/";</script>
Whether I add it to mobile.html or not does not matter - the browser always requests "/isomorphic/DataSourceLoader?dataSource=..."
How do I tell the mobile client to use the SC-server in the desktop client directory and not "/isomorphic"?
Thanks,
BlamaTags: None
Leave a comment: