2.8.2. An undefined component

An undefined component formally does not exist. It is only a place, where we can (but do not have to) assign a component created in the application. The main tags are named {component}...{/component} and have to contain an id parameter that tells, what block the engine must take the component from.

Example 2.66. An undefined component

{component id="$list" name="interests"}
  {param name="selected" value="$selected"/}
  {listItem name="1" value="Cars"/}
  {listItem name="2" value="Sports"/}
  {listItem name="3" value="Computers"/}

  {onMessage message="msg" position="up"}
    <p>Error: {@msg}</p>
  {/onMessage}
{/component}

Now, if we assing a selectComponent object to the $list block, there will be displayed select-style list. If we assign a component called (for example) radioListComponent, there will be a group of radio inputs that simulate the list. Both of them will take the same settings given by the undefined component. If the $list block is null, nothing is displayed.