com.sapportals.htmlb

Class BreadCrumb

java.lang.Object
  extended bycom.sapportals.htmlb.Component
      extended bycom.sapportals.htmlb.BreadCrumb

public class BreadCrumb
extends Component

Title: BreadCrumb Control
Copyright 2004 SAP AG


Field Summary
static String UI_ID
           
 
Constructor Summary
BreadCrumb(String id)
          Creates BreadCrumb Object with specific id
 
Method Summary
 void addItem(String key, String text)
          Inserts a new item at the end of the list.
protected  IListModel createDefaultModel()
          Internal constructor for a default ListModel.
 BreadCrumbBehavior getBehavior()
          gets the behavior of the BreadCrump.
 Iterator getKeys()
          get an Iterator for all keys contained in this DropdownListBox
 IListModel getModel()
          get the model underlying this ListBox
 String getNameOfKeyColumn()
          get the name of the column that contains the keys.
 String getOnClick()
           
 BreadCrumbSize getSize()
          gets the size of the BreadCrump.
 String getTextForKey(String key)
          Returns the text of a ListBox item
 String getTooltip()
           
 String getUI()
          get a identification String for the renderer that is unique across all supported components.
 boolean requiresForm()
          check if a special component really requires a form around it.
 void setBehavior(BreadCrumbBehavior behavior)
          sets the behavior of the BreadCrump.
 void setModel(IListModel model)
          set the model for this ListBox
 void setNameOfKeyColumn(String nameOfKeyColumn)
          specify the name of the column that contains the keys.
 void setOnClick(String onClick)
           
 void setSize(BreadCrumbSize size)
          sets the size of the BreadCrump.
 void setTooltip(String tooltip)
           
 
Methods inherited from class com.sapportals.htmlb.Component
getEncodedIdForForm, getId, getParent, initFromPageContext, initFromShortId, initializeFromId, isJsObjectNeeded, preRender, render, renderAsString, setId, setJsObjectNeeded, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UI_ID

public static final String UI_ID
See Also:
Constant Field Values
Constructor Detail

BreadCrumb

public BreadCrumb(String id)
Creates BreadCrumb Object with specific id

Method Detail

getTooltip

public String getTooltip()
Returns:
text which is displayed when the mouse pauses over the BreadCrumb.

setTooltip

public void setTooltip(String tooltip)

getOnClick

public String getOnClick()
Returns:
onCLick event identifier

setOnClick

public void setOnClick(String onClick)

createDefaultModel

protected IListModel createDefaultModel()
Internal constructor for a default ListModel. protected so that subclasses can override

Returns:
a default model for the listbox

getModel

public IListModel getModel()
get the model underlying this ListBox

Returns:
the model

setModel

public void setModel(IListModel model)
set the model for this ListBox

Parameters:
model - the model

getNameOfKeyColumn

public String getNameOfKeyColumn()
get the name of the column that contains the keys. Used if you use an underlying table in the model

Returns:
the name/identifier of the key column

setNameOfKeyColumn

public void setNameOfKeyColumn(String nameOfKeyColumn)
specify the name of the column that contains the keys. Used if you use an underlying table in the model

Parameters:
nameOfKeyColumn - the name/identifier of the key column

getUI

public String getUI()
get a identification String for the renderer that is unique across all supported components. E.g. you could simply return the class name of the component class. The reason for using a separate method and not some internal reflection method is that you can more easily extend the functionality or your Component class without having to rewrite the view class.

Specified by:
getUI in class Component
Returns:
a unique identification string for this Component

addItem

public void addItem(String key,
                    String text)
Inserts a new item at the end of the list. You can't use this method, if you are using a JCo Table (see com.sapportals.htmlb.JCOListModel)

Parameters:
key - The key name of the item
text - The text displayed in the ListBox

getTextForKey

public String getTextForKey(String key)
Returns the text of a ListBox item

Parameters:
key - The key of ListBox item
Returns:
The text

getKeys

public Iterator getKeys()
get an Iterator for all keys contained in this DropdownListBox

Returns:
an Iterator for the keys

getSize

public BreadCrumbSize getSize()
gets the size of the BreadCrump. There are three sizes available: SMALL, MEDIUM and LARGE. MEDIUM is the default value.

Returns:
the size of the BreadCrump

setSize

public void setSize(BreadCrumbSize size)
sets the size of the BreadCrump. There are three sizes available: SMALL, MEDIUM and LARGE. MEDIUM is the default value.

Parameters:
size - the size of the BreadCrump

getBehavior

public BreadCrumbBehavior getBehavior()
gets the behavior of the BreadCrump.

Returns:
the behavior of the BreadCrump

setBehavior

public void setBehavior(BreadCrumbBehavior behavior)
sets the behavior of the BreadCrump. There are two behaviors: If there is no event handler set, the BreadCrumb is shown in an inactive state.

Parameters:
behavior - the behavior of the BreadCrump

requiresForm

public boolean requiresForm()
Description copied from class: Component
check if a special component really requires a form around it. Subclasses should override this if they do not require a form.

Basically, any Component that is capable of firing a server side event or that contains user input must be placed in a form.

Overrides:
requiresForm in class Component
Returns:
true if the component must be placed in a form.


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.