官术网_书友最值得收藏!

  • ADempiere 3.6 Cookbook
  • Ajit Kumar
  • 491字
  • 2021-04-09 21:40:54

Customizing an existing window

Practically, there will be a situation when we will have to make changes to the existing screens. For example, label change, data type change, logically grouping the fields, and so on. In this recipe, we will take our newly created MOM window and we will customize it further to understand the process involved in customizing an existing window.

In the previous recipe, our window had a Start Date, Start Time, and End Time. All of them display both the date and time. Now, say, we want to achieve the following:

  • Start Date displays only the date
  • Start Time and End Time displays only the time
  • Start Time and End Time shall appear in the same line

Given this customization need, let us see how we can achieve it.

How to do it...

  1. Log in as System/System with the System Administrator role.
  2. Click on the Menu | Application Dictionary | Table and Column menu. This pops up the lookup window and prompts for table details. Enter the details to find the MOM related table.
  3. Go to the Column tab for the MOM table and take a look at the fields that interest us, as shown in the following screenshot:
    How to do it...
  4. Select end_time in the DB Column Name and select Time in the Reference field.
  5. Repeat step 5 for start_time.
  6. For start_date, select the Reference field as Date. The following screenshot shows the fields with their updated Reference.
    How to do it...
  7. Go to the Window, Tab, and Field window for the Minutes Of Meeting and go to the Field tab.
  8. Check the Same Line checkbox for the end_time field to show Start Time and End Time in the same line, as shown in the following screenshot:
How to do it...

With this, we are done with our customization. The following screenshot shows how the window looks after the changes:

How to do it...

How it works...

In this recipe, we changed the data types of Start Date, Start Time, and End Time in steps 1 through to 6 and placed Start Time and End Time fields in the same line in the steps 7-8. The default Reference Date+Time, which ADempiere guesses for the timestamp columns, would show the date as well as the time. So, in order to change the type, the following is the field and Reference mapping:

When it comes to showing multiple fields on the same line, ADempiere uses the Same Line flag at the field level to determine whether the field needs to be rendered to the next line or to the same line. ADempiere uses a two column layout for the tab panel. Hence, at most, only two fields can be displayed in a single line.

There's more...

ADempiere determines the field data type and validation using the field Reference. There is a list of pre-defined Reference lists, which ADempiere provides. Moreover, in case you need, you can also create a new reference for your application. You may refer to the supported Reference list at http://en.wikiversity.org/wiki/ADempiere_Application_Dictionary#Reference.

主站蜘蛛池模板: 庆城县| 汤原县| 乳山市| 平阳县| 潼关县| 水城县| 修水县| 木里| 宾川县| 大埔县| 大余县| 泰宁县| 敖汉旗| 合阳县| 郓城县| 新营市| 中西区| 饶平县| 黄浦区| 夏河县| 宿松县| 广南县| 界首市| 马关县| 翁牛特旗| 瓮安县| 无为县| 广东省| 万盛区| 藁城市| 雅江县| 枣强县| 黔西| 天长市| 石台县| 咸阳市| 安远县| 铜川市| 通渭县| 响水县| 天气|