ScrollableModelTag Class

com.beasys.commerce.ebusiness.tags
ScrollableModelTag Class

public class ScrollableModelTag

    extends TagSupport

This tag helps with the navigation of a scrollable model by outputting a "Previous | 20-29 | Next" text with the proper hyperlinks based on the attributes of the tag.
Those attributes are:

  1. origin: the page from which this tag originates, for use by the WebFlow engine
  2. event: the event from a WebFlow engine view
  3. prevString: the JSP entered "Previous" in the language of choice
  4. nextString: the JSP entered "Next" in the language of choice
  5. pageIndex: the index of the page in the scrollable model one views.
The ScrollableModel is obtained from the pipeline session directly.


Hierarchy
Object
  TagSupport
    ScrollableModelTag
All Implemented Interfaces

IterationTag, Serializable, Tag

Field Summary

   
Fields from  javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 

Constructor Summary

ScrollableModelTag()

 

Method Summary

public int
doStartTag()
The tag body:
It first extracts the scrollable model using the pipeline session.
public String
getEvent()
public HttpSession
getHttpSession()
Get the Cached HttpSession.
public String
getId()
Get the value of id.
public String
getNextstring()
public String
getOrigin()
Get the value of origin.
public String
getPageindex()
public PipelineSession
getPipelineSession()
Get the Cached PipelineSession.
public String
getPrevstring()
public void
initialize()
Get the current HttpSession and piplineSession.
public void
release()
Release this tag.
public void
setEvent(String e)
public void
setId(String id)
Set the value of id.
public void
setNextstring(String nextString)
public void
setOrigin(String s)
Set the value of origin.
public void
setPageindex(String pageIndex)
public void
setPrevstring(String prevString)
 
Methods from  javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface javax.servlet.jsp.tagext.IterationTag
doAfterBody
 
Methods from interface javax.servlet.jsp.tagext.Tag
doEndTag, doStartTag, getParent, release, setPageContext, setParent
 

Constructor Detail

ScrollableModelTag

public ScrollableModelTag()
 

Method Detail

doStartTag() Method

public int doStartTag()
throws JspException
The tag body:
It first extracts the scrollable model using the pipeline session. It then decides to show the Next and Previous hyperlinks. It uses the origin/event of the JSP page to create the hyperlinks.
It finally uses the default JspWriter to output the Previous / 5-9 / Next tag.

Overrides
TagSupport.doStartTag()

Exceptions

JspException

getEvent() Method

public String getEvent()

getHttpSession() Method

public HttpSession getHttpSession()
Get the Cached HttpSession. It is initialized using the initialize method which is invoked in the doStartTag().


getId() Method

public String getId()
Get the value of id.

Overrides
TagSupport.getId()

getNextstring() Method

public String getNextstring()

getOrigin() Method

public String getOrigin()
Get the value of origin.


getPageindex() Method

public String getPageindex()

getPipelineSession() Method

public PipelineSession getPipelineSession()
Get the Cached PipelineSession. It is initialized using the initialize method which is invoked in the doStartTag()


getPrevstring() Method

public String getPrevstring()

initialize() Method

public void initialize()
Get the current HttpSession and piplineSession.


release() Method

public void release()
Release this tag.

Overrides
TagSupport.release()

setEvent(String) Method

public void setEvent(String e)

setId(String) Method

public void setId(String id)
Set the value of id.

Overrides
TagSupport.setId(String)

setNextstring(String) Method

public void setNextstring(String nextString)

setOrigin(String) Method

public void setOrigin(String s)
Set the value of origin.


setPageindex(String) Method

public void setPageindex(String pageIndex)

setPrevstring(String) Method

public void setPrevstring(String prevString)