If you decide the value of one model reference, you can narrow down the choices of other related model references.
As an example we will deal with the case of referring to the employee name of the employee model.If the number of employees referenced here is large, it becomes difficult to search from the list box.
Therefore, first select "department" and realize the narrowing down function of selecting "employee" belonging to that department.
The "sales representative" choice will change depending on "sales department".In Figure 1, the sales department is not selected.
If the department in charge is "sales part", the person in charge belonging to the same department is displayed as a choice.
Likewise, if the department in charge is "sales division", the person in charge belonging to the same department is displayed as a choice.
Both items can be used as a search condition.
We prepare three models "department" "employee" "customer".
In the "department" model, prepare the primary key "department ID" and "department name".
The "employee" model refers to the "department" model.(FIG. 6, FIG. 7)
The "customer" model refers to the department model as "sales department" and the employee model as "sales representative" respectively.(FIG. 7, FIG. 8, FIG. 9, FIG. 10)
The point of setting is "option> narrowing down item" in Fig.
This setting is illustrated as follows.
Figure 12 shows an example where sales department department items are set as radio buttons and sales person items are set as list boxes.
Figure 13 shows an example of using sales department items as check boxes and sales person items as list boxes.
If you select multiple check boxes, the number of items to narrow down also increases.(FIG. 14)
Figure 15 shows an example of using sales department items as list boxes and sales person items as check boxes. If the list box is not selected, the salesperson will not be displayed.
When you select Sales department, the checkbox choices are displayed.(Figure 16)
Figure 17 shows an example where sales department department items are set as radio buttons and sales person items are set as check boxes.
Figure 18 shows an example in which both the sales department item and the sales representative item are check boxes.
In this function, all the narrowing-down source data is loaded into the memory once, and the condition judgment is carried out by the Java program.[About performance ...]
In the following cases, it can not be specified as narrowing down item.
In this case, another narrowing-down setting "Narrow down choices by value of other items"please use.
When the value of the narrowing source is changed (in the above example, the value of "sales department" is changed), the value selected as "sales representative" is cleared.
You can not narrow down to suggestion items.(Setting does not work.)
This function performs refinement operation focusing on the relationship between two items. By applying this we can define a narrowing down between two or more items.
For example, you can define the relationship between "organization" and "affiliation", "affiliation" and "name" for the items "organization" "affiliation" and "name". At this time, if you select "Sales Department" for organization, "First Sales Department" "Second Sales Department" can be narrowed down to belonging. Furthermore, if you select "1st Sales Department", you can set so that "Tanaka" and "Sato" are narrowed down in the name.
At this time, please note that the organization is "head office", but belonging is blank and the name "Saito" can not be prepared. In this case, even if the organization is set as "sales department" and belonging is undecided, "Saito" will be displayed as a choice in the name column.Because the name is not narrowed down by "pair of organization and affiliation" but because it is narrowed down to "belonging" to the last.If belonging is undecided, "Saito" will be added to the choice in the name column no matter what the organization is.
In order to avoid this, prepare the affiliation of the dummy.For example, in the above example, you can solve it by preparing "(directly under the head office)" etc. as an affiliation to the organization "head office".
This function reads all the data of the narrowing-down source into the memory once and judges whether or not the condition matches one by one in the Java program.Therefore, it is unsuitable when large amount of narrowing source data.Please use the number narrowing down source ("sales department" in the above example) with a number (about several to dozens) enough to be displayed on the screen.
When including the model reference item set to narrow down on the list display screen, it is necessary to include the narrowing items also in the list display.(Taking FIG. 10 as an example, if you include the "Salesperson" item in the list display, also include "sales department" as the narrowing item in the list display.)