Announcement

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

  • andyx1975
    replied
    lilke always.... awesome!!! Tnank you very much!!! Downloading 4.1d from 03.03. solved this issue!!!
    Last edited by andyx1975; 4 Mar 2014, 08:11.

    Leave a comment:


  • Isomorphic
    replied
    Hello,
    We've fixed this issue - please pick up the next nightly build (dated March 2 or later) to get this fix.

    Regards
    Isomorphic Software

    Leave a comment:


  • andyx1975
    replied
    So I created an example... as soon as I use the method "listGrid.setAllowFilterExpressions( true );", the incase filter search does not work anymore... you need to enter the correct Upper and Lower cases. As soon as I remove the method "listGrid.setAllowFilterExpressions( true );" it is working as expected. So I guess it is maybe a bug?


    here's the code:

    List Grid:
    Code:
    package com.uds.webadmin.client;
    
    import com.smartgwt.client.data.Criteria;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.data.Record;
    import com.smartgwt.client.widgets.Canvas;
    import com.smartgwt.client.widgets.grid.ListGrid;
    import com.smartgwt.client.widgets.grid.ListGridField;
    import com.smartgwt.client.widgets.viewer.DetailViewer;
    
    public class ItemListGrid
    {
        final DataSource dataSource = ItemSupplyXmlDS.getInstance();
    
        public void initListGrid()
        {
            ListGrid listGrid = new ListGrid()
            {
                @Override
                protected Canvas getCellHoverComponent( Record record, Integer rowNum, Integer colNum )
                {
                    DetailViewer detailViewer = new DetailViewer();
                    detailViewer.setWidth( 200 );
                    detailViewer.setDataSource( dataSource );
                    Criteria criteria = new Criteria();
                    criteria.addCriteria( "itemID", record.getAttribute( "itemID" ) );
                    detailViewer.fetchData( criteria );
    
                    return detailViewer;
                }
            };
            
            ListGridField itemNameField = new ListGridField("itemName");  
            ListGridField skuField = new ListGridField("SKU");  
            ListGridField categoryField = new ListGridField("category");  
            listGrid.setFields(itemNameField, skuField, categoryField);  
            
            listGrid.setDataSource( dataSource );
            listGrid.setEmptyCellValue( "---" );
            listGrid.setAutoFetchData( true );
            listGrid.setShowFilterEditor( true );
            listGrid.setAutoFitFieldsFillViewport( true );
            listGrid.setAllowFilterExpressions( true );
        }
        
        
    }

    DataSource:
    Code:
    package com.uds.webadmin.client;
    
    import com.google.gwt.core.client.GWT;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.data.fields.DataSourceBooleanField;
    import com.smartgwt.client.data.fields.DataSourceDateField;
    import com.smartgwt.client.data.fields.DataSourceIntegerField;
    import com.smartgwt.client.data.fields.DataSourceTextField;
    import com.smartgwt.client.types.DateDisplayFormat;
    import com.smartgwt.client.widgets.grid.ListGridField;
    
    public class ItemSupplyXmlDS
        extends DataSource
    {
    
      
        
        private static ItemSupplyXmlDS instance = null;
        public static ItemSupplyXmlDS getInstance()
        {
            if ( instance == null )
            {
                instance = new ItemSupplyXmlDS( "ItemSupplyXmlDS" );
            }
           
            return instance;
        }
    
        public ItemSupplyXmlDS( String id )
        {
    
            String dataUrl = GWT.getHostPageBaseURL() + "rest/basedata/get/ItemSupplyXmlDS";
            setRecordXPath( "/xmlDSs/xmlDS" );
            setDataURL( dataUrl );
    
            setID( id );
    
            DataSourceTextField itemNameField = new DataSourceTextField("itemName", "Item", 128, true);  
            DataSourceTextField skuField = new DataSourceTextField("SKU", "SKU", 10, true);  
            DataSourceTextField descriptionField = new DataSourceTextField("description", "Description", 2000);  
            DataSourceTextField categoryField = new DataSourceTextField("category", "Category", 128, true);  
      
            DataSourceIntegerField pkField = new DataSourceIntegerField("itemID");  
            pkField.setHidden(true);  
            pkField.setPrimaryKey(true);  
     
            setClientOnly( true );
            
            setFields(pkField, itemNameField, skuField, descriptionField, categoryField);  
     
        }
    }

    Leave a comment:


  • andyx1975
    replied
    ok... thank you... that's not a big deal... expect it soon. Thank you!!!

    Leave a comment:


  • Blama
    replied
    Hi andyx1975,

    then please create a minimal testcase for Isomorphic. Should be as easy as adding a filterRow to the BuiltInDS sample or referencing a sample from the showcase and the generated request in Console and what you expected.
    It's also great if you can tell the date the behaviour changed.

    Best regards,
    Blama

    Leave a comment:


  • andyx1975
    replied
    sorry did not mention this... I also tried:

    Code:
    datasource.setDefaultTextMatchStyle( TextMatchStyle.SUBSTRING );
    No success :-( So I guess it is a bug in ListGrids???

    Leave a comment:


  • Blama
    replied
    Originally posted by andyx1975 View Post
    sorry but I can not The following also did not not worked:
    listGrid.setFilterEditorCriteria( new Criterion( OperatorId.ICONTAINS ) );
    That's definitely not what you are looking for.

    Please see my 3rd link in the post 20th Feb 2014, 02:50 and add the attribute to your .ds.xml file.

    Best regards,
    Blama

    Leave a comment:


  • andyx1975
    replied
    sorry but I can not follow you... I only found 2 working solutions:

    1. listGrid.setAllowFilterExpressions( false );
    2. ListGridField.setFilterOperator( OperatorId.ICONTAINS );

    Solution one is not a real one because I need to disable the filter expressions
    Solution two is working, but I need to add many code lines for all tables columns

    The following also did not not worked:
    listGrid.setFilterEditorCriteria( new Criterion( OperatorId.ICONTAINS ) );
    Last edited by andyx1975; 21 Feb 2014, 14:40.

    Leave a comment:


  • Blama
    replied
    Please click the 3rd link.

    Leave a comment:


  • andyx1975
    replied
    Hey thanks again... the following code seems to work:

    Code:
    ListGridField.setFilterOperator( OperatorId.ICONTAINS );
    But isn't there an easier way... this means that I need to add this line to each Column. I have a couple of tables in my application.

    Thanks
    Andy

    Leave a comment:


  • Blama
    replied
    Please click the 2nd link. It links to ListGridField.setFilterOperator(OperatorId filterOperator)

    Additionally, in the JavaDocs, there is no ListGridField.setAutoFetchTextMatchStyle(...)

    Leave a comment:


  • andyx1975
    replied
    Thanks for your help but on field level I just can call:

    Code:
    listGridField.setAutoFetchTextMatchStyle( true );
    This doesn't change a single thing. So does anyone have an idea or a working solution?

    Thanks
    Andy

    Leave a comment:


  • Blama
    replied
    Try the others as well. Field-level overrides Grid-level.

    Leave a comment:


  • andyx1975
    replied
    thanks for your help... I found this method, But it does not work

    Code:
    listGrid.setAutoFetchTextMatchStyle( TextMatchStyle.SUBSTRING );

    Leave a comment:


  • Blama
    replied
    Hi,

    I don't know if the behaviour changed, but see

    http://www.smartclient.com/smartgwte...ang.Boolean%29

    and

    http://www.smartclient.com/smartgwte....OperatorId%29

    and

    http://www.smartclient.com/smartgwte...TextMatchStyle

    for information.

    Best regards,
    Blama

    Leave a comment:

Working...
X