Thursday, March 6, 2014

The Component Interface, Keys and additional Guidelines

We mentioned earlier that keys are automatically created when creating the Component Interface and that there are three types of keys; Get, Find, and Create. Here is some more information on how these keys are produced.

Search Key Fields produces the following:
  •  Get key
  •  Find key
  •  Create key (if add mode allowed)

Alternate Search Keys produce the following:
  • Find key
  • There are specific rules/conditions for modifying keys
  • You can add or delete a Find key if it’s based on an alternate search key field.
  • You can add any type of key based on a qualifying search key field in the component
  • This is necessary only if a new search key field is added to the component after you create the component interface.

DELETING KEYS
You can delete any type of key if it’s underlying search key field meets one of these criteria:
  • It is no longer defined as a search key field.
  • It is no longer designated as a list box item.
  • It has been deleted from the component.

ADDITIONAL RULES/GUIDELINES
 
  • Typically, you do not want to expose Get keys or Create keys as properties, because these are set before a Get or Create operation and might be inadvertently changed. (Similar to Level 0 Fields on a page)
  • Make sure that you do not delete all the properties within the collection; that would result in an empty collection. If such empty collections exist, remove them; otherwise, they appear with X in the component interface view.
  • If your page does not support Add mode, then you should not expose the level-zero record of the component because it contains data that is not specific to the component interface that you are creating.
  • Do not expose fields that are not visible in the component view.
  • The component optimization code might eliminate unused fields from its buffers, which results in an error when that field is accessed by the component interface.

No comments:

Post a Comment