Project Management Tutorial - Adding Custom Entity Attributes

From jVantage

Jump to: navigation, search

Introduction

In the last section we added the auto insert fields of name and description to the Company entity. In this section will move forward to add some customized fields. When we are finished, the Company entity will have the following data attributes:

  • Name
  • Description
  • Address
  • City
  • State
  • Zip Code
  • Phone
  • Photo

In this context, when we say custom fields we are actually referring to fields that are not entered via the auto insert menu. As you will see, jVantage provides a great deal of control over field types and how data is collected and validated for each of them.

Adding a Custom Field

If you've been following this tutorial, you should have a PM2_COMPANY table that looks like the snapshot below. If you haven't, no problem, you will still be able to learn from this section.

Add the company name and description.

The first field that we'll add is the Address field. To do so, click on the Fields | New Field option of the Relationship Menu as shown below.

Add field menu option.

The Order By Value

After selecting the add new field option, you are presented with an entry form to define the attributes of the field, of which there are many. The first field on the form is the Order By value. This field has special significance that warrants a little extra explanation.

As you have already seen, when attributes are defined for a given entity all of the behaviors and functionality required to support that attribute are provided by jVantage automatically. By this we mean, each attribute has certain intrinsic properties which include , for example, editing and searching. One of the things that jVantage does at the entity level is provide form and view handling. This means that once an entity has been defined (even partially), it can immediately be used to collect and edit information, as we saw when we added the name and description to the company entity and then went into the new application and entered data.

jVantage provides built-in form handling and validation capabilities. Beyond that it also provides the ability to construct forms without requiring developers to define specific layouts. In other words, once an entity is defined you can began to edit information for one or more entity instances using the forms jVantage creates by default. These are called Default Forms. Later you'll see how to create custom layouts for all pages of your application, however, as you are building your application the default forms really come in handy.

jVantage provides capabilities for customizing the look and feel of applications by not only allowing every page in your application to be specifically designed using an HTML editor for instance, but also provides the ability to change the form layout of a given page of the application based on the group that the user who is using the application belongs to. These advanced features will be covered later.

When a custom layout has not been created for a given page, jVantage relies on the order by value associated with each field to determine the order in which the field should be displayed on the page. This ordering applies to the view, add, modify and delete pages for each entity.

Looking at the table view at the top of this page we can see that the company entity has three fields; ID, name and description. The order by values are 10, 20 and 30 respectively. When we entered the application in the previous section we saw that the company data was displayed in this order on the view and modify forms. When we add new fields we will specify order by values to control that ordering. So, in defining the address field we can look and see that the next available number in the sequence is 40.

Personal tools