Announcement

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

    How ro create simple SmartGwt app?

    Hello :o) !!

    ​I would like to create a simple SmartGwt project. In order to create it I did following steps:
    1. I created a new GWT project with sample code without app engine. This project without smartgwt works properly.
    2. Then I added smartgwt-skins.jar, smartgwt.jar and smartgwtee.jar to project libraries
    ​3. I modified following files:

    3.1. My JAVA-code:
    package st.client; import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.widgets.IButton;

    public class ST implements EntryPoint {

    IButton button=null;

    public void onModuleLoad()
    {
    button=new IButton("Hello");
    button.draw();
    }
    }

    3.2. My XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.7.0//EN"
    "http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
    <module rename-to='st'>
    <inherits name='com.google.gwt.user.User'/>
    <inherits name="com.smartgwt.tools.SmartGwtTools"/>
    <inherits name="com.smartgwtee.tools.Tools"/>
    <inherits name="com.smartgwtee.SmartGwtEE"/>

    <entry-point class='st.client.ST'/>
    </module>

    3.3. My HTML:
    <!doctype html>
    <html>
    <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <title>Web Application Starter Project</title>
    <script> var isomorphicDir = "st/sc/"; </script>
    <script type="text/javascript" language="javascript" src="st/st.nocache.js"></script>
    <script type="text/javascript" language="javascript" src="st/loadScriptTagFiles.js"></script>
    </head>
    <body>
    Hello!!
    <iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1' style="position:absolute;width:0;height:0;border:0"></iframe>
    </body>
    </html>

    ​4. My Result (in SuperDev mode):
    Blank page. Empty. Nothing. No button. (Except of "Hello!!" of course, which is hard-coded in my HTML-file)


    ​I spent two days to get it work but without any success. Can somebody help before I switch to another framework?

    ​BTW It would be very nice if IsomorphicSoftware would provide us with a simplest "HelloWorld"-project for Eclipse NEON, which is simply working - I would appreciate... :-)


    Cheers from Munich / Germany
    Last edited by caitanya; 6 Dec 2016, 18:40.

    #2
    Hallo caitanya,

    generally speaking I'd always start with the BuiltInDS project from the EE Eval download. It includes a ready-to-run Eclipse project file.

    Besides of this:
    • Do you see JS errors when calling the page?
    • Do you see HTTP 404s to the SmartGWT framework JS files?
    • Do you see HTTP calls to the SmartGWT framework JS files at all?
    I do think that you need to load the framework JS files before your application.
    Does it work for you when you change the order of st.nocache.js and loadScriptTagFiles.js? I load them manually, so I don't know exactly what loadScriptTagFiles.js does.

    Also: I work in Munich (Schwabing) as well and am always looking to meet other SmartGWT devs in the Munich area.

    Best regards
    Blama

    Comment


      #3
      Hello Caitanya,
      Blama is right that the "Built In DS" is a good sample to start with.
      Also we'd very much recommend taking a good read through the Quick Start Guide - http://www.smartclient.com/smartgwt-...tart_Guide.pdf.
      There are also a number of useful overview topics in JavaDoc available under the special "docs" package - one that may particularly help is the special setup and deployment overview here: http://www.smartclient.com/smartgwte...wtEESetup.html

      If you have specific problems, these forums are have an active community of developers and are a great resource for finding information.

      Regards
      Isomorphic Software
      Last edited by Isomorphic; 8 Dec 2016, 10:33.

      Comment

      Working...
      X