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

  • 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.

主站蜘蛛池模板: 高青县| 辉县市| 凌海市| 咸丰县| 吉安市| 瓦房店市| 新干县| 丘北县| 嘉鱼县| 隆尧县| 夏邑县| 彰化市| 石狮市| 会宁县| 泸定县| 武强县| 三亚市| 罗源县| 保靖县| 赤水市| 洮南市| 闸北区| 宁明县| 盐边县| 忻城县| 禄丰县| 中宁县| 隆子县| 黔南| 逊克县| 玛多县| 马边| 府谷县| 洛川县| 崇左市| 兰溪市| 浮梁县| 宜丰县| 武陟县| 黑河市| 丰原市|