Embedding a Component in a Component not only makes for a more streamlined-looking Component – it also hides the controls of the embedded Component from anyone who might get a look at the “host” Component.

Observe as the instructor embeds the MainButtons Component inside the login Component.

  1. Return to the login Component.
  2. Delete all the controls in Panel Card: PANEL_APPLICATION, and highlight its opening tag.
  3. In the Other Controls group, click EmbeddedObject.
  4. The Insert EmbeddedObject window appears.

Choose the MainButtons Component as shown here, and then click OK in this window:

  1. Alpha Anywhere embeds the MainButtons Component into the PANEL_APPLICATION control, as shown here:

  1. To protect the EmbeddedObject control even more from being seen by unauthenticated users, we should make sure it is not compiled and available until its Panel Card appears.

Mark the checkbox for the Delay render till visible Property, as shown here:

  1. Save the login Component.
  2. Finally, we should make sure that a user must log in to see the EmbeddedObject control.
    1. Make the Web Projects Control Panel active.
    2. Right-click the MainButtons file name.
    3. In the box that appears, choose Component Security, and then Requires login. A Groups dialog box appears:

    1. Mark checkboxes of all Groups, and click OK.
  1. Publish the application, selecting to publish “All files in project”. This time, mark the checkbox shown here:

Now you add an EmbeddedObject to your login Component, secure it, and modify the settings as done above.

Then, publish the application.