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

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.

主站蜘蛛池模板: 浙江省| 万安县| 通许县| 皋兰县| 襄汾县| 东乌珠穆沁旗| 绥化市| 珲春市| 桃源县| 贡觉县| 沾益县| 永和县| 南投县| 海口市| 于田县| 理塘县| 太和县| 淳安县| 临湘市| 丰宁| 泗阳县| 富宁县| 大城县| 青阳县| 潜江市| 青神县| 晋宁县| 八宿县| 呈贡县| 阿拉尔市| 石泉县| 隆德县| 昌都县| 二连浩特市| 樟树市| 鸡西市| 乡城县| 阿拉善盟| 长汀县| 新巴尔虎右旗| 永济市|