Announcement

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

    Upgrade smarclient version from 10.0 to 13.0 - problems with dojo framework

    Hi.
    I am trying to upgrade an application to smartclient 13, for now I have been downloading the "eval" version.
    Whoever designed the application used "dojo framework" and set up import of "spring-js-resources".

    After starting the server the following error appears:

    dojo.js:15 Error: multipleDefine
    at _f (dojo.js:15:436)
    at _fa (dojo.js:15:16552)
    at dojo.js:15:17143
    at _9 (dojo.js:15:328)
    at _7f (dojo.js:15:17112)
    at _f5 (dojo.js:15:15639)
    at req.getText (dojo.js:15:3400)
    at _33 (dojo.js:15:16199)
    at _2c4 (dojo.js:15:60287)
    at dojo.require (dojo.js:15:60586)
    at login;jsessionid=...

    And after that also this error:

    dojo.js:15 TypeError: this.widget.startup is not a function
    at Object.apply (Spring-Dojo.js:16:1894)
    at Spring.applyDecorations (Spring.js:16:843)
    at Spring.initialize (Spring.js:16:120)
    at _621 (dojo.js:15:159326)
    at Function._61d [as _onQEmpty] (dojo.js:15:158951)
    at _44a (dojo.js:15:110259)
    at HTMLDocument._44c (dojo.js:15:110449)


    Is there any smartclient 13 component that can originate the errors?
    Is it the "spring-js-resources" library causing problems?

    Thank you.

    #2
    We've not seen this error before.

    In general, if there is some kind of seeming incompatibility between SmartClient and another library, the best thing is to load SmartClient last. This is because SmartClient is very "polite" and tries to preserve any kind of global overrides or event handlers that may have been installed by other frameworks.

    If that doesn't resolve the problem, the next steps would be:

    1. to run without obfuscated code so that we can see better diagnostics


    2. see whether / how SmartClient reports the error in the SmartClient Developer Console.

    Generally we will provide more information than the above, assuming another framework didn't trap the error such that SmartClient doesn't see it.

    Out of typical browsers, we are able to provide the most information in Chrome.


    3. provide a runnable test case that reproduces the issue, so we can see it happening

    --

    Finally, note that Dojo just.. well it doesn't really do that much. You might find that you can quickly build a replacement, superior UI if you just attach a new SmartClient-based UI to your existing REST services. This could easily be faster, and provide a better result, than finding out why Dojo can't work with SmartClient.

    A quick way to see just how quick things can be is to look at Reify (Reify.com). Build your UI using some sample data, then you can connect to the real REST services later.

    Comment


      #3
      If it helps, the problem has been solved.
      The resolution is to load smartclient first and then load the dojo files.
      The loading of these js libraries, into the application, is done through the use of jspx and tagx pages.

      Comment


        #4
        Thanks for letting us know.

        That is really strange. Just to emphasize, every time we've seen an incompatibility with another library, it's always been better to load the other library first, then SmartClient.

        Just in case, is it possible you wrote the reverse of what you mean to say?

        Regardless, thanks for letting us know - this may help someone else.

        Comment


          #5
          Hi Isomorphic

          Question: "Just in case, is it possible you wrote the reverse of what you mean to say?"
          Response: No, first load smarclient lib, after load dojo lib(and other).

          Jspx:
          Click image for larger version

Name:	order_load_js.jpg
Views:	66
Size:	70.4 KB
ID:	270138

          Tagx files:
          load-smart
          Click image for larger version

Name:	load_smart_tagx.png
Views:	63
Size:	58.2 KB
ID:	270139
          load-script:
          Click image for larger version

Name:	load_script_tagx.jpg
Views:	58
Size:	108.4 KB
ID:	270140

          Thanks.

          Comment

          Working...
          X