Announcement

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

    How to create a new SmartGWT project

    I do that :
    - Launch the projectCreator command line
    - Launch the applicationCreator command line
    - Add my project to Eclipse
    - Add the external JAR smartJWT to the classpath and to the Appli-Shell.cmd
    - Launch the Appli-shell.cmd

    I have this problem :

    Code:
    [ERROR] Line 8: No source code is available for type com.smartgwt.client.widgets.layout.VLayout; did you forget to inherit a required module?
    I have that code :

    In the entrypoint :
    Code:
    package org.gwtbook.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.user.client.ui.RootPanel;
    
    public class Sopra implements EntryPoint {
    
    	public void onModuleLoad() {
    		
    		tableauComposant tableau = new tableauComposant();
    		RootPanel.get().add(tableau);
    		
    	}
    	
    }
    In the class tableauComposant :

    Code:
    package org.gwtbook.client;
    
    import com.google.gwt.user.client.ui.Composite;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class tableauComposant extends Composite {
    
    	private VLayout layout = new VLayout(15);
    	
    	public tableauComposant(){
    		
    		layout.draw();
    		
    	}
    	
    }
    What is the problem ? Maybe it is not the correct way to create a SmartGWT application ? Or is it another problem ?

    Thank you by advance for your explanations.

    #2
    As the error message states, you probably did not inherit the SmartGwt module. You do this by adding the line

    Code:
    <inherits name="com.smartgwt.SmartGwt"/>
    in your module xml file. If you're still having trouble please go though the HelloWorld sample that is included in the SmartGWT distribution.

    Comment


      #3
      Since you seem to be using Eclipse I would recommend checking out Cypal Studio.

      Comment


        #4
        Thank you sjivan, shame on me, it was easy.

        I have now the message :
        [ERROR] Unable to load module entry point class org.gwtbook.client.Sopra (see associated exception for details)
        java.lang.AssertionError: This UIObject's element is not set; you may be missing a call to either Composite.initWidget() or UIObject.setElement()

        but I have not already think about that.

        Thank you nlotz but it was professional and I can't add what I want.

        Comment


          #5
          How can I use another jar (not Google Jars) in my projects ?

          When I try to launch the application GWT say me that an inherit module is missing.

          I tried to change the gwt.xml file and add my module but that module doesn't have any *.gwt.xml file and I can't change the Jar file.

          How can I do that?

          Thank you very much.

          Comment


            #6
            You cannot use any arbitrary jar in your GWT project, only those that are meant to be used by GWT. I'd suggest you go though the GWT docs to better understand how GWT works.

            Sanjiv

            Comment


              #7
              My Jar contains all classes and method for DAO and business parts.

              I just use SmartGWT for IHM.

              In my case I must get a list of personnes with a service in my JAR file (Business part) with GWT RPC and Convert that list of personnes in the correct form for my datasource (it looks like that thread http://forums.smartclient.com/showthread.php?t=3538 but "TestData" and "Personne" are in my Jar file).

              What is exactly that problem with inherits ? (I repeat that I can't change the jar file)

              @sjivan : And if my Business and DAO parts are in an external fil, how can I do?

              Comment


                #8
                It is cool I finally succeed !

                Just a last question because these are very problematic.

                I tried to use my application with Maven and GWT-Maven.
                Unfortunately when I try to launch my application there is an error during the compilation :

                Code:
                [INFO] establishing classpath list (buildClaspathList - scope = RUNTIME)
                [INFO] google.webtoolkit.home (gwtHome) *not* set, using project POM for GWT dependencies
                La ligne entr‚e est trop longue. (Line is too long)
                [ERROR]
                I know that the problem is with the script file (batch file) which is generated. The classpath is too long and my Windows 2000 has a limitation for length of scripts file (on Windows XP, it works fine)

                Is there a solution to raise the value of the maximum line length ?

                Thank you by advance for your precious help since the beginning.

                Comment


                  #9
                  No problem for now I used a launcher and all works fine.

                  Comment


                    #10
                    Problem i'm facing on inclusion of the SmartGwt

                    On addition of the <inherits name="com.smartgwt.SmartGwt"> on my web xml solved my problem..
                    but now i kinda having a new error " Some module entry point problem .."


                    Please help , Thanks baidya

                    Comment

                    Working...
                    X