Show TOC Start of Content Area

Object documentation Breadcrumb  Locate the document in its SAP Library structure

Definition

The breadCrumb represents the sequence of the visited pages (remember the story of Hansel + Gretel). It informs the user about his actual position in your application and allows easy navigation back to start page. An item in the breadCrumb chain is called breadCrumbItem. BreadCrumbItems can be defined with models or manually.

If the breadCrumb line becomes longer than the web client window it is word wrapped like a text line - if there is no word separator in the breadCrumbItem value string, the line is not wrapped.

·        behavior
The breadCrumb can behave as a

DEFAULT
Each breadCrumbItem can be linked independently.

SINGLELINK
The entire breadCrumb string is a single link.

·        id
Identification name of the breadCrumb.

·        model
Defines the model or bean which provides the breadCrumb with data.
See also IListModel.

·        nameOfKeyColumn
Specifies the name of the column that contains the key. This is used when you use an underlying table in the model.

·        onClick
Defines the event handling method that will be processed when the user clicks on the breadcrumb. The BreadCrumbEventClick object allows access to the key, which breadCrumb element had been clicked and allows the definition of parameters.

·        size
Defines the text size of the breadCrumb. Possible values are:

¡        LARGE
Double the standard text size.

¡        MEDIUM
Standard text size.

¡        SMALL
Half of the standard text size.

·        tooltip
Defines the hint of the button which is displayed as the mouse cursor passes over the button, or as the mouse button is pressed but not released.

 

Attributes

M

Values

Usage

behavior

 

DEFAULT (d)

SINGLELINK

Taglib
behavior="SINGLELINK"

Classlib
setBehavior(BreadCrumbBehavior.
            SINGLELINK)

id

*

String (cs)

Taglib
id="OrderConfirm"

Classlib
setId("OrderConfirm")

model

 

String (cs)

Taglib
model="bean.model"

Classlib
setModel ((IListModel) model)

name
OfKey
Column

 

String

Taglib
nameOfKeyColumn="col1"

Classlib
setNameOfKeyColumn("col1")

tooltip

 

String

Taglib
tooltip="Confirm order"

Classlib
setTooltip("Confirm order")

size

 

LARGE

MEDIUM

SMALL

Taglib
size="MEDIUM"

Classlib
setSize(BreadCrumbSize.MEDIUM)

 

Events

M

Values

Usage

onClick

 

String (cs)

 

Taglib
onClick="ProcessCrumb"

Classlib
setOnClick("ProcessCrumb")

 

breadCrumbItem

Defines the items in the breadCrumb instead of the model.

Note

We strongly recommend models to supply the breadCrumb with data.

key
A string which is passed on to the event handling routine when the event occurs. A key string has to be defined and must not be empty.
If the attribute 'behavior' is set to "SINGLELINK" the 'key' is set to "null" when passed on to the event handling routine.

value
Defines the text string displayed in the breadCrumb. A value string has to be defined and must not be empty.

 

Attributes

M

Values

Usage

key

*

String (cs)

 

Taglib
key="EVK1"

Classlib
addItem ("EVK1","1stVisitedPage")

value

*

String

Taglib
value="1stVisitedPage"

Classlib
addItem ("EVK1","1stVisitedPage")

 

BreadCrumbClickEvent

Allows access to the event fired by the breadCrumb control.

setParams
Set the parameters for the HTML page. The parameters depend on the nature of the event. For example, table related events can include row and column id. The setParams method is inherited from the com.sapportals.htmlb.event.Event class. See the HTMLB Javadoc - Class "Event" for more details on how to set parameters for the HTML page and how to have access.

getKey
Returns the key of the breadCrumb control element, that has been clicked.

 

Example

using the taglib

    <hbj:breadCrumb
         id=
"myNavigation"
         
tooltip="Navigation and orientation in the application"
         
onClick="ProcessbreadCrumbClick"
         
size="SMALL"
         
>
            <hbj:breadCrumbItem key =
"EVK1" value="MainLevel"  />
            <hbj:breadCrumbItem key =
"EVK2" value="1stLevel"   />
            <hbj:breadCrumbItem key =
"EVK3" value="2ndLevel"   />
            <hbj:breadCrumbItem key =
"EVK4" value="3rdLevel"   />

    
</hbj:breadCrumb>

 

using the classlib

    Form form = (Form)this.getForm();
    BreadCrumb bc = 
new BreadCrumb("myNavigation");
    bc.addItem(
"EVK1""MainLevel");
    bc.addItem(
"EVK2""1stLevel");
    bc.addItem(
"EVK3""2ndLevel");
    bc.addItem(
"EVK4""3rdLevel");
    bc.setSize(BreadCrumbSize.MEDIUM);
    bc.setTooltip(
"Navigation and orientation in the application");
    bc.setOnClick(
"ProcessbreadCrumbClick");
    form.addComponent(bc);

 

 

Result

This graphic is explained in the accompanying text

 

End of Content Area