History Taglib

1.- Specification

1.1.- Definition of structure

2.- Explanation
3.- Examples

1.- Specification

1.1.- Definition of structure

historyElement ::=
	<prefix:history [historyAttributes]>
		{ levelElement }
	</prefix:history>

displayElement ::=
	<prefix:display>

historyAttributes ::=
	[displayHere = "true | false"]
	[target = "targetFrame"]
styleAttributes |
styleSheetAttributes

styleAttributes ::=
	style="default"

styleSheetAttributes ::=
stylesheet="pathToXSLFile"

levelElement ::=
 	businessElement |
	projectElement |
	moduleElement |
	pageElement

businessElement ::=
	<prefix:business levelAttributes>

projectElement ::=
	<prefix:project levelAttributes>

moduleElement ::=
	<prefix:module levelAttributes>

pageElement ::=
	<prefix:page pageLevelAttributes>

levelAttributes ::=
	[show = "true | false"
	[display = "text"]
	[jspPage = "jspPageName"]
	[queryString = "httpQueryString"]
	[active = "true | false"]

pageLevelAttributes ::=
	level = "levelNumber"
	levelAttributes

2.- Explanation

Tag: <history:history /> (net.project.taglibs.history.HistoryTag)

Example os usage:

<history:history />
<history:history style=”default” />
<history:history styleSheet=”pathtoXSLfile” />

The style attribute indicates that the history should be drawn has HTML in the default manner. This attribute may be omitted. The stylesheet attribute indicates it is to be returned translated from XML using the specified XSL file.

Attributes:

displayHere:

required: no
rtexprvalue: yes

The default value of this attribute is true.

  • true: Display the history HTML/translated XML at the current position in the JSP page.
  • false: Do not display the history HTML/translated XML at the current position. To draw the history later we should use the <display> element.

target:

required: no
rtexprvalue: yes

Specifies the target frame that all URLs should point to. This is not a persistent attribute – it only affects the rendering of the history on the page it is included.

style:

required: no
rtexprvalue: yes

At this moment we only can have the value "default" (which is in fact the default value).

stylesheet:

required: no
rtexprvalue: yes

Path to a XSL file. This XSL will be used to make the output code.

Tag: <history:display /> (net.project.taglibs.history.DisplayTag)

<history:display>

This is used to display the history. The history can be defined lexically anywhere in the JSP document then displayed at any point using the above tag. This is simply a convenience to avoid history definition from cluttering the JSP at the point it is required to be displayed.

Tag: <history:business /> (net.project.taglibs.history.BusinessTag)

Tag: <history:project /> (net.project.taglibs.history.ProjectTag)

Tag: <history:enterprise /> (net.project.taglibs.history.EnterpriseTag)

<history:business ...>
<history:project ...>
<history:module ...>

This sets the text and href for a particular entry in the history. It has the following effects:

  • Resets all history below the specified level
  • Sets the higher level history entry to active
  • By default makes the inserted history entry inactive by default

Attributes:

show:

required: no
rtexprvalue: yes

true (default) – shows this level. If the display name is null, it will be displayed as an empty string.
false – do not show this level.

display:

required: no
rtexprvalue: yes

The text to display for this history entry.

jspPage :

required: no
rtexprvalue: yes

The JSP page to navigate to when the history entry is clicked (when active).

queryString:

required: no
rtexprvalue: yes

The query String to pass along with the jspPage when the history entry is clicked.

active:

required: no
rtexprvalue: yes

true – makes the history entry active.
false – makes the history entry inactive (default).

Tag: <history:page /> (net.project.taglibs.history.PageTag)

<history:page level="..." ...>

Same as business / project / module except that an arbitrary number of <page> elements may be included.

Attributes:

level:

required: no
rtexprvalue: yes

A number representing the level we are dealing with.