Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
8 replies Latest Post - ‏2013-01-22T21:45:05Z by giovanni.vigorelli@it.ibm.com
giovanni.vigorelli@it.ibm.com
8 Posts
ACCEPTED ANSWER

Pinned topic Preview in Design view in Studio doesn't show anything

‏2013-01-22T06:42:06Z |
Hi There,

it already happened to me other times, this time I decided to share this issue.
Sometimes happens that the HTML code is not shown in the Design view of the HTML editor, while the same code works fine if previewed in a browser (build all and preview Common).

This is the code I've written for which I have the issue just described:


This is a WL project using Dojo, authored in Studio 5.0.5.1.
Thanks, Giovanni
  • giovanni.vigorelli@it.ibm.com
    8 Posts
    ACCEPTED ANSWER

    Re: Preview in Design view in Studio doesn't show anything

    ‏2013-01-22T06:44:35Z  in response to giovanni.vigorelli@it.ibm.com
    > giovanni.vigorelli@it.ibm.com wrote:
    > Hi There,
    >
    > it already happened to me other times, this time I decided to share this issue.
    > Sometimes happens that the HTML code is not shown in the Design view of the HTML editor, while the same code works fine if previewed in a browser (build all and preview Common).
    >
    > This is the code I've written for which I have the issue just described:
    >
    >
    data-dojo-props="orientation:'H'">
    >
    >
    data-dojo-props="selected:true,scrollDir:'v'">
    >

    data-dojo-props="label:'San Diego',fixed:'top'">

    >
    >
    data-dojo-props="label:'Map',moveTo:'map',transition:'slide'">
    >
    >
    data-dojo-props="label:'Attraction',moveTo:'attractions',transition:'slide'">
    >
    >
    >
    >
    >
    >
    >
    >
    > This is a WL project using Dojo, authored in Studio 5.0.5.1.
    >
    >
    > Thanks, Giovanni
  • SystemAdmin
    SystemAdmin
    2327 Posts
    ACCEPTED ANSWER

    Re: Preview in Design view in Studio doesn't show anything

    ‏2013-01-22T06:45:39Z  in response to giovanni.vigorelli@it.ibm.com
    Hi,

    Can you share your HTML code?

    thanks
    Abdul Ahad
  • giovanni.vigorelli@it.ibm.com
    8 Posts
    ACCEPTED ANSWER

    Re: Preview in Design view in Studio doesn't show anything

    ‏2013-01-22T06:47:06Z  in response to giovanni.vigorelli@it.ibm.com
    Refer to the attached file for the HTML code
    • SystemAdmin
      SystemAdmin
      2327 Posts
      ACCEPTED ANSWER

      Re: Preview in Design view in Studio doesn't show anything

      ‏2013-01-22T07:25:39Z  in response to giovanni.vigorelli@it.ibm.com
      Is this works fine in Preview External browser?
      Or Preview in internal browser?

      If preview is in external then set your Preference-> browser -> (to the external browser)

      and try again.
      • SystemAdmin
        SystemAdmin
        2327 Posts
        ACCEPTED ANSWER

        Re: Preview in Design view in Studio doesn't show anything

        ‏2013-01-22T07:41:16Z  in response to SystemAdmin
        Where you are loading dojo components classes?

        for example
        require(["dojo/_base/lang","dojo/_base/array","dojo/dom","dojo/dom-class"
        ],function() {}
        });
        • giovanni.vigorelli@it.ibm.com
          8 Posts
          ACCEPTED ANSWER

          Re: Preview in Design view in Studio doesn't show anything

          ‏2013-01-22T09:56:11Z  in response to SystemAdmin
          Hi Abdul,

          thanks for your support.
          I'm using the dojo default widgets, so I'm not expecting to need any dojo customisation (require).
          Anyway in the myApp.js there are following (default) requires:

          function wlCommonInit(){
          require([ "dojo/core-web-layer", "dojo/mobile-ui-layer",
          "dojo/mobile-compat-layer" ], dojoInit);

          function dojoInit() {
          require(,
          function(dojo) {
          dojo.ready(function() {
          });
          });
          }
          The preview works in the external browser (after build and deploy the app in the Worklight server, jetty.
          • SystemAdmin
            SystemAdmin
            2327 Posts
            ACCEPTED ANSWER

            Re: Preview in Design view in Studio doesn't show anything

            ‏2013-01-22T16:33:39Z  in response to giovanni.vigorelli@it.ibm.com
            The problem here is CSS. (usually a safe bet ;-) )

            the layout is working fine, except in the Design view, everything has a height of 0. You need the following in your main css file to tell it to not do that:

            html, body {

            height: 100%;
            min-height: 100%;
            }

            As you continue to work on this, you may find that you will need yo also specify the height/min-height of FixedSplitter and Container to keep it working everywhere. This is an area where iOS, android, the Design view, and various browsers all tend to go their own way unless you are very specific in the CSS, so you will need to test everywhere.
            • giovanni.vigorelli@it.ibm.com
              8 Posts
              ACCEPTED ANSWER

              Re: Preview in Design view in Studio doesn't show anything

              ‏2013-01-22T21:45:05Z  in response to SystemAdmin
              Hey Man... rewarding bet!
              It works nicely in Design now.

              Thanks