Skip to content
This repository was archived by the owner on Oct 8, 2021. It is now read-only.

Conversation

@simonmartyr
Copy link

Updated TreeView for Mendix 6
Made changes to the Tree View + Commons to conform to the new standards of Mendix 6.
tested in Mendix 6.0.1

Updated TreeView for Mendix 6
@JelteMX
Copy link
Contributor

JelteMX commented Jan 5, 2016

Is the widget already tested in MX6? I used mx-check-deprecations to see if there are any deprecations left in the MPK. This is the result:

================================ checking ================================
File: TreeView.mpk
{ 'TreeView.widget.TreeView': 'Tree View',
  'TreeView.widget.GridView': 'Grid View' }
Package.xml version: 6.0.1
==========================================================================

==========================
TreeView.mpk // TreeView/widget/Commons.js
==========================
Possible deprecations: 3

Deprecations:
line:300 // column:2 // deprecation:[ mx.ui.confirm ]
{
    "match": "  mx.ui.confirmation({",
    "solution": "mx.ui.confirmation"
}

line:570 // column:18 // deprecation:[ mendix.dom ]
{
    "match": "  this.checkbox = mendix.dom.input({",
    "solution": "mxui/dom"
}

line:624 // column:0 // deprecation:[ mendix.lib.MxObject#getClass OR mendix.lib.MxMetaObject#getClass ]
{
    "match": " getClass : function() {",
    "solution": "mendix/lib/MxObject#getEntity OR mendix.lib.MxMetaObject#getEntity"
}


==========================
TreeView.mpk // TreeView/widget/GridView.js
==========================
Possible deprecations: 26

Deprecations:
line:29 // column:14 // deprecation:[ mendix.dom ]
{
    "match": "   dojo.place(mendix.dom.span({'class' : 'gv_sort_caption'}, this.data.colheadcaption), this.domNode);",
    "solution": "mxui/dom"
}

line:33 // column:14 // deprecation:[ mendix.dom ]
{
    "match": "   dojo.place(mendix.dom.span({'class' : 'gv_sort_arrow'}), this.domNode);",
    "solution": "mxui/dom"
}

line:124 // column:22 // deprecation:[ mendix.lib.MxObject#getClass OR mendix.lib.MxMetaObject#getClass ]
{
    "match": "   var clz = condition.getClass();",
    "solution": "mendix/lib/MxObject#getEntity OR mendix.lib.MxMetaObject#getEntity"
}

line:135 // column:17 // deprecation:[ mendix.dom ]
{
    "match": "  this.domNode = mendix.dom[this.grid.showasdiv ? \"div\" : \"tr\"]({ 'class' : 'gv_row gv_row_' + tablenode.childElementCount });",
    "solution": "mxui/dom"
}

line:142 // column:18 // deprecation:[ mendix.dom ]
{
    "match": "  this.checkbox = mendix.dom.input( {",
    "solution": "mxui/dom"
}

line:148 // column:13 // deprecation:[ mendix.dom ]
{
    "match": "  dojo.place(mendix.dom[this.grid.showasdiv ? \"div\" : \"td\"]({",
    "solution": "mxui/dom"
}

line:154 // column:14 // deprecation:[ mendix.dom ]
{
    "match": "   var cell = mendix.dom[this.grid.showasdiv ? \"div\" : \"td\"]({",
    "solution": "mxui/dom"
}

line:157 // column:20 // deprecation:[ mendix.dom ]
{
    "match": "   var colwrapper = mendix.dom.div({ 'class' : 'gv_cell_wrapper'});",
    "solution": "mxui/dom"
}

line:531 // column:33 // deprecation:[ mendix.lib.MxObject#getGUID OR mendix.lib.MxMetaObject#getGUID ]
{
    "match": "      guids : [\"\" + contextObject.getGUID()]",
    "solution": "mendix/lib/MxObject#getGuid OR mendix/lib/MxMetaObject#getGuid"
}

line:649 // column:15 // deprecation:[ mendix.dom ]
{
    "match": "    dojo.place(mendix.dom.a({ 'class' : 'gv_btn_prev'}, \"<\"), this.pagingNode);",
    "solution": "mxui/dom"
}

line:652 // column:14 // deprecation:[ mendix.dom ]
{
    "match": "   dojo.place(mendix.dom.a({ 'class' : 'gv_btn_page ' + (0 === this.curpage ? 'gv_btn_page_active' : '')}, \"1\"), this.pagingNode);",
    "solution": "mxui/dom"
}

line:656 // column:15 // deprecation:[ mendix.dom ]
{
    "match": "    dojo.place(mendix.dom.a({ 'class' : 'gv_btn_paging_spacer'}, \"..\"), this.pagingNode);",
    "solution": "mxui/dom"
}

line:659 // column:15 // deprecation:[ mendix.dom ]
{
    "match": "    dojo.place(mendix.dom.a({ 'class' : 'gv_btn_page ' + (i === this.curpage ? 'gv_btn_page_active' : '')}, \"\" + (i + 1)), this.pagingNode);",
    "solution": "mxui/dom"
}

line:663 // column:16 // deprecation:[ mendix.dom ]
{
    "match": "     dojo.place(mendix.dom.a({ 'class' : 'gv_btn_paging_spacer'}, \"..\"), this.pagingNode);",
    "solution": "mxui/dom"
}

line:666 // column:14 // deprecation:[ mendix.dom ]
{
    "match": "   dojo.place(mendix.dom.a({ 'class' : 'gv_btn_page ' + (lastpage === this.curpage ? 'gv_btn_page_active' : '')}, \"\" + (lastpage + 1)), this.pag
ingNode);",
    "solution": "mxui/dom"
}

line:670 // column:15 // deprecation:[ mendix.dom ]
{
    "match": "    dojo.place(mendix.dom.a({ 'class' : 'gv_btn_next'}, \">\"), this.pagingNode);",
    "solution": "mxui/dom"
}

line:675 // column:14 // deprecation:[ mendix.dom ]
{
    "match": "   dojo.place(mendix.dom.span({'class' : 'gv_empty_message'}, this.emptymessage), this.pagingNode);",
    "solution": "mxui/dom"
}

line:678 // column:14 // deprecation:[ mendix.dom ]
{
    "match": "   dojo.place(mendix.dom.span({'class' : 'gv_paging_totals'},",
    "solution": "mxui/dom"
}

line:900 // column:13 // deprecation:[ mendix.dom ]
{
    "match": "  var data = mendix.dom.data(node, \"data\");",
    "solution": "mxui/dom"
}

line:1173 // column:20 // deprecation:[ mendix.dom ]
{
    "match": "  this.headerNode = mendix.dom.div({'class' : 'gv_header'});",
    "solution": "mxui/dom"
}

line:1175 // column:18 // deprecation:[ mendix.dom ]
{
    "match": "  this.gridNode = mendix.dom[this.showasdiv ? \"div\" : \"table\"]({'class': 'gv_table'});",
    "solution": "mxui/dom"
}

line:1177 // column:19 // deprecation:[ mendix.dom ]
{
    "match": "  this.headerRow = mendix.dom[this.showasdiv ? \"div\" : \"tr\"]({'class':'gv_headrow'}, mendix.dom[this.showasdiv ? \"div\" : \"th\"]({ 'class' :
 'gv_multiselect_column_head gv_th gv_th_0'}));",
    "solution": "mxui/dom"
}

line:1178 // column:15 // deprecation:[ mendix.dom ]
{
    "match": "  var header = mendix.dom[this.showasdiv ? \"div\" : \"thead\"]({'class':'gv_gridhead'}, this.headerRow);",
    "solution": "mxui/dom"
}

line:1185 // column:20 // deprecation:[ mendix.dom ]
{
    "match": "  this.footerNode = mendix.dom.div({'class' : 'gv_footer'});",
    "solution": "mxui/dom"
}

line:1186 // column:20 // deprecation:[ mendix.dom ]
{
    "match": "  this.pagingNode = mendix.dom.div({'class' : 'gv_paging'});",
    "solution": "mxui/dom"
}

line:1189 // column:23 // deprecation:[ mendix.dom ]
{
    "match": "  this.searchbarNode = mendix.dom.div({'class' : 'gv_searchnode'});",
    "solution": "mxui/dom"
}

@simonmartyr
Copy link
Author

I made the changes in order to fix the Tree View aspect of the widget. I can make the changes for Grid View as well. Thank you for making me aware of the mx deprecation checker tool.
We tested the tree view on Mendix 6.0.1 and it has worked for us.
I can makes the changes you highlighted from the deprecation checker.

@JelteMX
Copy link
Contributor

JelteMX commented Jan 5, 2016

Sounds good to me. The GridView is part of the widget as well, so we need to update that. If the widget works in MX6 that is great :-)

The deprecation checker is a tool I created to quickly check for any deprecations. We used that extensively before MX6 to make sure all our widgets would work.

Implemented Mxui.dom.create
Corrected deprecation within the GridView.
@simonmartyr
Copy link
Author

Implemented changes as discussed.

@JelteMX
Copy link
Contributor

JelteMX commented Jan 6, 2016

Will check your changes today and create a new version for the AppStore. Thanks! :-)

@JelteMX JelteMX self-assigned this Jan 6, 2016
@JelteMX JelteMX merged commit 4e2a327 into mendixlabs:master Jan 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants