Announcement

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

    Unsupported AdvancedCriteria message when using filter operators in SmartGWT 6 pro

    Hi Isomorphic. I am trying to use the new filter operators in SmartGWT 6. I have a databound ListGrid which works fine if I apply simple filters. But when I try to add a filter using an operator (for instance, '> 5'), I get the following message:

    DSRequest for DataSource 'buffer_bank' contained AdvancedCriteria, which the DataSource does not support
    Here is my TestCases.java code:
    Code:
    public class TestCases implements EntryPoint {  
        
        public void onModuleLoad() {       
            ListGrid grid = new ListGrid(DataSource.get("buffer_bank"));
            grid.setWidth100();
            
            // default data manipulation properties
            grid.setAutoFetchData(true);
                    
            // filter properties
            grid.setShowFilterEditor(true);  
            grid.setFilterOnKeypress(true);  
            grid.setAllowFilterOperators(true);
            
            HStack layout = new HStack();  
            layout.setWidth100();
            layout.setHeight100();
            layout.addMember(grid);  
            layout.draw();  
        }
    My buffer_bank.ds.xml file:
    Code:
    <DataSource        
        ID="buffer_bank" 
        serverType="sql" 
        tableName="buffer_bank" 
        xmlns:fmt="WEB-INF/"
        autoDeriveSchema="true">    
    </DataSource>
    So my question is if this new feature only works on Power or better (because this error seems to point to features available only on Power/Enterprise).

    Thanks

    SmartGWT 6.0-p20160622. Chrome Versión 51.0.2704.106 m.

    #2
    Yes, server-side support for AdvancedCritiera in the SQL, JPA and Hibermate connectors is one of the main features of Power relative to Pro.

    So you would either need to upgrade, or add your own server-side code that handles AdvancedCriteria.

    Comment


      #3
      Ok. That's clear. But I would respectfully suggest you add notes to the docs to make it clearer. Specifically, you could make it clear here, saying that this is a Power/Enterprise feature (if enabled in Pro or LGPL, the error will show up). Also, making it clear in demos like this could be beneficial for people interested in implementing the feature (I realize now that this particular demo uses a clientOnly DataSource, but since these are general showcase demos, I got confused and thought that this was a feature available for all SmartGWT editions).

      Thanks Isomorphic.

      Comment


        #4
        Those features can be used with any edition, including the LGPL edition. The feature that is specific to power edition is server-side execution of advanced criteria with the built in adapters.

        It would be silly for every sample that shows advanced criteria to include a note about power edition, so we don't plan to do that.

        Comment


          #5
          Hi Isomorphic. Just to clarify a little bit, can you please explain under which circumstances will filter operators work in Pro? Only in ListGrids with a clientOnly DataSource?
          Thanks

          Comment


            #6
            There is only one circumstance in which it does not work. It does not work if you are using the built in server-side connectors and you have not implemented support for advanced criteria yourself.

            Any other situation works, including clientOnly datasources, custom server-side datasources, REST, WSDL, etc.

            And again, this is not specific to the particular feature you are trying to use. This is true of advanced criteria in general, which is created by many different features and components.

            Comment


              #7
              Thanks. It's very clear now!

              Comment

              Working...
              X