HTML offers authors several mechanisms for specifying lists of information. Lists contain one or more list elements. Lists may contain:

CItemList is the WebComponent equivalent for building such lists.

The CItemList entries may simple consists either of Strings or any kind of WebComponents. CItemLists may also be nested and different list types may be used together, as in the following example, which is a ordered list that contains an unordered list.


This example shows how to create a unordered list nested into an ordered List. The ordered List entries are WebComponents, while the inner list is filled with Strings. It is also shown how the first entry of a inner list could be displayed as list header, which then appears as item entry of the outer list.

  private void initialiseCItemList1() throws Exception {
    this.add( cItemList1, WebBorderLayout.CENTER );
    cItemList1.setListKind( "ordered" );
    cItemList1.setName( "cItemList1" );
    cItemList1.getStyle().setFontFamily( "arial" );
    cItemList1.getStyle().setFontSize( 8 );

  private void initialiseCItemList2() throws Exception {
    cItemList1.add( cItemList2 );
    cItemList2.setFirstItemHead( true );
    cItemList2.addItem( "ItemEntry1" );
    cItemList2.addItem( "subEntry2" );
    cItemList2.addItem( "subEntry3" );
    cItemList2.setName( "cItemList2" );
    cItemList2.setType( "square" );

  private void initialiseWebLabel2() throws Exception {
    cItemList1.add( webLabel2 );
    webLabel2.setName( "webLabel2" );
    webLabel2.setValue( "itemEntry2" );

API documentation

The API documentation for CListItem can be found here.