Difference between revisions of "PrF UG forms custom instancerow"

From Protege Wiki
Jump to: navigation, search
Line 8: Line 8:
 
show all the slot values for any instance that is a value of the slot.
 
show all the slot values for any instance that is a value of the slot.
  
<div>[[Image:PrF_UG_forms_instancerowwidget.png|forms_instancerowwidget]]</div>
+
<div>[[Image:PrF_UG_forms_instancerowwidget.png|frame|none|
 +
      InstanceRowWidget]]</div>
  
 
You can perform the standard customizations:
 
You can perform the standard customizations:
Line 59: Line 60:
 
     Click the <b>Define columns of instance table</b> tab.
 
     Click the <b>Define columns of instance table</b> tab.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_forms_instancetable_definecolumns.png|forms_instancetable_definecolumns]]</div>
+
     <div>[[Image:PrF_UG_forms_instancetable_definecolumns.png|frame|none|
 +
          Configure Widget dialog, Define columns of instance table tab]]</div>
  
 
   <li><p>
 
   <li><p>
Line 70: Line 72:
 
     To remove a column,
 
     To remove a column,
 
     click in its <b>Column Name</b> and click the <b>Remove the currently selected column</b>
 
     click in its <b>Column Name</b> and click the <b>Remove the currently selected column</b>
     [[Image:PrF_UG_all_object.remove.gif|all_object.remove]] button.
+
     ([[Image:PrF_UG_all_object.remove.gif|all_object.remove]]) button.
 
     </p>
 
     </p>
  
Line 81: Line 83:
 
     To add a column,
 
     To add a column,
 
     click the <b>Add one or more slots to the list of columns</b>
 
     click the <b>Add one or more slots to the list of columns</b>
     [[Image:PrF_UG_all_object.add.gif|all_object.add]] button.
+
     ([[Image:PrF_UG_all_object.add.gif|all_object.add]]) button.
 
     The column will be added after all the existing columns.
 
     The column will be added after all the existing columns.
 
     </p>
 
     </p>
Line 100: Line 102:
 
If you are allowing end-users to create new instances from this field,
 
If you are allowing end-users to create new instances from this field,
 
you can control various aspects of new instance creation.
 
you can control various aspects of new instance creation.
(If you do not want users to be able to create instances,
+
If you do not want users to be able to create instances,
 
disable the <b>Create Instance</b>
 
disable the <b>Create Instance</b>
[[Image:PrF_UG_inst_instance.create.gif|instances_instance.create]] button
+
([[Image:PrF_UG_inst_instance.create.gif|instances_instance.create]]) button
using the [[PrF_UG_forms_change_widget_config#Choosing_a_Widget_s_Buttons|Buttons tab]].)
+
using the [[PrF_UG_forms_change_widget_config#Choosing_a_Widget_s_Buttons|Buttons tab]].
  
 
<ol class='a'>
 
<ol class='a'>
Line 114: Line 116:
 
     Click the <b>New instances</b> tab.
 
     Click the <b>New instances</b> tab.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_forms_instancetable_newinstances.png|forms_instancetable_newinstances]]</div>
+
     <div>[[Image:PrF_UG_forms_instancetable_newinstances.png|frame|none|
 +
          Configure Widget dialog, New instances tab]]</div>
  
 
   <li><p>
 
   <li><p>
Line 130: Line 133:
 
       you may want to enable <b>Use in place editing</b>
 
       you may want to enable <b>Use in place editing</b>
 
       at the <b>In-place Editing Characteristics</b> tab.
 
       at the <b>In-place Editing Characteristics</b> tab.
       (Users can still edit the instance by clicking the <b>View Instance</b>
+
       </p>
       [[Image:PrF_UG_inst_instance.view.gif|instances_instance.view]] button.)
+
      <p>
 +
      <b>Note:</b>
 +
      Users can still edit the instance by clicking the <b>View Instance</b>
 +
       ([[Image:PrF_UG_inst_instance.view.gif|instances_instance.view]]) button.
 
       </p>
 
       </p>
 
    
 
    
Line 188: Line 194:
 
     Click the <b>In-place Editing Characteristics</b> tab.
 
     Click the <b>In-place Editing Characteristics</b> tab.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_forms_instancetable_editing.png|forms_instancetable_editing]]</div>
+
     <div>[[Image:PrF_UG_forms_instancetable_editing.png|frame|none|
 +
          Configure Widget dialog, In-place Editing Characteristics tab]]</div>
  
 
   <li><p>
 
   <li><p>
Line 228: Line 235:
 
     A menu is displayed:
 
     A menu is displayed:
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_forms_instancerow_inplace_choose.png|forms_instancerow_inplace_choose]]</div>
+
     <div>[[Image:PrF_UG_forms_instancerow_inplace_choose.png|frame|none|
 +
          instance selection menu]]</div>
  
 
   <li><p>
 
   <li><p>
 
     Select <b>Choose...</b> to open the <b>Select Instance</b> dialog box.
 
     Select <b>Choose...</b> to open the <b>Select Instance</b> dialog box.
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_forms_select_instance.png|forms_select_instance]]</div>
+
     <div>[[Image:PrF_UG_forms_select_instance.png|frame|none|
 +
          Select Instance dialog]]</div>
  
 
   <li><p>
 
   <li><p>
Line 248: Line 257:
 
     A menu is displayed:
 
     A menu is displayed:
 
     </p>
 
     </p>
     <div>[[Image:PrF_UG_forms_instancerow_inplace_remove.png|forms_instancerow_inplace_remove]]</div>
+
     <div>[[Image:PrF_UG_forms_instancerow_inplace_remove.png|frame|none|
 +
          field selection menu]]</div>
  
 
   <li><p>
 
   <li><p>
Line 265: Line 275:
 
You can check the configuration of the widget at the <b>Warnings and Suggestions</b> tab.
 
You can check the configuration of the widget at the <b>Warnings and Suggestions</b> tab.
  
<div>[[Image:PrF_UG_forms_instancetable_warnings.png|forms_instancetable_warnings]]</div>
+
<div>[[Image:PrF_UG_forms_instancetable_warnings.png|frame|none|
 +
          Configure Widget dialog, Warnings and Suggestions tab]]</div>
  
 
</div>
 
</div>

Revision as of 13:51, October 21, 2008

Customizing an InstanceRowWidget or InstanceTableWidget


Protege-Frames User's Guide
Forms
Understanding Forms
Forms Tab
Form Browser
Form Buttons
Form Editor
Display Slot Menu
Selected Widget Type Menu
Widget Configuration Dialog
Form Configuration Dialog Box
Default Widget Types
Additional String Widgets
Instance Row and Table Widgets
Contains Widget
Direct Instances Widget
Global Characteristics
Moving or Resizing a Widget
Widget Configuration Properties
Selecting a Widget Display
Hiding a Widget
Customizing a Row or Table Widget
Customizing a Contains Widget
Using a Resource List Widget
Additional Widget Types
Glossary, Editing Help

InstanceRowWidget (Single Cardinality) and InstanceTableWidget (Multiple Cardinality) show all the slot values for any instance that is a value of the slot.

InstanceRowWidget

You can perform the standard customizations:

The Configure Widget dialog box for an InstanceRowWidget or InstanceTableWidget has the following additional customizations: Defining Columns, New Instances, In-place editing characteristics, Warnings and Suggestions.

Defining Columns

You can choose which slots to show in the widget and/or change the order in which they appear using the Define columns of instance table tab. Although the current implementation does not allow you to change the order directly by dragging, you can reorder the slots by first removing them from the widget, and then adding them back in the order in which you wish them to appear.

To add or remove slots, change their order, or change the name under which they are displayed:

  1. Double-click on the widget to open the Configure Widget dialog box.

  2. Click the Define columns of instance table tab.

    Configure Widget dialog, Define columns of instance table tab
  3. To make any modifications, you must click in the Column Name of the slot you wish to modify. (The top row, Slot Name, is a property of the slot and cannot be modified.)

  4. To remove a column, click in its Column Name and click the Remove the currently selected column (all_object.remove) button.

  5. To rename a column, edit the text in Column Name.

  6. To add a column, click the Add one or more slots to the list of columns (all_object.add) button. The column will be added after all the existing columns.

  7. To reorder columns, remove all the columns except the one you want to appear first, then add the other columns. For instance, to make date appear first in the example, you would delete the prototype, contents, and number_of_pages columns, then add any columns you wanted back in.

New Instances

If you are allowing end-users to create new instances from this field, you can control various aspects of new instance creation. If you do not want users to be able to create instances, disable the Create Instance (instances_instance.create) button using the Buttons tab.

  1. Double-click on the widget to open the Configure Widget dialog box.

  2. Click the New instances tab.

    Configure Widget dialog, New instances tab
  3. Select the basic options you want:

    • Display forms for newly-created instances: When enabled, the Instance Editor is automatically displayed whenever the end-user creates a new instance. This allows the user to define the properties of the instance immediately. If this option is disabled, you may want to enable Use in place editing at the In-place Editing Characteristics tab.

      Note: Users can still edit the instance by clicking the View Instance (instances_instance.view) button.

    • Automatically select newly created or added rows: When this option is enabled, the row corresponding to the new instance is automatically selected; again, this is useful if you allow in-place editing.

    • Always highlight selected row: This option is self-explanatory.

  4. Select the Prototype Depth to control how the values in this field are copied if the instance that contains this field is copied:

    • Shallow Copy: If the containing instance is copied, the copy has the same instance(s) as values for this field that the original does.

    • Depth 1 Copy: If the containing instance is copied, the value(s) of this field will be shallow copies of the original instances in this field. For example, if this field contains three instances and the containing instance is copied, the new instance will have three new instances at this field; they will be identical to the previous instances except for the name.

    • Deep Copy: New instances are created for each instance in the field and for any additional referenced instances. See What is a Deep Copy? for more information.

In-Place Editing Characteristics

  1. Double-click on the widget to open the Configure Widget dialog box.

  2. Click the In-place Editing Characteristics tab.

    Configure Widget dialog, In-place Editing Characteristics tab
  3. Select the options you want:

    • Use in place editing: This allows the user to edit a value directly in the instance table.

    • Use a dialog panel to select classes: If the instance values of the field have fields of type Class, enabling this means that double-clicking in the field displays a menu which allows the user to select a class.

    • Use a dialog panel to select instances: If the instance values of the field have fields of type Instance, enabling this means that double-clicking in the field displays a menu which allows the user to select a class. You may want to enable this if Display forms for newly-created instances is disabled at the New Instances tab.

Example: using the dialog panel to select instances

If Use a dialog panel to select instances is enabled, then the user can select an instance as follows:

  1. Double-click in the instance field. A menu is displayed:

    instance selection menu
  2. Select Choose... to open the Select Instance dialog box.

    Select Instance dialog
  3. Select the class and instance you want and click OK.

If the field already contains a value, the user can change it in the same manner:

  1. Double-click in the instance field. A menu is displayed:

    field selection menu
  2. Select Choose... to open the Select Instance dialog box. You can also choose View... to display the Instance Editor for this instance, or Remove to clear the field.

  3. Select the class and instance you want and click OK.

Warnings and Suggestions

You can check the configuration of the widget at the Warnings and Suggestions tab.

Configure Widget dialog, Warnings and Suggestions tab