Announcement

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

    VisualBuilder: problems with skin

    Hello,

    I am trying to introduce VisualBuilder to a project so that the designers can produce screens which I can implement efficiently.
    I can run VB from the app (in GWT dev mode), but I see skin errors.

    I guess I am doing something wrong, but what?
    I have checked the FAQ and the QuickStart guide, but could not spot anything obvious.

    Here is what I have. I am using the EE-eval version for now. (Latest nightly from 2011-10-24)

    Approach 1.

    I inherit from these GWT modules:

    Code:
      <inherits name='com.google.gwt.user.User'/>
      <inherits name="com.smartgwtee.SmartGwtEENoTheme"/>	
      <inherits name="com.smartclient.theme.silverwave.SilverWave"/>
      <inherits name="com.smartgwtee.tools.Tools"/>
      <inherits name="com.smartgwt.RealtimeMessaging"/>
    I bring up VB like this:

    Code:
      SCEE.openVisualBuilder();
    It boots up, it finds and loads my datasources from the XML definitions, but there are several broken images over the page, and I see this on the server log:
    Code:
     404 - GET /atd2/sc/skins/Enterprise/load_skin.js?isc_version=SC_SNAPSHOT-2011-10-24.js
    And indeed, at the specified path, only the SilverWave and the ToolSkin skins are available.
    I guess I could inherit the GWT module for the Enterprise theme, but that would mess with the SilverWave skin, right?

    Does this mean that I am not supposed to run VB from inside an application that is not using the Enterprise skin?

    Approach 2.

    I created a separate GWT module (and entry point, and html host page) to be used exclusively with VB.
    This module inherits the SmartGwtEE module (instead of the SmartGwtEENoTheme), so the skin is available.
    However, when I try to launch VB from this new module, it tries to load stuff from the path of the old one,
    so it gets 404 again.

    The host page looks like this;

    Code:
    <!doctype html>
    
    <html>
      <head>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <link type="text/css" rel="stylesheet" href="ATD_Demo_2.css">
        <title>Visual Screen Builder for ATD project</title>
        <script>var isomorphicDir = "vb/sc/" </script>
        <script type="text/javascript" language="javascript" src="vb/vb.nocache.js"></script>
      </head>
      <body>
        <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
        <noscript>
          <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
            Your web browser must have JavaScript enabled
            in order for this application to display correctly.
          </div>
        </noscript>
      </body>
    </html>
    The module definition looks like this:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <module rename-to='vb'>
      <inherits name='com.google.gwt.user.User'/>
      <inherits name="com.smartgwtee.SmartGwtEE"/>	
      <inherits name="com.smartgwtee.tools.Tools"/>
      <entry-point class='whatever.VBLauncher'/>
    
      <source path='client'/>
      <source path='shared'/>
    
    </module>
    The entry point looks like this:

    Code:
    public class VBLauncher implements EntryPoint{
    
      @Override public void onModuleLoad() {
        new IButton("Visual builder", new ClickHandler() { @Override public void onClick(ClickEvent event) {
          SCEE.openVisualBuilder();
        }}).draw(); 
      }
    
    }
    ... and when pressing the button, I get this on the server log:

    Code:
    === 2011-10-24 13:21:26,972 [l0-5] INFO  RequestContext - URL: '/vb/tools/visualBuilder/index.jsp', User-Agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Iceweasel/7.0.1': Moz (Gecko) with Accept-Encoding header
    === 2011-10-24 13:21:26,973 [l0-5] WARN  LoadISCTag - isc.moduleLoadOrder does not include user-selected modules: [DBConsole] - placing these modules last in the load order.
    === 2011-10-24 13:21:27,121 [l0-5] INFO  Compression - /vb/tools/visualBuilder/index.jsp: 275769 -> 28707 bytes
    === 2011-10-24 13:21:27,208 [l0-5] INFO  RequestContext - URL: '/atd2/sc/system/development/ISC_Drawing.js', User-Agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Iceweasel/7.0.1': Moz (Gecko) with Accept-Encoding header
    === 2011-10-24 13:21:27,208 [l0-3] INFO  RequestContext - URL: '/atd2/sc/system/development/ISC_Analytics.js', User-Agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Iceweasel/7.0.1': Moz (Gecko) with Accept-Encoding header
    === 2011-10-24 13:21:27,209 [l0-5] INFO  Download - File /mnt/user_data/home/csillag/EclipseWorkspace.solo.indigo/ATD_Demo_2/war/atd2/sc/system/development/ISC_Drawing.js not found, sending 404
    === 2011-10-24 13:21:27,209 [l0-3] INFO  Download - File /mnt/user_data/home/csillag/EclipseWorkspace.solo.indigo/ATD_Demo_2/war/atd2/sc/system/development/ISC_Analytics.js not found, sending 404
    [WARN] 404 - GET /atd2/sc/system/development/ISC_Drawing.js?isc_version=SC_SNAPSHOT-2011-10-24.js (127.0.0.1) 1427 bytes
       Request headers
    [WARN] 404 - GET /atd2/sc/system/development/ISC_Analytics.js?isc_version=SC_SNAPSHOT-2011-10-24.js (127.0.0.1) 1429 bytes
       Request headers
          Host: 127.0.0.1:8888
          Host: 127.0.0.1:8888
          User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Iceweasel/7.0.1
          Accept: */*
          Accept-Language: hu-hu,hu;q=0.8,en-us;q=0.5,en;q=0.3
    === 2011-10-24 13:21:27,210 [0-10] INFO  RequestContext - URL: '/atd2/sc/skins/Enterprise/load_skin.js', User-Agent: 'Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Iceweasel/7.0.1': Moz (Gecko) with Accept-Encoding header
          Accept-Encoding: gzip, deflate
          Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
          Connection: keep-alive
          Referer: http://127.0.0.1:8888/vb/tools/visualBuilder/index.jsp
          Cookie: hblid=QEU2951YB6JQBG3YLMA50STY42513211; GLog=%7B%0D%20%20%20%20left%3A1542%2C%20%0D%20%20%20%20top%3A114%2C%20%0D%20%20%20%20width%3A1165%2C%20%0D%20%20%20%20height%3A655%2C%20%0D%20%20%20%20priorityDefaults%3A%7B%0D%20%20%20%20%20%20%20%20Log%3A4%0D%20%20%20%20%7D%2C%20%0D%20%20%20%20defaultPriority%3A3%2C%20%0D%20%20%20%20trackRPC%3Atrue%0D%7D; isc_cState=ready; JSESSIONID=1sybkz3s93h8r
       Response headers
          X-Included-Test2: true
          X-Included-Test: true
          Content-Type: text/html; charset=iso-8859-1
          Content-Length: 1427
          User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Iceweasel/7.0.1
          Accept: */*
          Accept-Language: hu-hu,hu;q=0.8,en-us;q=0.5,en;q=0.3
          Accept-Encoding: gzip, deflate
          Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7
          Connection: keep-alive
          Referer: http://127.0.0.1:8888/vb/tools/visualBuilder/index.jsp
    As you can see, VB is loaded from the "/vb/tools" directory, but then it tries to load stuff (for example, skin) from the "/atd2/sc/" directory, which is the path for an other module, not the current one.

    What could be the reason for this?

    Thank you for explaining:

    Csillag

    #2
    As a temporary solution, I can just symlink the skin directory where VB expects to find it, but this is obviously not a permanent solution, since a module directories are auto generated, and thus often overwritten.

    Comment


      #3
      Including com.smartclient.theme.enterprise.EnterpriseResources should take care of this.
      That ensures the Enterprise media / css are present in the filesystem, but won't actually apply them to your application so won't mess with the skin you're actually using.

      Comment


        #4
        I see.

        This works with all other skins, too, right?

        Comment


          #5
          Thank you, including this module (and the other similar ones) solves my problem perfectly.

          Comment

          Working...
          X