org.hdpagination.web.jsf.tag
Class GoToPageTag

java.lang.Object
  extended by javax.faces.webapp.UIComponentTagBase
      extended by javax.faces.webapp.UIComponentClassicTagBase
          extended by javax.faces.webapp.UIComponentTag
              extended by org.hdpagination.web.jsf.tag.AbstractBaseTag
                  extended by org.hdpagination.web.jsf.tag.GoToPageTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspIdConsumer, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class GoToPageTag
extends AbstractBaseTag

This JSF 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.1
Author:
Liangfeng Ren

Field Summary
 
Fields inherited from class javax.faces.webapp.UIComponentClassicTagBase
bodyContent, pageContext, UNIQUE_ID_PREFIX
 
Fields inherited from class javax.faces.webapp.UIComponentTagBase
log
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Constructor Summary
GoToPageTag()
           
 
Method Summary
 java.lang.String getComponentType()
           
 java.lang.String getRendererType()
           
 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 setProperties(javax.faces.component.UIComponent component)
           
 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.
 
Methods inherited from class org.hdpagination.web.jsf.tag.AbstractBaseTag
setAccesskey, setPagiDefinitionId, setStyle, setStyleClass, setTabindex, setTitle
 
Methods inherited from class javax.faces.webapp.UIComponentTag
createComponent, getParentUIComponentTag, hasBinding, isSuppressed, isValueReference, release, setBinding, setRendered
 
Methods inherited from class javax.faces.webapp.UIComponentClassicTagBase
addChild, addFacet, addVerbatimAfterComponent, addVerbatimBeforeComponent, createVerbatimComponent, createVerbatimComponentFromBodyContent, doAfterBody, doEndTag, doInitBody, doStartTag, encodeBegin, encodeChildren, encodeEnd, findComponent, getBodyContent, getComponentInstance, getCreated, getCreatedComponents, getDoAfterBodyValue, getDoEndValue, getDoStartValue, getFacesContext, getFacesJspId, getFacetName, getId, getIndexOfNextChildTag, getJspId, getParent, getParentUIComponentClassicTagBase, getPreviousOut, setBodyContent, setId, setJspId, setPageContext, setParent, setupResponseWriter
 
Methods inherited from class javax.faces.webapp.UIComponentTagBase
getELContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, setPageContext, setParent
 

Constructor Detail

GoToPageTag

public GoToPageTag()
Method Detail

getRendererType

public java.lang.String getRendererType()
Specified by:
getRendererType in class javax.faces.webapp.UIComponentTagBase

getComponentType

public java.lang.String getComponentType()
Specified by:
getComponentType in class javax.faces.webapp.UIComponentTagBase

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 -

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 -

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 -

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 -

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 -

setProperties

public void setProperties(javax.faces.component.UIComponent component)
Overrides:
setProperties in class AbstractBaseTag


Copyright © 2008 HDPagination All Rights Reserved.