Announcement

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

    loading Reify screen

    Hello,

    I downloaded a Reify exported project and put it into my SmartGWT /war directory. However, when I use the following code (adapted from the Reify for Developers), I get this error message. Do you know what I need to do?

    BrcmPopupWindow myWindow = new BrcmPopupWindow();
    myWindow.addMember(RPCManager.createScreen("Main Screen"));
    myWindow.draw();

    11:04:04.201:MUP4:WARN:RPCManager:Asked to create screen 'Main Screen', but it's not cached - did you call cacheScreen() first?



    I then called cacheScreen in the onModuleLoad and am seeing this exception:

    11:08:13.878:XRP4:WARN:RPCManager:Transport error - HTTP code: 404 for URL: http://lvn-beer-stb-01:14554/tkr/sc/screenLoader - response: {operationId: "custom",
    clientContext: undef,
    internalClientContext: undef,
    context: Obj,
    transactionNum: 6,
    httpResponseCode: 404,
    httpResponseText: "<html>\n<head>\n<meta http-equiv="Content-..."[303],
    xmlHttpRequest: [object XMLHttpRequest],
    transport: "xmlHttpRequest",
    status: -90,
    clientOnly: undef,
    httpHeaders: Obj,
    isStructured: true,
    callbackArgs: null,
    results: Obj,
    data: "Transport error - HTTP code: 404 for URL..."[90],
    clientTiming: Obj{name:Client processing},
    clientTimingStack: Array[2]}


    Do you know how to set up the screenLoader? I don't see documentation for it in the Reify for Developers. I see something about putting ScreenLoaderServlet into your web.xml but we have an older web.xml version.
    Last edited by user316; 6 Aug 2020, 07:12.

    #2
    This post was unrelated to thread where you originally posted it, so we moved it to a new thread.

    Screen loading is a standard part of SmartGWT technology, not something specific to Reify, so what the Reify for Developers overview does is just link you to the standard docs for screen loading, specifically, RPCManager.createScreen() (among others).

    The documentation for createScreen() tells you it will create a screen previously loaded by cacheScreens(). cacheScreens() explains that it is a variant of loadScreen() and links to that instead of redundantly explaining the behavior inline. loadScreen() has a detailed description of how screen loading works. In multiple places above there are also links to the ScreenLoaderServlet.

    This has all been carefully designed to be as bulletproof as possible, but of course we are relying on you to follow links, as it would be silly to have every document re-describe entire system. Nevertheless, if you have any suggestions for improvements in this area, please let us know.

    As far as the ScreenLoaderServlet, it is installed by default in all our sample projects and Maven archetypes, so someone on your end must have removed it. You just need to re-add it to your web.xml, it's a standard servlet definition and servlet mapping, it looks like:

    Code:
    <servlet>
       <servlet-name>screenLoader</servlet-name>
       <servlet-class>com.isomorphic.servlet.ScreenLoaderServlet</servlet-class>
    </servlet>
    
    ...
    
    <servlet-mapping>
       <servlet-name>screenLoader</servlet-name>
       <url-pattern>/[I]projectName[/I]/sc/screenLoader</url-pattern>
    </servlet-mapping>

    Comment

    Working...
    X