Announcement

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

    Datasourse.load(id, Function not working)

    Hi All

    Datasourse.load() function not working. I have done the bellow steps ..
    1) Created a server.properties file under src folde.
    2) I have mentioned project.datasources path in server.proeprties file. project.datasources: $webRoot/ds, $webRoot/shared/ds
    3) Created a ds folder within war folder.
    4) Created test.ds.xml file inside ds folder.

    <DataSource ID="test" serverType="generic">
    <fields>
    <field name="label2" type="staticText" />
    </fields>
    <serverObject lookupStyle="spring" bean="testBean"/>

    <operationBindings>
    <binding operationType="fetch" serverMethod="fetch">
    <serverObject lookupStyle="spring" bean="testBean" />
    </binding>
    </operationBindings>
    </DataSource>

    5) Created a applicationContext.xml file inside WEB-INF folder and define bean.
    6) Inside onModuleLoad() methode in jada file I have write

    try {
    DataSource.load("test", new Function() {

    @Override
    public void execute() {
    TextItem login = new TextItem("Login");
    PasswordItem passwordItem = new PasswordItem("Password");
    VLayout layout = new VLayout();
    DynamicForm dynamicForm = new DynamicForm();
    dynamicForm.setItems(login,passwordItem);
    layout.addMember(dynamicForm);
    RootPanel.get().add(layout);

    }
    });
    } catch (Exception e) {
    GWT.log("Error", e);
    e.printStackTrace();
    }
    8. GWT,xml file...

    <inherits name="com.smartgwt.SmartGwt"/>



    Above process not working.
    Even no exception found in console. Actually I cannot see any log in console.

    1) Am I miss something to load DS. ?
    2) How I enable log ?



    GWt 2.8.0 SmartGWT 6.1p LGPL


    #2
    Please see the FAQ for how to troubleshoot issues with DataSource loading.

    Comment


      #3
      Oh, also, DataSource loading from .ds.xml files is a feature that comes with Pro/EE, but you've inherited the client-side GWT module for the LGPL edition. Revisit the installation instructions to correct this.

      Comment


        #4
        Thanks Isomorphic for reply.

        My question is how I use data source to populate data from back end in LGPL version ?
        Is it possible in LGPL ?

        Comment


          #5
          By declaring DataSources in .ds.xml files you are using features of Pro and above.

          To learn about the different mechanism that are using in the LGPL Edition, please read the QuickStart Guide, specifically the Data Integration chapter although it looks like you skipped most of it, so you should start from the top.

          Comment


            #6
            Actually previously I have worked on #power edition. Everything works fine there but now I have no power edition. So I have to check the guide.

            Can you please help me to find log message ? Even nullpointerException I am not able to see in the console. When I bookmark isc:showConsole(), then its giving me error that HTTP STATUS 404.
            Please note I am running from localhost on jetty server. Actually this nullPointerException is very much needed for me.

            Can you please help me to set up client side log for my application (from localhost.)

            Comment


              #7
              If the Developer Console is not present, you are missing an inherit of "com.smartgwt.tools.SmartGwtTools. See the Debugging topic for how to best get debug information when errors occur.

              Comment


                #8
                Hi Isomorphic,

                As per your suggestion I have added <inherits name="com.smartgwt.tools.SmartGwtTools" /> in my .gwt.xml file and run it after compilation. But I did not get any log/exception.
                I know that there is a null pointer exception in the codebase but I did not get it.

                How I view this nullpointer exception ? How I enabled.

                complete .gw.xml file is "


                <?xml version="1.0" encoding="UTF-8"?>
                <!--
                When updating your version of GWT, you should also update this DTD reference,
                so that your app can take advantage of the latest GWT module capabilities.
                -->
                <!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.8.1//EN"
                "http://gwtproject.org/doctype/2.8.1/gwt-module.dtd">
                <module rename-to='testdemo'>
                <!-- Inherit the core Web Toolkit stuff. -->
                <inherits name='com.google.gwt.user.User'/>
                <inherits name="com.smartgwt.tools.SmartGwtTools" />
                <inherits name="com.smartgwt.SmartGwt"/>
                <inherits name="com.google.gwt.logging.Logging"/>
                <!-- 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 -->

                <!-- Specify the app entry point class. -->
                <entry-point class='com.test.client.TestDemo'/>
                <set-property name='gwt.logging.enabled' value='TRUE'/>
                <set-property name='gwt.logging.consoleHandler' value='ENABLED'/>
                <!-- Specify the paths for translatable code -->
                <source path='client'/>
                <source path='shared'/>

                <!-- allow Super Dev Mode -->
                <add-linker name="xsiframe"/>
                </module>


                Please help...

                Comment


                  #9
                  Looks like you still haven't read the Debugging topic.

                  Comment

                  Working...
                  X