Announcement

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

    Bug: DataSource cacheAcrossOperationIds attribute

    Hi,

    I wanted to switch the cacheAcrossOperationIds datasource attribute to false (and use the client-side caching facilities for 1 operation ID only). I've read the documentation and have set up the other attributes to the correct values.

    I wanted to report that if I turn off this attribute by setting it to "false" in the .ds.xml, it does not work.

    I checked the value in the client by calling getCacheAcrossOperationIds() on the datasource and got the following exception:

    Code:
    com.google.gwt.dev.shell.HostedModeException: invoke arguments: JS value of type string, expected boolean
    	at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:100)
    	at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:65)
    	at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    	at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:338)
    	at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:219)
    	at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:571)
    	at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:279)
    	at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    	at com.smartgwt.client.core.BaseClass.getAttributeAsBoolean(BaseClass.java)
    	at com.smartgwt.client.data.DataSource.getCacheAcrossOperationIds(DataSource.java:285)
    On the other side, if "hardcode" this attribute in the client as well by calling:

    Code:
    ds.setAttribute("cacheAcrossOperationIds", false, true);
    Then, getCacheAcrossOperationIds() does work and the whole cache mechanism works as I want.

    Is it possible to fix this so that we can fine tune the caching features in the xml instead of in the code ?

    Many thanks,

    Thomas

    #2
    We'll fix this, but a quick workaround is to be explicit about type in your XML:

    Code:
    <DataSource ...>
         <cacheAcrossOperationIds xsi:type="boolean">false</cacheAcrossOperationIds>

    Comment


      #3
      A fix has been committed, you will find it in the next nightly build.

      Thanks,

      Comment


        #4
        Many thanks!

        Comment

        Working...
        X