 |
Control API for Tray (tray)
Similar to group the tray allows grouping
of controls. The 'tray' allows additional functionality like collapsing/expanding
- similar to the behavior of windows on your Microsoft Windows desktop.
Be aware that portal components (components that will run in the SAP portal)
are placed in a tray by the portal.
- design
The design of the tray can be
- BORDER
The tray has a title bar and the panel has a frame that defines
the size.
- BORDERLESS
The tray has only a title bar.
- FORM
The tray has a title bar. The panel is filled with a background
color. The color is different from the title background color.
- TEXT
The tray has a title bar. The panel is filled with the same background
color as the title bar.
- id
Identification name of the tray.
- isCollapsed
A boolean value that if "true"
shows only the title bar. As indicator that the tray is collapsed, the
collapsed symbol is displayed. When
clicking on this symbol the 'onExpand' event is fired.
- onCollapse
Defines the action that will be processed
when the user clicks on the collapse symbol .
If the attribute is set to a <%=null %> string or the attribute
is omitted the symbol is not displayed in the title bar.
- onEdit
Defines the action that will be processed
when the user clicks on the collapse symbol .
If the attribute is set to a <%=null %> string or the attribute
is omitted the symbol is not displayed in the title bar.
- onExpand
Defines the action that will be processed
when the user clicks on the expand symbol .
This symbol can be actives only when 'isCollapsed' is set to "true".
If the attribute is set to a <%=null %> string or the attribute
is omitted the symbol is not displayed in the title bar.
- onRemove
Defines the action that will be processed
when the user clicks on the expand symbol .
If the attribute is set to a <%=null %> string or the attribute
is omitted the symbol is not displayed in the title bar.
- title
Defines the string of text placed
left aligned in the title bar. If no title should be displayed an empty
string (null) can be used. The width of the tray is automatically adjusted
to the length of the text when the 'width' attribute is set smaller
than the title text width.
- tooltip
Defines the hint of the tray which
is displayed as the mouse cursor passes over the tray,
or as the mouse button is pressed but not released.
- width
Defines the width of the tray. The
width of the button is automatically adjusted to the length of the 'title'.
To see an effect of the 'width' attribute 'width' has to be set higher
as the width defined thru the length of the 'title' string. If an empty
(null) 'title' string is set no 'title' attribute is defined the width
of the tray is set according to the 'width' attribute.
| Attribute |
req. |
values |
default |
case sens. |
JSP taglib |
classlib |
| design |
no |
BORDER
BORDERLESS
FORM
TEXT |
BORDER |
yes |
design="BORDERLESS" |
setDesign(TrayDesign.BORDERLESS) |
| id |
yes |
String |
none |
yes |
id="Intro_Text" |
|
| isCollapsed |
no |
FALSE
TRUE |
FALSE |
yes |
isCollapsed="TRUE" |
setCollapsed(true) |
| title |
no |
String |
none |
no |
title="Headlines" |
setTitle("Headlines") |
| tooltip |
no |
String |
none |
no |
tooltip="latest
news" |
setTooltip("latest
news") |
| width |
no |
Unit |
50% |
no |
width="300" |
setWidth("300") |
| events |
req. |
values |
default |
case sens. |
JSP taglib |
classlib |
| onCollapse |
no |
String |
none |
yes |
onCollapse("ev_Col") |
setOnCollapse("ev_Col") |
| onEdit |
no |
String |
none |
yes |
onEdit("ev_Ed") |
setOnEdit("ev_ed") |
| onExpand |
no |
String |
none |
yes |
onExpand("ev_Ex") |
setOnExpand("ev_Ex") |
| onRemove |
no |
String |
none |
yes |
onRemove("ev_Re") |
setOnRemove("ev_Re") |
trayBody
Defines the items in the tray. A tray can be filled with any any control
(checkbox, image, textView etc.).
Example
<hbj:tray
id="HeadlineNews"
design="BORDER"
title="latest Headlines"
tooltip="all the news you need"
onEdit="ev_hd_edit"
onRemove="ev_hd_rem"
width="25%"
>
<hbj:trayBody>
<hbj:textView
encode="true"
text="The NASDAQ on an upswing<br>Good news for homeowners" />
</hbj:trayBody>
</hbj:tray>
Result
|
|