 |
Control API for Breadcrumb (breadCrumb)
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.
- 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.
- 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.
- size
Defines the text size of the breadCrumb.
Possible values are:
- LARGE
Double the standard textsize.
- MEDIUM
Standard textsize.
- SMALL
Half of the standard textsize.
| Attribute |
Req. |
Values |
Default |
Case sens. |
JSP Taglib |
Classlib |
| behavior |
no |
DEFAULT
SINGLELINK |
DEFAULT |
yes |
behavior="DEFAULT" |
setBehavior
(BreadCrumbBehavior.DEFAULT) |
| id |
yes |
String |
none |
yes |
id="OrderConfirm" |
setId("OrderConfirm") |
| model |
no |
String |
none |
yes |
model="bean.model" |
setModel((IListModel) model)
|
| nameOfKeyColumn |
no |
String |
none |
no |
nameOfKeyColumn="col1" |
setNameOfKeyColumn("col1") |
| tooltip |
no |
String |
none |
no |
tooltip="Confirm order" |
setTooltip("Confirm order") |
| size |
no |
LARGE
MEDIUM
SMALL |
none |
yes |
size="MEDIUM" |
setSize(BreadCrumbSize.MEDIUM) |
| Events |
Req. |
Values |
Default |
Case sens. |
JSP Taglib |
Classlib |
| onClick |
no |
String |
none |
yes |
onClick="ProcessCrumb" |
setOnClick("ProcessCrumb") |
breadCrumbItem
Defines the items in the breadCrumb instead of the model.
Recommendation:
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.
| Attribute |
Req. |
Values |
Default |
Case sens. |
JSP Taglib |
Classlib |
| key |
yes |
String |
none |
no |
key="EVK1" |
addItem("EVK1","1stVisitedPage")
|
| value |
yes |
String |
none |
no |
value="1stVisitedPage" |
see line above |
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>
Example 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

|
|