Announcement

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

    Gauge Widget

    Is SmartGWT EE support Gauge Widget? I read that SmartGWT 3.1 supports it but I did not find any class in it, is there s/th missed me?

    #2
    In fact SmartGWT LGPL supports a Gauge widget as of 3.1d. Get the build from smartclient.com/builds, the example is in the LGPL Showcase under "Drawing".

    Comment


      #3
      Thanks for your quick reply.

      I tried a simple example

      [EntryPointClass]
      Code:
      	Gauge gauge = new Gauge();
              gauge.setWidth(400);
              gauge.setHeight(400);
              gauge.setNumMajorTicks(11);
              gauge.setNumMinorTicks(101);
              gauge.setValue(45);
              gauge.addSector(10);
              gauge.addSector(30);
              gauge.addSector(60);
              gauge.addSector(90);
              gauge.setSectorFillColor(0, "#FF0000");
              gauge.setSectorFillColor(1, "#FF6600");
              gauge.setSectorFillColor(2, "#FFFF00");
              gauge.setSectorFillColor(3, "#99CC00");
              gauge.setSectorFillColor(4, "#00FF00");
              gauge.draw();
      app.gwt.xml
      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <module rename-to='charts'>
        <!-- Inherit the core Web Toolkit stuff.                        -->
        <inherits name='com.google.gwt.user.User'/>
      
        <!-- Inherit the default GWT style sheet.  You can change       -->
        <!-- the theme of your GWT application by uncommenting          -->
        <!-- any one of the following lines.                            -->
        <inherits name='com.google.gwt.user.theme.clean.Clean'/>
        <!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
        <!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> -->
        <!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>     -->
      
        <!-- Other module inherits              
                                -->
       <inherits name='com.google.gwt.user.User'/>
          <inherits name="com.google.gwt.core.Core"/>
          <inherits name="com.google.gwt.user.History"/>
      
          <inherits name="com.smartgwt.SmartGwtNoScript"/>
          <inherits name="com.smartgwt.DrawingNoScript"/>
          <inherits name="com.smartgwt.tools.SmartGwtTools"/>
          <inherits name="com.smartclient.theme.enterprise.EnterpriseResources"/>
          <inherits name="com.smartclient.theme.enterpriseblue.EnterpriseBlueResources"/>
          <inherits name="com.smartclient.theme.graphite.GraphiteResources"/>
          <inherits name="com.smartclient.theme.simplicity.SimplicityResources"/>
      
      
        <!-- Specify the app entry point class.                         -->
        <entry-point class='ps.test.client.Charts'/>
      
        <!-- Specify the paths for translatable code                    -->
        <source path='client'/>
        <source path='shared'/>
      
      </module>
      If I run the application I get the following error
      Code:
      [INFO] [charts] - Your *.gwt.xml module configuration prohibits the use of the current doucment rendering mode (document.compatMode=' CSS1Compat').<br>Modify your application's host HTML page doctype, or update your custom 'document.compatMode' configuration property settings.
      [ERROR] [charts] - Core SmartClient JavaScript libraries appear not to be loaded.
      If inheriting the NoScript SmartGWT modules, verify that the HTML file includes <script src=...> tags to load the SmartClient module .js files from the appropriately location within the WAR.
      By default these files are present under [GWT app name]/sc/modules/. 
      [ERROR] [charts] - Unable to load module entry point class com.smartgwt.client.SmartGwtEntryPoint (see associated exception for details)
      [ERROR] [charts] - Failed to load module 'charts' from user agent 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Win64; x64; Trident/5.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; BOIE9;ENUSMSE)' at 127.0.0.1:63760
      May be there is s/th missing me in the gwt.xml

      Comment


        #4
        The error message is telling you exactly what to do - you've inherited DrawingNoScript, so you need a <script src=> tag for ISC_Drawing.js to cause the appropriate JavaScript runtime files to be included.

        Comment


          #5
          I tried what did you told me and I got the following error



          Code:
          09:51:02.671 [ERROR] [charts] Unable to load module entry point class com.smartgwt.client.SmartGwtEntryPoint (see associated exception for details)
          
          com.google.gwt.core.client.JavaScriptException: (TypeError): $wnd.isc.RPCManager is undefined
              at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
              at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
              at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
              at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
              at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
              at com.smartgwt.client.SmartGwtEntryPoint.init(SmartGwtEntryPoint.java)
              at com.smartgwt.client.SmartGwtEntryPoint.onModuleLoad(SmartGwtEntryPoint.java:271)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
              at java.lang.reflect.Method.invoke(Unknown Source)
              at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
              at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
              at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
              at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
              at java.lang.Thread.run(Unknown Source)

          Comment


            #6
            Now you're not successfully loading the ISC_DataBinding.js module.

            If you don't know how to add and troubleshoot <script src=> tags, don't use the *NoScript versions of the <inherits>. The normal <inherits> will automatically include the right files for you.

            Comment


              #7
              Thanks a lot Isomorphic, I removed noScript and it is working fine.

              I want to ask what is the advantage with NoScript also what is the link of SmartGwt LGPL showcases I want to see all the Gauges.

              Also can you describe to me what is the difference between regular SmartGwt and SmartGwt LGPL ?
              Last edited by akhader; 20 Apr 2012, 03:04.

              Comment


                #8
                SmartGwt LGPL is a part of SmartGwt.

                Comment


                  #9
                  Thanks microp for your answer

                  What about the showcases of the LGPL? I want to view other Gauges

                  Comment


                    #10
                    Is it exist or not (LGPL showcases)?

                    Comment

                    Working...
                    X