Use of tree data lists

1 Overview

In the integration project, the work content of the data analysis part is involved. Most of the charts are displayed through the control of two dimensions (generally business matters and time). This time, what we encountered in the project is the list of bank accounts. , according to the previous research and discussion summary, the form that the bank account needs to be displayed (that is, displayed through a tree list) is determined, and the data analysis function developed before uses the basic data list, and there is no use of the tree data list Description, this article is used to illustrate the use of tree data lists.

2 Intended audience

  1. Internal staff of Shutong Changlian
  2. computer enthusiasts

3 General idea

  1. First find the corresponding portlet
  2. Go to the code to find the corresponding code
  3. Analyze the key methods to get the data format
  4. Use ESB to create data formats

4 Operation steps

4.1 View code

First, find the portlet corresponding to the tree data list

Find the corresponding code section in the porttal_portlets project

4.2 Analyze the code

Find the getAjaxData method

Parse the parseRecords method

It can be seen from the code that the data source is originally in json format, and the latter functions are realized by converting it into list<DataRow>, and the corresponding json format must have id, name, and parentId.

4.3 Creating Data Formats

Because the list of bank accounts needs to be displayed in the form of

When using ESB to create a list data format, the following figure is shown:

In the first query node, first get the information of the general group and each project company

In the second query node, get the secondary menu

In the third node, get the third-level menu, and get the association with the second-level menu at the same time

Assemble the data format in the java conversion node.

The following are the code processing steps:

Finally print out the resulting data format

5 Summary

When encountering similar problems, first of all, according to the knowledge you have learned, gradually peel off the knowledge points. For example, to solve the problem this time, first know that it is a portlet, then find the code of the corresponding portlet, and deduce what format should be needed according to the reverse analysis of the code. According to the existing knowledge, it is not difficult to realize the problems that need to be solved step by step.

上述说明介绍了实现树形数据列表portlet的步骤,想要更深入了解AEAI相关产品,请登录公司官网:www.agileai.com中的知识中心,其中有本公司技术人员对一些技术知识的文档总结。

本文主要给大家介绍一下如何分析未知数据格式的portlet以及对应格式的创建,与大家分享希望能够对大家有所帮助。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326216318&siteId=291194637