com.arsdigita.acs.html
Class ContextBar
java.lang.Object
|
+--com.arsdigita.acs.html.ContextBar
- public class ContextBar
- extends java.lang.Object
Class that displays a Yahoo-style context navbar for a logged-in
user, with "your workspace" at the root; or with the system name
at the root for non-logged in users.
Elements are added to the context bar in order; each element consists
of a path to be used as a relative URL link, and the title to be displayed
as a link to that path. The last element added to the context bar is
the title of the current page, and a path should not be provided.
|
Field Summary |
static java.lang.String |
cvsId
|
|
Constructor Summary |
ContextBar()
Creates a new context bar. |
|
Method Summary |
ContextBar |
add(java.lang.String title)
Adds a new element to the context bar with no path, for final
element. |
ContextBar |
add(java.lang.String[][] pairs)
Adds a new element to the context bar with no path, for final
element. |
ContextBar |
add(java.lang.String path,
java.lang.String title)
Adds a new element to the context bar. |
ContextBar |
add(Url path,
java.lang.String title)
Adds a new element to the context bar. |
java.lang.String |
getHTML()
Returns HTML represenation of this context bar. |
java.lang.String |
toString()
Returns HTML represenation of this context bar. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
cvsId
public static final java.lang.String cvsId
ContextBar
public ContextBar()
throws java.sql.SQLException
- Creates a new context bar. Takes the pageContext object and tries
to figure out whether we're on an admin page, or whether the user
is logged in or not. If type is DEFAULT, also tries to grok
the package information.
add
public ContextBar add(Url path,
java.lang.String title)
- Adds a new element to the context bar.
- Parameters:
path - Relative URL to appear in hreftitle - Title for this page- Returns:
- this ContextBar, useful for chaining multiple adds together.
add
public ContextBar add(java.lang.String path,
java.lang.String title)
- Adds a new element to the context bar.
- Parameters:
path - Relative URL to appear in hreftitle - Title for this page- Returns:
- this ContextBar, useful for chaining multiple adds together.
add
public ContextBar add(java.lang.String title)
- Adds a new element to the context bar with no path, for final
element.
- Parameters:
title - Title for this page- Returns:
- this ContextBar, useful for chaining multiple adds together.
add
public ContextBar add(java.lang.String[][] pairs)
- Adds a new element to the context bar with no path, for final
element.
- Parameters:
title - Title for this page- Returns:
- this ContextBar.
getHTML
public java.lang.String getHTML()
- Returns HTML represenation of this context bar.
- Returns:
- HTML context bar
toString
public java.lang.String toString()
- Returns HTML represenation of this context bar.
- Overrides:
toString in class java.lang.Object
- Returns:
- HTML context bar