Announcement

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

    Custom Datasource

    Hi all,

    Could you help me to understand what I am making wrong? My Firm would be interested in your Server Side Professional version but we would like to clarify some points before to buy it...

    I would like to extend a Server Side Datasource following the instructions in http://www.smartclient.com/smartgwt/...alBuilder.html / [Adding Custom DataSources to Visual Builder ] and http://www.smartclient.com/smartgwt/...ponentXML.html / [Custom Components] but then I fail to register my class for reflection:

    Compiling module com.smartgwt.sample.CustomDS
    Computing all possible rebind results for 'com.smartgwt.sample.client.MyMetaFactory'
    Rebinding com.smartgwt.sample.client.MyMetaFactory
    Invoking generator com.smartgwt.rebind.MetaBeanFactoryGenerator
    [ERROR] com.smartgwt.sample.client.MyMetaFactory::getMyDataSourceFactory: for now, factories can only be created for Canvas or DataClass and subclasses.
    [ERROR] Errors in 'com/smartgwt/sample/client/CustomDS.java'

    I wrote a Subclass of com.smartgwt.client.data.DataSource and an Interface
    Code:
    public interface MyMetaFactory extends BeanFactory.MetaFactory {
        BeanFactory<MyDataSource> getMyDataSourceFactory();    
    }
    which I register in the EntryPoint

    Another requirement would be the possibility to configure new properties of a custom Datasource in the Datasource Editor in the Visual Builder...

    Thank you very much for your help
    Best regards
    Fabio
    Last edited by javabean; 2 Jun 2014, 01:48.

    #2
    Another point. When I try to deploy the demo application CustomDS in Weblogic 12c I get the exception:

    [HTTP:101371]There was a failure when processing annotations for application C:\Program Files\SmartGWTPro\smartgwtee-4.1p\samples\custom-ds\war. Ensure that the annotations are valid. The error is org.springframework.web.servlet.DispatcherServlet

    It seems there's something that wls doesn't like in web.xml or in this class in particular...in Tomcat 6 I got no problems...

    Thank you again!
    Bye
    Fabio

    Comment


      #3
      You're almost certainly evaluating the wrong things here (in multiple ways!), we'll try to set you straight..

      On Visual Builder, be sure you have read the FAQ about it, specifically, that it's not an IDE.

      If you are trying to build a tool for your end users to build screens (and not for use by Java developers), you want the Dashboards & Tools framework, not Visual Builder.

      About adding a custom Server-Side DataSource to Visual Builder: this means subclassing one of our server-side classes (eg SQLDataSource) and does not involve GWT at all, so doesn't require our GWT Reflection support. Revisit the QuickStart Guide explanation of Custom DataSources for more information.

      Finally, Visual Builder does not currently support client-side custom SmartGWT classes, which would necessarily involve a means of adding GWT-generated resources to the tool. Support for this is eventually planned, but as explained above, probably isn't related to anything you are actually trying to do.

      Comment


        #4
        Thank you for your answer. I did read the description of Visual Bilder in the FAQ.

        It is exactly was my Firm is looking for, above all for what concerns the possibility to leverage standard corporate design patterns (via custom components), and enterprise's data sources (via adding DataSources or DataSource Wizards).

        We think the possibility to define screens by xml instead of programming it is really amazing.


        The fact is we have a custom JEE framework and we would like to interface this with your product...What about writing from scratch a new subclass of DataSource?

        What about the problems in WLS 12.1.1? I couldn't deploy it because of an exception in a Spring Servlet (see my previous post)..Any Hint?

        Best regards.
        Last edited by javabean; 3 Jun 2014, 06:24.

        Comment


          #5
          Again the Custom DataSource approach covered in the QuickStart sounds like it's exactly what you need. Server-side custom DataSources can cannot to absolutely anything available from Java, including, of course, remote services you call from Java. So it should be no trouble to connect to your custom JEE framework and there are several samples available - be sure to read the entire Server Framework chapter of the QuickStart.

          It is exactly was my Firm is looking for, above all for what concerns the possibility to leverage standard corporate design patterns (via custom components), and enterprise's data sources (via adding DataSources or DataSource Wizards).

          We think the possibility to define screens by xml instead of programming it is really amazing.
          Just a note - all of these things are possible with SmartGWT with or without Visual Builder, so please carefully consider the FAQ's advice about Visual Builder - do not try to use it as a primary environment for a Java developer, that's not who it's designed for.

          Comment

          Working...
          X