Advanced items for Coach Views

Advanced items are palette items that you can add to a Coach View to enhance its content. Unlike most of the items on the palette, advanced items are not Coach Views or variables.

Content box

A content box is a placeholder for content that a parent Coach View or Coach defines. A parent Coach or Coach View is one that contains the current Coach View. For example, you have a Coach View for customer information and you are using this customer information Coach View in a credit application Coach. If you put the extra fields and controls that you need for a credit application user interface into the customer information Coach View, noncredit application Coach Views or Coaches are less able to reuse the Coach View. Instead, provide a content box in the customer information Coach View. In the credit application Coach, place the extra fields and controls that are needed for the credit application into the content box. By providing a content box, the parent has an area for specific content while the customer information Coach View can remain generic so that you can reuse it for other Coach Views and Coaches.
Table 1. Content box in a Coach View and in a Parent Coach
Coach View Coach that contains the Coach View
Coach View with content box
Coach that contains the Coach View

In the Coach View itself, you cannot drop anything into a content box. When you open a Coach View or Coach that uses the content, you can drop palette items into the content box. Additionally, the content that you drop is specific to that instance of the Coach View. For example, if the parent Coach View or Coach that uses the content contains two instances of the Coach View, the elements outside of the content box are the same. However, the content boxes of the two instances are independent; therefore, updating one does not affect the other. This rule applies whether the instances are in the same parent Coach View or in different parent Coach Views.

You cannot add a content box to a Coach.

Custom HTML

Using a custom HTML item, you can add HTML code to add a Coach View.

With a custom HTML, you can add an HTML element or a set of elements to a Coach View, such as <div> and <label>. You can add the HTML code directly as static text, by using a managed file, or dynamically by binding it to a variable. The custom HTML item inserts the elements inside the <div> tag of the Coach View or service.
Note: When building Coaches using custom HTML blocks, ensure that the HTML segments within these blocks are not too large. Custom HTML blocks are designed for use with small to moderate-sized HTML segments. If you provide an HTML segment that is too large, you might see a stack overflow exception. In this case, you should reduce the size of the HTML segment that you are using within your Coach. See Configuring the JVM in the WebSphere Application Server product information.
Restriction: If your custom HTML item is within a repeating control such as a table or section, do not bind it to a variable that is a property within a list item. Normally, the code generator inserts the custom HTML contents as HTML code when it creates the page. However, repeating controls are bound to a list. Because the list contents are not set until runtime, the code generator cannot determine the index of the variable in the list when it creates the page. If you want text that changes dynamically, consider using a control such as Output Text that is bound to the variable.
Important: Do not use the following names as CSS class names in your HTML source code because they are reserved names:
  • CoachView
  • ContentBox

If you are using a custom HTML item in a container such as the table, tab, horizontal section, and vertical section stock controls, wrap the HTML code within a <div> tag. By wrapping the HTML code, the container treats all of the HTML code as a single entity.

Tip: If you want to insert a script, add it using inline scripts on the Behavior page of the view instead of adding it using a custom HTML item.