Announcement

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

    List Grid filter is not working on clicking the filter button

    Hello Isomorphic Team

    I am using Smart Client V10.0 for our project. In my project, the filter button is not working. I have built a list grid and datasource and passing the data correctly using Servlets. I have set the setShowFilterEditor(true). It is extracting the data in the filterbar but after selecting a certain element and then clicking the filter button, the correct valued is not displayed. Rather, I' getting a warning in the developer console as below:

    WARN:ListGrid:isc_ListGrid_0:No DataSource or invalid DataSource specified, can't create data model
    Canvas.createDataModel(_1=>Obj, _2=>Obj{ID:auto_fetch}, _3=>Obj)
    Canvas.filterWithCriteria(_1=>Obj, _2=>Obj{ID:auto_fetch}, _3=>Obj)
    Canvas.$wo(_1=>"filter", _2=>Obj, _3=>undef, _4=>Obj)
    [a]MathFunction.invokeSuper(_1=>null, _2=>"$wo", _3=>undef, _4=>undef, _5=>undef, _6=>undef, _7=>undef, _8=>undef, _9=>undef, _10=>undef, _11=>undef, _12=>undef, _13=>undef)
    [a]MathFunction.Super(_1=>"$wo", _2=>Array[4], _3=>[object Arguments])
    ListGrid.$wo(_1=>"filter", _2=>Obj, _3=>undef, _4=>Obj, _5=>undef)
    Canvas.filterData(_1=>Obj, _2=>undef, _3=>Obj)
    ** recursed on [a]MathFunction.invokeSuper

    I'm new to this Smart Client world. I will really appreciate if you can guide me through this.

    My .js Code:

    grid: isc.ListGrid.create({
    canEdit: false,
    alternateRecordStyles: true,
    fields: [
    {name: "customerName", width: 250, frozen: true},
    {name: "customerNumber", width: 100, type: "integer", showIf: "false"},
    {name: "classification", width: 180, filterEditorType: "select", showIf: "false"},
    {name: "companyName", width: 150, filterEditorType: "select", showIf: "false"},
    {name: "opportunityName", width: 250},
    {name: "diamond", width: 60, type: "boolean"},
    {name: "opportunityNumber", width: 120, type: "integer", showIf: "false"},
    {name: "sbu", width: 80, filterEditorType: "select"},
    {name: "channel", width: 180, filterEditorType: "select", showIf: "false"},
    {name: "tier", width: 120, filterEditorType: "select", showIf: "false"},
    {name: "ftoDate", width: 120, type: "date"},
    {name: "sales", width: 100, type: "integer"},
    {name: "salesUm", width: 55},
    {name: "volume", width: 100, type: "integer"},
    {name: "volumeUm", width: 30},
    {name: "margin", width: 50, type: "integer"},
    {name: "frequency", width: 100, filterEditorType: "select"},
    {name: "probability", width: 100, filterEditorType: "select"},
    {name: "replacement", width: 80, type: "boolean"},
    {name: "aseptic", width: 50, type: "boolean"},
    {name: "synergyType", width: 140, filterEditorType: "select"},
    {name: "stevia", width: 50, type: "boolean"},
    {name: "status", width: 80, filterEditorType: "select"},
    {name: "acm", width: 150},
    {name: "acmNumber", width: 80, type: "integer", showIf: "false"},
    {name: "leader", width: 150, showIf: "false"},
    {name: "lastUpdate", width: 120, type: "date"},
    {name: "updateBy", width: 150}
    ],
    booleanFalseImage: null,
    booleanTrueImage: "[APP]img/check.png",
    getFilterEditorValueMap: function(field) {
    return lead.MyPipeline.filterList[field.name];
    },
    selectionChanged: function(record, state) {
    lead.MyPipeline.footer.getField("edit").setDisabled(!state || record.isFolder);
    },
    recordDoubleClick: function(viewer, record, recordNum, field, fieldNum, value, rawValue) {
    if (!record.isFolder)
    lead.MyPipeline.editOpportunity();
    },
    filterData: function(criteria, callback, properties) {
    this.Super("filterData", arguments);
    lead.MyPipeline.grid.deselectAllRecords();
    lead.MyPipeline.footer.getField("edit").setDisabled(true);
    if (lead.MyPipeline.grid.data.lengthIsKnown())
    lead.MyPipeline.footer.getField("total").setValue(lead.MyPipeline.grid.getTotalRows());
    }
    }),
    /*
    * Data source to hold grid data
    */
    gridData: isc.DataSource.create({
    dataFormat: "json",
    dataURL: "mypipeline/list",
    showPrompt: true,
    fields: [
    {name: "companyName", type: "text"},
    {name: "customerName", type: "text"},
    {name: "customerNumber", type: "integer"},
    {name: "classification", type: "text"},
    {name: "channel", type: "text"},
    {name: "tier", type: "text"},
    {name: "opportunityName", type: "text"},
    {name: "diamond", type: "boolean"},
    {name: "opportunityNumber", type: "integer"},
    {name: "sbu", type: "text"},
    {name: "ftoDate", type: "date"},
    {name: "sales", type: "integer"},
    {name: "salesUm", type: "text"},
    {name: "volume", type: "integer"},
    {name: "volumeUm", type: "text"},
    {name: "margin", type: "integer"},
    {name: "frequency", type: "text"},
    {name: "probability", type: "text"},
    {name: "replacement", type: "boolean"},
    {name: "aseptic", type: "boolean"},
    {name: "synergyType", type: "text"},
    {name: "stevia", type: "boolean"},
    {name: "status", type: "text"},
    {name: "acm", type: "text"},
    {name: "acmNumber", type: "integer"},
    {name: "leader", type: "text"},
    {name: "lastUpdate", type: "date"},
    {name: "updateBy", type: "text"}
    ],
    handleError: function(response, request) {
    console.dir(response);
    isc.warn("Error reading pipeline list.\n" + response.httpResponseText);
    return false;
    }
    }),

    #2
    As the error message tells you, you have not provided a DataSource. You created a DataSource, but you assigned it to the property gridData (which is not a valid property) instead of to the property "dataSource".

    Comment


      #3
      Thank you Sir!

      Problem is now solved!

      Comment

      Working...
      X