kandi background
Explore Kits

smartTable | 一款android自动生成表格框架An Android automatically generated table framework

 by   huangyanbin Java Version: 2.2.0 License: No License

 by   huangyanbin Java Version: 2.2.0 License: No License

Download this library from

kandi X-RAY | smartTable Summary

smartTable is a Java library. smartTable has build file available and it has medium support. However smartTable has 17 bugs and it has 1 vulnerabilities. You can download it from GitHub.
添加 JitPack repository 到你的build文件.
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • smartTable has a medium active ecosystem.
  • It has 4498 star(s) with 739 fork(s). There are 103 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 173 open issues and 99 have been closed. On average issues are closed in 22 days. There are 3 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of smartTable is 2.2.0
smartTable Support
Best in #Java
Average in #Java
smartTable Support
Best in #Java
Average in #Java

quality kandi Quality

  • smartTable has 17 bugs (0 blocker, 9 critical, 2 major, 6 minor) and 540 code smells.
smartTable Quality
Best in #Java
Average in #Java
smartTable Quality
Best in #Java
Average in #Java

securitySecurity

  • smartTable has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • smartTable code analysis shows 1 unresolved vulnerabilities (0 blocker, 0 critical, 0 major, 1 minor).
  • There are 12 security hotspots that need review.
smartTable Security
Best in #Java
Average in #Java
smartTable Security
Best in #Java
Average in #Java

license License

  • smartTable does not have a standard license declared.
  • Check the repository for any license declaration and review the terms closely.
  • Without a license, all rights are reserved, and you cannot use the library in your applications.
smartTable License
Best in #Java
Average in #Java
smartTable License
Best in #Java
Average in #Java

buildReuse

  • smartTable releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • Installation instructions are not available. Examples and code snippets are available.
  • smartTable saves you 7086 person hours of effort in developing the same functionality from scratch.
  • It has 14669 lines of code, 1176 functions and 203 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
smartTable Reuse
Best in #Java
Average in #Java
smartTable Reuse
Best in #Java
Average in #Java
Top functions reviewed by kandi - BETA

kandi has reviewed smartTable and discovered the below as its top functions. This is intended to give you an instant insight into smartTable implemented functionality, and help decide if they suit your requirements.

  • Draw the content of the table .
  • Get the zoom provider rect
  • calculates the width of the table
  • Load data .
  • Show chart dialog .
  • Initializes the table configuration .
  • Start an animation for the table .
  • show the checkBox
  • Gets field data .
  • show changed style

smartTable Key Features

English README

历史版本介绍

更多功能详情介绍

apk version 2.0版本下载地址

SmartTable2.0基本使用手册持续更新中

快速配置自动生成表格;

自动计算表格宽高;

表格列标题组合;

表格固定左序列、顶部序列、第一行、列标题、统计行;

自动统计,排序(自定义统计规则);

表格图文、序列号、列标题格式化;

表格各组成背景、文字、网格、padding等配置;

表格批注;

表格内容、列标题点击事件;

缩放模式和滚动模式;

注解模式;

内容多行显示;

分页模式;

首尾动态添加数据;

丰富的格式化;

支持二维数组展示(用于类似日程表,电影选票等);

导入excel(支持颜色,字体,背景,批注,对齐,图片等基本Excel属性);

表格合并单元(支持注解合并,支持自动合并);

支持其他刷新框架SmartRefreshLayout;

可配置表格最小宽度(小于该宽度自动适配);

支持直接List或数组字段转列;

支持Json数据直接转换成表格;

支持表格网格指定行列显示;

支持自动生成表单。

引用

align 设置该列对齐方式,默认居中

type 有ColumnType.Own,ColumnType.Child,两个值可以设置,假设UserInfo 有个属性是Family family对象,你想解析faily对象的属性monther,father两个属性,则需要设置Child,并在monther,father下添加相对应的注解@SmartColumn,否则只解析到Family,默认是Own。

autoMerge 假设你返回的数据格式化之后该列附近数据有相同,则会自动合并成一个单元格,默认不开启合并。

autoCount table 开启显示统计行,设置autoCount为true,则该列可以自动统计,默认为false。

fixed fixed设置为true,该列滚动到最左边时,可以自动固定住。

SmartTable

copy iconCopydownload iconDownload
 android自动生成表格框架

总结

copy iconCopydownload iconDownload
这次写了SmartTable,本来没想写那么多,结果越写越多。功能也很完善了,好多新的想法由于之前没有考虑到,无法进一步实现。但对基础的Excel支持我觉得已经很完美了,甚至可以展示Excel中图表(使用SmartChart)。如果你在android端需要使用表格,这个肯定可以满足你的需求,希望有需要的同学可以使用它。

打赏

copy iconCopydownload iconDownload
 如果你觉得对你有帮助,客官打个赏!

In SAPUI5 SmartTable on event beforeRebindTable adding some filters

copy iconCopydownload iconDownload
    onBeforeRebindTable: function (oEvent) {
        var oSmartTable = oEvent.getSource();
        if (this._isOnInit == null) this._isOnInit = true;
        if (this._isOnInit) {
            oSmartTable.applyVariant(
                {
                    filter: {
                        filterItems: [{
                            columnKey: "YourSelectedColumn",
                            exclude: false,
                            operation: "EQ",
                            value1: "SomeEnteredValue",
                            value2: ""
                        }]
                    }
                }

            );
            this._isOnInit = false;
        }
    }

How do I force the SmartTable to load all items?

copy iconCopydownload iconDownload
<SmartTable growingThreshold = "{path:'yourModel>/', formatter:'.formatter.sizeCalculator'}">
sizeCalcualtor: function(oModel){
  let count = 0;
  for(let i in oModel){
    //add item to count;
  }
return count;
}
-----------------------
<SmartTable growingThreshold = "{path:'yourModel>/', formatter:'.formatter.sizeCalculator'}">
sizeCalcualtor: function(oModel){
  let count = 0;
  for(let i in oModel){
    //add item to count;
  }
return count;
}

Make SmartTable's Selected Row a Custom Color

copy iconCopydownload iconDownload
this.className += " selected";
this.classList.add(“selected”);
-----------------------
this.className += " selected";
this.classList.add(“selected”);
-----------------------
onInit:function(){
    var that=this; //'this' refers to the view controller
    this.aTrCounter=[]; //counter is used to ensure only 1 row is selected at a time so only 1row is colored at a time. Reason why this is in onInit is to avoid errors due to pagination
},
onDataReceived:function(){
    var trs = document.querySelectorAll("tr");
    for(var i = 0; i < trs.length; i++){
        trs[i].addEventListener("click", function(){
            if(that.aTrCounter.length===0) { //1st row selection
                this.classList.add("selected"); //'this' no longer refers to view controller, it points to the tr itself 
                that.aTrCounter.push(this); //add tr into array to be counted & for later changes
            }
            else if(that.aTrCounter.length>0){ //2nd row selection
                if(that.aTrCounter[0]===this){ //if user clicks the same row
                    this.classList.remove("selected");
                    that.aTrCounter.pop(); //remove last element from array (in this case, the only element)
                } else if(that.aTrCounter[0]!=this){ //if user clicks different row
                    that.aTrCounter[0].classList.remove("selected");
                    that.aTrCounter.pop();
                    this.classList.add("selected");
                    that.aTrCounter.push(this);
                }
            }
        });
    }
}

How do I enable filtering in my SAP UI5 SmartTable?

copy iconCopydownload iconDownload
<SmartTable ...>
  <Table ...>
    <columns>
      <Column 
          customData:p13nData="{
            leadingProperty: 'Version',
            columnKey: 'Version',
            sortProperty: 'Version',
            filterProperty: 'Version'  // <---
          }">
        ...

SmartTable control has internal load resource error since 1.74

copy iconCopydownload iconDownload
<script id="sap-ui-bootstrap" src="https://ui5.sap.com/1.74.1/resources/sap-ui-core.js">
<script id="sap-ui-bootstrap" src="resources/sap-ui-cachebuster/sap-ui-core.js">
-----------------------
<script id="sap-ui-bootstrap" src="https://ui5.sap.com/1.74.1/resources/sap-ui-core.js">
<script id="sap-ui-bootstrap" src="resources/sap-ui-cachebuster/sap-ui-core.js">

SAPUI5 routing errors Control with ID app could not be found

copy iconCopydownload iconDownload
<App id="app"> </App>

React linter airbnb proptypes array

copy iconCopydownload iconDownload
SmartTable.propTypes = {
  name: React.PropTypes.string.isRequired,
  cols: React.PropTypes.arrayOf(React.PropTypes.string),
  rows: React.PropTypes.arrayOf(React.PropTypes.string),
};
-----------------------
SmartTable.propTypes = {
  name: PropTypes.string.isRequired,
  cols: PropTypes.instanceOf(Array),
  rows: PropTypes.instanceOf(Array),
};
SmartTable.propTypes = {
  name: PropTypes.string.isRequired,
  cols: PropTypes.instanceOf(Object),
  rows: PropTypes.instanceOf(Array),
};
-----------------------
SmartTable.propTypes = {
  name: PropTypes.string.isRequired,
  cols: PropTypes.instanceOf(Array),
  rows: PropTypes.instanceOf(Array),
};
SmartTable.propTypes = {
  name: PropTypes.string.isRequired,
  cols: PropTypes.instanceOf(Object),
  rows: PropTypes.instanceOf(Array),
};
-----------------------
SmartTable.propTypes = {
  name: PropTypes.string.isRequired,
  cols: PropTypes.arrayOf(PropTypes.shape({
    id: PropTypes.string.isRequried,
    value: PropTypes.string,
   })
  rows: PropTypes.arrayOf(PropTypes.shape({
    id: PropTypes.string.isRequried,
    value: PropTypes.string,
   })
-----------------------
someVal: PropTypes.array, // eslint-disable-line

Yii2 pjax corrupts styles

copy iconCopydownload iconDownload
$(document).on("pjax:success", function() {
 $('#smartTable').DataTable({
     "paging": false,
     "responsive": true,
     "dom": 'iftlp',
     "bProcessing": true,
     "aoColumnDefs": [ // EXCEPT SORTING
         {'bSortable': false, 'aTargets': ['no-sort']}
     ],
     });
 $('#simpleTable').DataTable({
     "responsive": true,
     "dom": 't'
 });
});
-----------------------
[
'label'=>'Options',
'format' => 'raw',
'value'=>function ($data) {
return Html::a('<i class="glyphicon glyphicon-eye-open"></i>', ['short-message/conversation', 'id'=> $data["id"]], ['onclick' =>'window.location.href=this.getAttribute("href")']);
},
],
 ['onclick' =>'window.location.href=this.getAttribute("href")']
-----------------------
[
'label'=>'Options',
'format' => 'raw',
'value'=>function ($data) {
return Html::a('<i class="glyphicon glyphicon-eye-open"></i>', ['short-message/conversation', 'id'=> $data["id"]], ['onclick' =>'window.location.href=this.getAttribute("href")']);
},
],
 ['onclick' =>'window.location.href=this.getAttribute("href")']

How to load sap.ui.comp.smarttable.SmartTable faster?

copy iconCopydownload iconDownload
sap.ui.define([
    'jquery.sap.global',
    'sap/m/VBoxRenderer',
    'sap/m/Column',
    // ...
    'sap/ui/comp/library',
    'sap/ui/comp/providers/TableProvider',
    'sap/ui/comp/smartfilterbar/FilterProvider',
    'sap/ui/comp/smartvariants/SmartVariantManagement',
    // ...
    'sap/ui/table/AnalyticalColumn',
    'sap/ui/table/AnalyticalTable',
    'sap/ui/table/Column',
    'sap/ui/table/Table',
    'sap/ui/table/TreeTable',
    // ...
], function(/*...*/) {/*...*/});
// since 1.58.2
data-sap-ui-async="true" // replaces -preload="async" and -xx-async="true"
"sap.ui5": {
  "dependencies": {
    "libs": {
      "sap.ui.core": {},
      "sap.m": {},
      "sap.ui.comp": {},
      "sap.ui.table": {},
      "sap.ui.unified": {}
    },
    ...
  },
  ...
}
-----------------------
sap.ui.define([
    'jquery.sap.global',
    'sap/m/VBoxRenderer',
    'sap/m/Column',
    // ...
    'sap/ui/comp/library',
    'sap/ui/comp/providers/TableProvider',
    'sap/ui/comp/smartfilterbar/FilterProvider',
    'sap/ui/comp/smartvariants/SmartVariantManagement',
    // ...
    'sap/ui/table/AnalyticalColumn',
    'sap/ui/table/AnalyticalTable',
    'sap/ui/table/Column',
    'sap/ui/table/Table',
    'sap/ui/table/TreeTable',
    // ...
], function(/*...*/) {/*...*/});
// since 1.58.2
data-sap-ui-async="true" // replaces -preload="async" and -xx-async="true"
"sap.ui5": {
  "dependencies": {
    "libs": {
      "sap.ui.core": {},
      "sap.m": {},
      "sap.ui.comp": {},
      "sap.ui.table": {},
      "sap.ui.unified": {}
    },
    ...
  },
  ...
}
-----------------------
sap.ui.define([
    'jquery.sap.global',
    'sap/m/VBoxRenderer',
    'sap/m/Column',
    // ...
    'sap/ui/comp/library',
    'sap/ui/comp/providers/TableProvider',
    'sap/ui/comp/smartfilterbar/FilterProvider',
    'sap/ui/comp/smartvariants/SmartVariantManagement',
    // ...
    'sap/ui/table/AnalyticalColumn',
    'sap/ui/table/AnalyticalTable',
    'sap/ui/table/Column',
    'sap/ui/table/Table',
    'sap/ui/table/TreeTable',
    // ...
], function(/*...*/) {/*...*/});
// since 1.58.2
data-sap-ui-async="true" // replaces -preload="async" and -xx-async="true"
"sap.ui5": {
  "dependencies": {
    "libs": {
      "sap.ui.core": {},
      "sap.m": {},
      "sap.ui.comp": {},
      "sap.ui.table": {},
      "sap.ui.unified": {}
    },
    ...
  },
  ...
}

Filtering Smarttables initial read request

copy iconCopydownload iconDownload
enableAutoBinding="false"
beforeRebindTable="onBeforeRebindTable"
    onBeforeRebindTable: function (oEvent) {
        var oBindingParams = oEvent.getParameter("bindingParams");

        oBindingParams.filters.push(new sap.ui.model.Filter("PropertyX", "EQ", "myProperty"));
    }
-----------------------
enableAutoBinding="false"
beforeRebindTable="onBeforeRebindTable"
    onBeforeRebindTable: function (oEvent) {
        var oBindingParams = oEvent.getParameter("bindingParams");

        oBindingParams.filters.push(new sap.ui.model.Filter("PropertyX", "EQ", "myProperty"));
    }
-----------------------
enableAutoBinding="false"
beforeRebindTable="onBeforeRebindTable"
    onBeforeRebindTable: function (oEvent) {
        var oBindingParams = oEvent.getParameter("bindingParams");

        oBindingParams.filters.push(new sap.ui.model.Filter("PropertyX", "EQ", "myProperty"));
    }

Community Discussions

Trending Discussions on smartTable
  • In SAPUI5 SmartTable on event beforeRebindTable adding some filters
  • How do I force the SmartTable to load all items?
  • Make SmartTable's Selected Row a Custom Color
  • How do I enable filtering in my SAP UI5 SmartTable?
  • SmartTable control has internal load resource error since 1.74
  • SAPUI5 routing errors Control with ID app could not be found
  • React linter airbnb proptypes array
  • Space key not working in input control when added inside sap.m.ObjectHeader
  • Is there any way to customise variant managment in SmartTable in worklist fiori app?
  • Yii2 pjax corrupts styles
Trending Discussions on smartTable

QUESTION

In SAPUI5 SmartTable on event beforeRebindTable adding some filters

Asked 2020-Oct-23 at 05:35

My requiremnt is to put some filters on smartTable form my controller.

In Event beforeRebindTable i am using the following code to put filter using this code which is working fine.

    onBeforeRebindTable: function (oEvent) {
        var oBindingParams = oEvent.getParameter("bindingParams");
    statFilter = new sap.ui.model.Filter("Claim_TYPE", "EQ", "1234");
                oBindingParams.filters.push(statFilter);

}

But the problem is when the user is clicling on table column on filter again, the filter i am adding in above code is not visible in the selection dialog. User may need to delete this filter, If its not visible in dialog they wont be able to delete it.

I am not able to establish the link why the dialog is not getting updated, or should i add this somewhere else. Thanks Sonal.

ANSWER

Answered 2020-Oct-23 at 05:35
    onBeforeRebindTable: function (oEvent) {
        var oSmartTable = oEvent.getSource();
        if (this._isOnInit == null) this._isOnInit = true;
        if (this._isOnInit) {
            oSmartTable.applyVariant(
                {
                    filter: {
                        filterItems: [{
                            columnKey: "YourSelectedColumn",
                            exclude: false,
                            operation: "EQ",
                            value1: "SomeEnteredValue",
                            value2: ""
                        }]
                    }
                }

            );
            this._isOnInit = false;
        }
    }

Source https://stackoverflow.com/questions/64492319

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install smartTable

You can download it from GitHub.
You can use smartTable like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the smartTable component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Share this Page

share link
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.