org.hdpagination.web.taglib
Class GoToPageTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by org.hdpagination.web.taglib.AbstractPaginationControlTag
          extended by org.hdpagination.web.taglib.GoToPageTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class GoToPageTag
extends AbstractPaginationControlTag

This JSP Tag is used to render a text box along with either a submit button, hyperlink, or image link. The button, hyperlink, or image link is used to submit the request and navigate to the page specified in the text box. The decision to render the button, hyperlink, or image link relies on the following rule:

If property 'imgSrc' is specified, then an image link (<img> tag with enclosing <a> tag) is rendered. Otherwise, if property 'linkLabel' is specified, the hyperlink (text with enclosing tag <a>) is rendered. If none of these are specified, the button is rendered by default.

Since:
1.0
Author:
Liangfeng Ren
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.hdpagination.web.taglib.AbstractPaginationControlTag
actionId, resendParams
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GoToPageTag()
           
 
Method Summary
protected  java.lang.String generateHTML(Page page)
          Generate HTML code of Pagination Control
 void setAccesskey(java.lang.String accesskey)
          Access key that, when pressed, transfers focus to this element (button, hyperlink, or image link).
 void setButtonLabel(java.lang.String buttonLabel)
          Set label of submit button.
 void setExceedMaxPageAlert(java.lang.String exceedMaxPageAlert)
          Set the alert message which is displayed when page number typed in the text box is greater than total pages.
 void setImgHeight(java.lang.String imgHeight)
          Specifies the height (pixels %) of the image.
 void setImgSrc(java.lang.String imgSrc)
          Absolute or relative URL of the image to be displayed for the image link.
 void setImgStyle(java.lang.String imgStyle)
          Specifies an inline style for the image.
 void setImgStyleClass(java.lang.String imgStyleClass)
          Specifies a classname for the image.
 void setImgWidth(java.lang.String imgWidth)
          Specifies the width (pixels %) of the image.
 void setInvalidPageAlert(java.lang.String invalidPageAlert)
          Set the alert message which is displayed when an invalid integer number is typed in the text box.
 void setLinkLabel(java.lang.String linkLabel)
          Set the text label for the hyperlink if rendered.
 void setStyle(java.lang.String style)
          Specifies an inline style for the element (button, hyperlink, or image link).
 void setStyleClass(java.lang.String styleClass)
          Space-separated list of CSS style class(es) to be applied when the element (button, hyperlink, or image link) is rendered.
 void setTabindex(java.lang.String tabindex)
          Position of the element (button, hyperlink or image link) in the tabbing order for the current document.
 void setTextAccesskey(java.lang.String textAccesskey)
          Access key that, when pressed, transfers focus to this element (text box).
 void setTextMaxlength(java.lang.String textMaxlength)
          The maximum number of characters that may be entered in the text box.
 void setTextSize(java.lang.String textSize)
          The number of characters used to determine the width of the text box.
 void setTextStyle(java.lang.String textStyle)
          Specifies an inline style for the text box.
 void setTextStyleClass(java.lang.String textStyleClass)
          Space-separated list of CSS style class(es) to be applied to the text box.
 void setTextTabindex(java.lang.String textTabindex)
          Position of text box in the tabbing order for the current document.
 void setTextTitle(java.lang.String textTitle)
          Advisory title information about markup elements generated for the text box.
 void setTitle(java.lang.String title)
          Advisory title information about markup elements generated for the element (button, hyperlink, or image link).
 
Methods inherited from class org.hdpagination.web.taglib.AbstractPaginationControlTag
doEndTag, setActionId, setResendParams
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GoToPageTag

public GoToPageTag()
Method Detail

setButtonLabel

public void setButtonLabel(java.lang.String buttonLabel)
Set label of submit button. The default value is "Go". This property will not take effect if property 'imgSrc' or 'linkLabel' is set and the button is not rendered in this case.

Parameters:
buttonLabel -

setStyleClass

public void setStyleClass(java.lang.String styleClass)
Space-separated list of CSS style class(es) to be applied when the element (button, hyperlink, or image link) is rendered.

Parameters:
styleClass -

setInvalidPageAlert

public void setInvalidPageAlert(java.lang.String invalidPageAlert)
Set the alert message which is displayed when an invalid integer number is typed in the text box.

Parameters:
invalidPageAlert -

setExceedMaxPageAlert

public void setExceedMaxPageAlert(java.lang.String exceedMaxPageAlert)
Set the alert message which is displayed when page number typed in the text box is greater than total pages.

Parameters:
exceedMaxPageAlert -

setTabindex

public void setTabindex(java.lang.String tabindex)
Position of the element (button, hyperlink or image link) in the tabbing order for the current document. This value must be an integer between 0 and 32767.

Parameters:
tabindex -

setTitle

public void setTitle(java.lang.String title)
Advisory title information about markup elements generated for the element (button, hyperlink, or image link).

Parameters:
title -

setLinkLabel

public void setLinkLabel(java.lang.String linkLabel)
Set the text label for the hyperlink if rendered. This property will not take effect if the property 'imgSrc' is set.

Parameters:
linkLabel -

setImgSrc

public void setImgSrc(java.lang.String imgSrc)
Absolute or relative URL of the image to be displayed for the image link. If specified, the image link will be rendered. Otherwise, hyperlink (if property 'linkLabel' is specified) or button is rendered. Refer to attribute 'src' in <img> HTML tag.

Parameters:
imgSrc -

setImgWidth

public void setImgWidth(java.lang.String imgWidth)
Specifies the width (pixels %) of the image. Refer to attribute 'width' in <img> HTML tag

Parameters:
imgWidth -

setImgHeight

public void setImgHeight(java.lang.String imgHeight)
Specifies the height (pixels %) of the image. Refer to attribute 'height' in <img> HTML tag

Parameters:
imgHeight -

setImgStyleClass

public void setImgStyleClass(java.lang.String imgStyleClass)
Specifies a classname for the image. Refer to attribute 'class' in <img> HTML tag

Parameters:
imgStyleClass -

setImgStyle

public void setImgStyle(java.lang.String imgStyle)
Specifies an inline style for the image. Refer to attribute 'style' in <img> HTML tag.

Parameters:
imgStyle -

setStyle

public void setStyle(java.lang.String style)
Specifies an inline style for the element (button, hyperlink, or image link).

Parameters:
style -

setAccesskey

public void setAccesskey(java.lang.String accesskey)
Access key that, when pressed, transfers focus to this element (button, hyperlink, or image link).

Parameters:
accesskey -

setTextStyleClass

public void setTextStyleClass(java.lang.String textStyleClass)
Space-separated list of CSS style class(es) to be applied to the text box. Refer to attribute 'class' in <input> HTML tag.

Parameters:
textStyleClass -

setTextStyle

public void setTextStyle(java.lang.String textStyle)
Specifies an inline style for the text box. Refer to attribute 'style' in <input> HTML tag.

Parameters:
textStyle -

setTextTabindex

public void setTextTabindex(java.lang.String textTabindex)
Position of text box in the tabbing order for the current document. This value must be an integer between 0 and 32767. Refer to attribute 'tabindex' in <input> HTML tag.

Parameters:
textTabindex -

setTextTitle

public void setTextTitle(java.lang.String textTitle)
Advisory title information about markup elements generated for the text box. Refer to attribute 'title' in <input> HTML tag.

Parameters:
textTitle -

setTextSize

public void setTextSize(java.lang.String textSize)
The number of characters used to determine the width of the text box. If not specified, the default value is "2". Refer to attribute 'size' in <input type="text" > HTML tag.

Parameters:
textSize -

setTextMaxlength

public void setTextMaxlength(java.lang.String textMaxlength)
The maximum number of characters that may be entered in the text box. Refer to attribute 'maxlength' in <input type="text" > HTML tag.

Parameters:
textMaxlength -

setTextAccesskey

public void setTextAccesskey(java.lang.String textAccesskey)
Access key that, when pressed, transfers focus to this element (text box). Refer to attribute 'accesskey' in <input> HTML tag.

Parameters:
textAccesskey -

generateHTML

protected java.lang.String generateHTML(Page page)
Description copied from class: AbstractPaginationControlTag
Generate HTML code of Pagination Control

Specified by:
generateHTML in class AbstractPaginationControlTag
Parameters:
page - page Page instance containing pagination related information.
Returns:


Copyright © 2008 HDPagination All Rights Reserved.