jp.terasoluna.fw.web.struts.taglib
Class PageLinksTag

java.lang.Object
  Extend the abovejavax.servlet.jsp.tagext.TagSupport
      Extend the abovejp.terasoluna.fw.web.struts.taglib.PageLinksTag
All implemented interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class PageLinksTag
extends javax.servlet.jsp.tagext.TagSupport

Function that navigates the page.

Display the page navigation link of the list defined by <logic:iterate> element of Struts. If the link is identical JSP, it can be displayed at anywhere of the corresponding list such as left, right, top and bottom.

While using the page link function, it is necessary to prepare the following fields in action form and to specify them corresponding to the attribute of this function.



Attribute that supports tags

Page link function supports following attribute.

Attribute name Default value Necessity Execution time format Overview
id - false true When the string is specified in this attribute, the output destination is not the display but is stored in the page context. This attribute is the storage key.
action - false true Specify the path name of the action that displays the list display screen.
It becomes the mandatory attribute when "submit" attribute is false.
name - false true Specify Bean that fetches display lines, starting line index and all lines of list information.
rowProperty - true true Specify the field that retains display lines. Fetch the value directly when "name" attribute is not specified.
indexProperty - true true Specify the field that retains the displayed starting index. Fetch the value directly when "name" attribute is not specified.
totalProperty - true true Specify the field that retains all lines of list information which is defined by <logic:iterate> element . Fetch the value directly when "name" attribute is not specified.
scope - false true Specify the scope of fetching Bean specified in "name" attribute.
submit false false true Specify true while performing submit and not link. Default is false. In case of false, "action" attribute becomes the mandatory attribute. "action" attribute becomes invalid if this attribute is set to true.
forward false false true Attribute used when performing the distribution of forward using DispatchAction of TERASOLUNA. When true is specified, Hidden tags of the value set in "event" attribute are output. "value" attribute of that Hidden tag is considered as "forward_pageLinks". Default is false.
event "event" false true Attribute used when performing distribution of forward using DispatchAction of TERASOLUNA. When "forward" attribute is set to true, Hidden tags with the names specified in this attribute are generated. Default is "event".
resetIndex false false true This attribute becomes valid when using submit and when set to true, outputs Hidden tag of "startIndex" and "endIndex" to reset the specifed range. Default is false.
currentPageIndex "currentPageIndex" false true It is the key for storing the current page count of corresponding list into page context. Default is "currentPageIndex".
totalPageCount "totalPageCount" false true It is the key for storing the total page count of corresponding list into page context. Default is "totalPageCount".


Scripting varibales of custom tag

PageLinksTag supports the following variables.

Variable name Type Valid range Description
Name specified in id attribute of custom tag. java.lang.String Custom tag onwards Retains the page link (tag etc) that is output to screen.
Name or default value specified in currentPageIndex attribute of custom tag. java.lang.Integer Custom tag onwards Retains the current page number of corresponding list information.
Name or default value specified in totalPageCount attribute of custom tag. java.lang.Integer Custom tag onwards Retains total page count of corresponding list information.

Usage method
  • Property file settings
  • In the property file, give the description about the settings of the link output to the screen. Give the description about settings of display symbols and count of pages from current page to the jump page. Multiple descriptions can also be given if the link is in the following format.


  • Description about the property settings format
  •   pageLinks.<navigation direction><Navigation page count >.char=<Display string>
      Navigation direction : Previous to currently displayed page number(forward in case of next.
      Navigation page count : Count of pages to jump from the current page number. Any numeric value can be set.
      Display string : Characters to be displayed on screen. These characters are the target of the link.


      pageLinks.maxDspLinkSize = <Count of display page>
      Count of display page : Maximum count of the link that directly specifies the page number.


  • Configuration example of property file
  •   pageLinks.prev10.char=&lt;&lt;
      pageLinks.prev1.char=&lt;
      pageLinks.next1.char=&gt;
      pageLinks.next10.char=&gt;&gt;
      pageLinks.maxDirectLinkCount=10



  • Usage example of fetching list information from database for each page
  • In the following example, page link function is used. In this example, for each switching of the page, database is accessed and only the list which is to be displayed, is fetched. In this example, there is no problem even if the action that initially navigated to the list display screen and action ("action" attribute) of the page link function, are same. In the below example, the field used in PageLinks is of type String. However, an object of type other than String can also be used.

    Example of Struts configuration file

    <form-beans>
      <form-bean name="dynaFormBean"
        type="org.apache.struts.action.DynaActionForm" >
        <!-- Field that retains fetched list information -->
        <form-property name="userBeans"
          type="jp.terasoluna.strutspring.blogic.UserBean[]"/>
        <!-- Field that retains the records which are displayed on 1 page -->
        <form-property name="row"
          type="java.lang.String" initial="10"/>
        <!-- Field that retains the starting index of the pages which are displayed -->
        <form-property name="startIndex"
          type="java.lang.String" initial="0"/>
        <!-- Field that retains all records of list information -->
        <form-property name="totalCount"
          type="java.lang.String"/>
      </form-bean>
    </form-beans>

    <!-- Action that fetches pagewise list information -->
    <action path="/list"
          type="jp.terasoluna.strutspring.action.ListAction"
          name="dynaFormBean" scope="session">
      <forward name="success" path="/listSRC.do"/>
    </action>
    <action path="/listSRC"
          type="org.apache.struts.actions.ForwardAction"
          parameter="/daoTestList.jsp">
    </action>

    Example of JSP

    <ts:pageLinks action="/list" name="dynaFormBean" rowProperty="row"
        totalProperty="totalCount" indexProperty="startIndex" />

    <table border="1" frame="box">
      <logic:iterate id="userBean" name="dynaFormBean" property="userBeans">
      <tr>
        <td><bean:write name="userBean" property="id"/></td>
        <td><bean:write name="userBean" property="name"/></td>
        <td><bean:write name="userBean" property="age"/></td>
        <td><bean:write name="userBean" property="param1"/></td>
        <td><bean:write name="userBean" property="param2"/></td>
        <td><bean:write name="userBean" property="param3"/></td>
        <td><bean:write name="userBean" property="param4"/></td>
        <td><bean:write name="userBean" property="param5"/></td>
        <td><bean:write name="userBean" property="param6"/></td>
        <td><bean:write name="userBean" property="param7"/></td>
      </tr>
      </logic:iterate>
    </table>

    Example of service layer

    DynaActionForm dynaForm = (DynaActionForm) form;
    //Fetch the count of records to be displayed
    String strRow = (String) dynaForm.get("row");
    //Fetch starting line index
    String strIndex = (String) dynaForm.get("startIndex");
    int row = 10;
    int startIndex = 0;

    //Process of converting into int
    ......

    //Fetch count of all records
    String totalCount
    = dao.executeForObject("getUserCount", null, String.class);

    //Fetch list information
    UserBean[] bean = dao.executeForObjectList("getUserList", null, UserBean.class, startIndex, row);

    //Settings of action form
    dynaForm.set("totalCount", totalCount);
    dynaForm.set("userBeans", bean);



  • Usage example of fetching list information from action form
  • In the following example, page link function is used. In this example, while switching the page, already fetched list information (all records) is fetched from action form. In this example, the action that initially navigated to the list display screen and action ("action" attribute) of page link function, are separate actions. In the action that initially navigated to the list display screen, all records of list information are fetched and the action of page link function should be considered as the action exclusively for screen display. In the followig example, String is used in the field which is set in page link. However, it is also possible to set the object other than String.

    Example of Struts configuration file

    <form-beans>
      <form-bean name="dynaFormBean"
        type="org.apache.struts.action.DynaActionForm" >
        <!-- Field that retains the fetched list information-->
        <form-property name="userBeans"
          type="jp.terasoluna.strutspring.blogic.UserBean[]"/>
        <!-- Field that retains the records which are displayed on 1 page-->
        <form-property name="row"
          type="java.lang.String" initial="10"/>
        <!-- Field that retains the starting index of the pages which are displayed-->
        <form-property name="startIndex"
          type="java.lang.String" initial="0"/>
        <!-- Field that retains all records of list information-->
        <form-property name="totalCount"
          type="java.lang.String"/>
      </form-bean>
    </form-beans>

    <!-- Action that fetches entire list information -->
    <action path="/list"
          type="jp.terasoluna.strutspring.action.ListAction"
          name="dynaFormBean" scope="session">
      <forward name="success" path="/listSRC.do"/>
    </action>
    <!-- Action exclusively for screen display -->
    <action path="/listSRC"
          type="org.apache.struts.actions.ForwardAction"
          parameter="/daoTestList.jsp">
    </action>

    Example of JSP

    <ts:pageLinks action="/listSRC" name="dynaFormBean" rowProperty="row"
        totalProperty="totalCount" indexProperty="startIndex" />

    <table border="1" frame="box">
      <bean:define id="startIndex" name="dynaFormBean"
        property="startIndex" type="java.lang.String" />
      <logic:iterate id="userBean" name="dynaFormBean" length="10"
        property="userBeans" offset="<%=startIndex%>">

      <tr>
        <td><bean:write name="userBean" property="id"/></td>
        <td><bean:write name="userBean" property="name"/></td>
        <td><bean:write name="userBean" property="age"/></td>
        <td><bean:write name="userBean" property="param1"/></td>
        <td><bean:write name="userBean" property="param2"/></td>
        <td><bean:write name="userBean" property="param3"/></td>
        <td><bean:write name="userBean" property="param4"/></td>
        <td><bean:write name="userBean" property="param5"/></td>
        <td><bean:write name="userBean" property="param6"/></td>
        <td><bean:write name="userBean" property="param7"/></td>
      </tr>
      </logic:iterate>
    </table>

    Example of service layer(Only display first list screen)

    DynaActionForm dynaForm = (DynaActionForm) form;

    //Fetch count of all records
    String totalCount
    = dao.executeForObject("getUserCount", null, String.class);

    //Fetch list information
    UserBean[] bean = dao.executeForObjectList("getUserList", null, UserBean.class);

    //Settings of action form
    dynaForm.set("totalCount", totalCount);
    dynaForm.set("userBeans", bean);



  • Usage example when submit is performed
  • In page link function, link to specified action is created by using <a> by default. Therefore, submit is not performed. In order to perform submit, set submit attribute to true. If these settings are carried out, submit process is performed by JavaScript when page link is clicked. When submit attribute is set to true, action attribute becomes invalid.

    Example of JSP(some part)

    <ts:pageLinks submit="true" name="dynaFormBean" rowProperty="row"
        totalProperty="totalCount" indexProperty="startIndex" />



  • Usage example where forward is performed by using DispatchAction
  • While performing forward by using DispatchAction of TERASOLUNA, it is necessary to set "forward" attribute to "true". When forward attribute is set to "true", "<input type="hidden" name="event" value="forward_pageLinks" />" is output to screen. The value of "name" attribute of Hidden tag, is the value specified in "event" attribute. Since default is "event", when not specified, above-mentioned Hidden tags are output.

    Example of JSP(some part)

    <ts:pageLinks submit="true" name="dynaFormBean" rowProperty="row"
         totalProperty="totalCount" indexProperty="startIndex"
         forward="true" event="forwardParameter" />

    Example of HTML which is output by above-mentioned JSP(Hidden tags)

    <input type="hidden" name="forwardParameter" value="forward_pageLinks" />

    Example of Struts configuration file

    <action path="/list"
            name="dynaFormBean" scope="request">
        <forward name="pageLinks" path="/pageLinks.do" />
        <forward name="regist" path="/regist.do" />
    </action>

    Example of Bean definition file

    <bean name="/list"
          class="jp.terasoluna.fw.web.struts.actions.DispatchAction">
        <property name="event"> <value>forwardParameter</value> </property>
    </bean>



  • Output current page count and total page count.
  • In page link function, current page count and total page count are stored into pageContext. Key can be specified in currentPageIndex and totalPageCount attribute. For the default value of attribute, refer to above. For displaying the current page number and total page count on screen, use it as follows.

    Example of JSP(Some part)

    <ts:pageLinks action="/pageLink" rowProperty="row"
        totalProperty="totalCount" indexProperty="startIndex" />
    ...
    Curent page is [<bean:write name="currentPageIndex"/>.
    Total page count is [<bean:write name="totalPageCount"/>].



  • Usage example of "id" attribute
  • When "id" attribute is specified, page link is not output to screen and specified string is stored into pageContext by using the key. Therefore, output location can be changed. It is used when current page number or total page count are to be dislayed on the top of page link

    Example of JSP (some part)

    <ts:pageLinks action="/pageLink" id="reservePageLinks" rowProperty="row"
        totalProperty="totalCount" indexProperty="startIndex"
        currentPageIndex="reserveCurrentPageIndex" totalPageCount="reserveTotalPageCount" />
    ...
    Current page is [<bean:write name="reserveCurrentPageIndex"/>].
    Total page count is[<bean:write name="reserveTotalPageCount"/>.
    <bean:write name="reservePageLinks"/>



    See Also:
    Serialized form

    Field Summary
    protected  java.lang.String action
              Action name which is invoked when page link is clicked.
    protected static java.lang.String CHAR_LINKS
              Property name element of the link for page jump of symbol display in ApplicationResources file.
    protected static java.lang.String CURRENT_PAGE_INDEX
              Key that registers current page count into page context.
    protected  java.lang.String currentPageIndex
              Parameters for storing the current page number.
    protected static java.lang.String DEFAULT_EVENT
              Default event parameter.
    protected static java.lang.String ERROR_MESSAGE_ACTION_REQUIRED
              Error message wherein "action" attribute is mandatory.
    protected  java.lang.String event
              Event parameter.
    protected  boolean forward
              Forward flag.
    protected static java.lang.String FORWARD_NAME
              Forward name.
    protected  java.lang.String id
              ID for changing the output destination.
    protected  java.lang.String indexProperty
              Field name of display starting index.
    protected  java.util.Map<java.lang.String,java.lang.String> links
              Map that stores display link by considering link registration ID of property file as key.
    private static org.apache.commons.logging.Log log
              Log class.
    protected static java.lang.String MAX_DSP_SIZE
              Property name element of display maximum count wherein the number of link for page jump in the ApplicationResources file, is directly specified.
    protected  int maxLinkNo
              Maximum page jump count.
    protected  int maxPageCount
              Maximum value of directly specified link number.
    protected  java.lang.String name
              Bean name that retains display starting index and all record count.
    protected static java.lang.String NEXT_LINKS
              Property name element of the link to jump to next page in the ApplicationResources file.
    protected static java.lang.String PAGE_LINKS_PREFIX
              Property name prefix of the link for page jump in the ApplicationResources file.
    protected static java.lang.String PAGELINKS_JAVASCRIPT_KEY
              Output flag of JavaScript which is output by page link function
    protected static java.lang.String PREV_LINKS
               Property name element of the link to jump to the previous page in the ApplicationResources file.
    protected  boolean resetIndex
              Specified range index output flag.
    protected  java.lang.String rowProperty
              Field name of display lines.
    protected  java.lang.String scope
              Scope of Bean to be fetched.
    private static long serialVersionUID
              Serial version ID
    protected  boolean submit
              Submit flag.
    protected static java.lang.String TOTAL_PAGE_COUNT
              Key that registers total page count into page context.
    protected  java.lang.String totalPageCount
              Parameter for storing the currentpage number.
    protected  java.lang.String totalProperty
              Field name of all records.
    protected static java.lang.String WARN_MESSAGE_ILLEGAL_ROW
              Error message when fetched display lines (row) are below 0.
     
    Field inherited from class javax.servlet.jsp.tagext.TagSupport
    pageContext
     
    Field inherited from interface javax.servlet.jsp.tagext.IterationTag
    EVAL_BODY_AGAIN
     
    Field inherited from interface javax.servlet.jsp.tagext.Tag
    EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
     
    Constructor Summary
    PageLinksTag()
               
     
    Method Summary
    protected  void addDirectLink(java.lang.StringBuilder sb, int row, int startIndex, int totalCount)
              Add page number link to StringBuilder of argument.
    protected  void addDirectSubmit(java.lang.StringBuilder sb, int row, int startIndex, int totalCount)
              Add page number link to StringBuilder of argument.
    protected  void addNextLink(java.lang.StringBuilder sb, int row, int startIndex, int totalCount)
              Add the link to navigate to next page, in the StringBuilder of argument.
    protected  void addNextSubmit(java.lang.StringBuilder sb, int row, int startIndex, int totalCount)
              Add the link to naviagate to next page, in the StringBuilder of argument.
    protected  void addPrevLink(java.lang.StringBuilder sb, int row, int startIndex, int totalCount)
              Add the link to naviagate to previous page, in StringBuilder of argument.
    protected  void addPrevSubmit(java.lang.StringBuilder sb, int row, int startIndex, int totalCount)
              Add the link to navigate to previous page in StringBuilder of argument.
    protected  void attributePageCount(int now, int total)
              Store the current pag count and total page count into page context.
    protected  void defineHtml(int row, int startIndex, int totalCount)
              Output the definition of HTML.
     int doStartTag()
              Method which is called while starting the tag evaluation.
     java.lang.String getAction()
              Return the "action" attribute value.
     java.lang.String getCurrentPageIndex()
              Return the set currentPageIndex attribute value.
     java.lang.String getEvent()
              Return the event attribute value.
     boolean getForward()
              Return the forward attribute value.
     java.lang.String getId()
              Return the id attribute value.
     java.lang.String getIndexProperty()
              Return the indexProperty attribute value.
    protected  int getInt(java.lang.Object obj)
              Return the object of argument by converting it into int.
    private  void getLinkProperty()
              Fetch the link definition for page jump which is defined in property file.
     java.lang.String getName()
              Return the id attribute value.
    protected  boolean getPageContextFlg(javax.servlet.jsp.PageContext pageContext, java.lang.String key)
              Convert the value fetched by the specified KEY into true value and return.
    protected  int getPageCount(int row, int totalCount)
              Calculate the page count and return.
    protected  int getPageIndex(int row, int startIndex)
              Calculate the displayed page number and return.
     boolean getResetIndex()
              Return the resetIndex attribute value.
     java.lang.String getRowProperty()
              Return the rowProperty attribute value.
     java.lang.String getScope()
              Return the scope attribute value.
     boolean getSubmit()
              Return the submit attribute value.
     java.lang.String getTotalPageCount()
              Return the totalPageCount attribute value.
     java.lang.String getTotalProperty()
              Return the totalProperty attribute value.
    protected  java.lang.Object lookup(javax.servlet.jsp.PageContext pageContext, java.lang.String name, java.lang.String property, java.lang.String scope)
              Fetch the value of property directly when name is not specified.
     void release()
              Release all alocated resources.
     void setAction(java.lang.String action)
              Set the value in "action"attribute.
     void setCurrentPageIndex(java.lang.String currentPageIndex)
              Set the value in the "currentPageIndex" attribute.
     void setEvent(java.lang.String event)
              Set the value in "event" attribute.
     void setForward(boolean forward)
              Set the value in "forward" attribute.
     void setId(java.lang.String id)
              Set the value in "id" attribute.
     void setIndexProperty(java.lang.String indexProperty)
              Set the value in "indexProperty" attribute.
     void setName(java.lang.String name)
              Set the value in "name" attribute.
    protected  void setPageContextFlg(javax.servlet.jsp.PageContext pageContext, java.lang.String key)
              Set the flag of specified KEY for the page context.
     void setResetIndex(boolean resetIndex)
              Set the value in "resetIndex" attribute.
     void setRowProperty(java.lang.String rowProperty)
              Set the value in "rowProperty" attribute.
     void setScope(java.lang.String scope)
              Set the value in "scope" attribute.
     void setSubmit(boolean submit)
              Set the value in "submit" attribute.
     void setTotalPageCount(java.lang.String totalPageCount)
              Set the value in "totalPageCount" attribute.
     void setTotalProperty(java.lang.String totalProperty)
              Set the value in "totalProperty" attribute.
     
    Method inherited from class javax.servlet.jsp.tagext.TagSupport
    doAfterBody, doEndTag, findAncestorWithClass, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValue
     
    Method fetched from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Details

    serialVersionUID

    private static final long serialVersionUID
    Serial version ID

    See Also:
    Constant field value

    log

    private static org.apache.commons.logging.Log log
    Log class.


    id

    protected java.lang.String id
    ID for changing output destination.


    action

    protected java.lang.String action
    Action name which is invoked when page link is clicked.


    name

    protected java.lang.String name
    Bean name that retains display starting index and all record count.


    rowProperty

    protected java.lang.String rowProperty
    Field name of display lines.


    indexProperty

    protected java.lang.String indexProperty
    Field name of displayed starting index.


    totalProperty

    protected java.lang.String totalProperty
    Field name of all records.


    scope

    protected java.lang.String scope
    Scope of Bean to be fetched.


    submit

    protected boolean submit
    Submit flag.


    forward

    protected boolean forward
    Forward flag.


    event

    protected java.lang.String event
    Event parameter.


    resetIndex

    protected boolean resetIndex
    Specified range index output flag.


    currentPageIndex

    protected java.lang.String currentPageIndex
    Parameter for storing current page number.


    totalPageCount

    protected java.lang.String totalPageCount
    Parameter for storing current page number.


    ERROR_MESSAGE_ACTION_REQUIRED

    protected static java.lang.String ERROR_MESSAGE_ACTION_REQUIRED
    Error message wherein "action" attribute is mandatory.


    WARN_MESSAGE_ILLEGAL_ROW

    protected static java.lang.String WARN_MESSAGE_ILLEGAL_ROW
    Error message when fetched display lines (row) are below 0.


    PAGE_LINKS_PREFIX

    protected static java.lang.String PAGE_LINKS_PREFIX
    Property name prefix of the link for the page jump in ApplicationResources file.


    PREV_LINKS

    protected static java.lang.String PREV_LINKS
    Property name element of the link to jump to previous or next page in the ApplicationResources file.


    NEXT_LINKS

    protected static java.lang.String NEXT_LINKS
    Property name element of the link to jump to next page in the ApplicationResources file.


    CHAR_LINKS

    protected static java.lang.String CHAR_LINKS
    Component for property name of link for page jump of display of symbols, in ApplicationResources.


    MAX_DSP_SIZE

    protected static java.lang.String MAX_DSP_SIZE
    Property name element of display maximum count wherein the number of link for page jump in the ApplicationResources file, is directly specified.


    PAGELINKS_JAVASCRIPT_KEY

    protected static java.lang.String PAGELINKS_JAVASCRIPT_KEY
    Output flag of JavaScript which is output by page link function.


    FORWARD_NAME

    protected static java.lang.String FORWARD_NAME
    Forward name.


    DEFAULT_EVENT

    protected static java.lang.String DEFAULT_EVENT
    Default event parameter.


    TOTAL_PAGE_COUNT

    protected static java.lang.String TOTAL_PAGE_COUNT
    Key that registers total page count into page context.


    CURRENT_PAGE_INDEX

    protected static java.lang.String CURRENT_PAGE_INDEX
    Key that registers current page count into page context.


    links

    protected java.util.Map<java.lang.String,java.lang.String> links
    Map that stores display links by using the link registration ID of property file as key.


    maxLinkNo

    protected int maxLinkNo
    Maximum page jump count.


    maxPageCount

    protected int maxPageCount
    Maximum value of directly specified link number.

    Constructor Details

    PageLinksTag

    public PageLinksTag()
    Method Details

    getId

    public java.lang.String getId()
    Return the set id attribute value.

    Override:
    getId in class javax.servlet.jsp.tagext.TagSupport
    Returns:
    Set value

    setId

    public void setId(java.lang.String id)
    Set value in "id" attribute.

    Override:
    setId in class javax.servlet.jsp.tagext.TagSupport
    Parameter:
    id - Value to be set

    getAction

    public java.lang.String getAction()
    Return the action attribute value.

    Returns:
    Value

    setAction

    public void setAction(java.lang.String action)
    Set the value in "action" attribute.

    Parameter:
    action - Value to be set

    getName

    public java.lang.String getName()
    Return the id attribute value.

    Returns:
    Value

    setName

    public void setName(java.lang.String name)
    Set the value in "name" attribute.

    Parameter:
    name - Value to be set

    getRowProperty

    public java.lang.String getRowProperty()
    Return the rowProperty value.

    Returns:
    Value

    setRowProperty

    public void setRowProperty(java.lang.String rowProperty)
    Set the value in "rowProperty" attribute.

    Parameter:
    rowProperty - Value to be set

    getIndexProperty

    public java.lang.String getIndexProperty()
    Return the indexProperty attribute value.

    Returns:
    Value

    setIndexProperty

    public void setIndexProperty(java.lang.String indexProperty)
    Set the value in indexProperty attribute.

    Parameter:
    indexProperty - Value to be set

    getTotalProperty

    public java.lang.String getTotalProperty()
    Return the totalProperty attribute value.

    Returns:
    Value

    setTotalProperty

    public void setTotalProperty(java.lang.String totalProperty)
    Set the value in "totalProperty" attribute.

    Parameter:
    totalProperty - Value to be set

    getScope

    public java.lang.String getScope()
    Return the scope attribute value.

    Returns:
    Value

    setScope

    public void setScope(java.lang.String scope)
    Set the value in "scope" attribute.

    Parameter:
    scope - Value to be set

    getSubmit

    public boolean getSubmit()
    Set the submit attribute value.

    Returns:
    Value

    setSubmit

    public void setSubmit(boolean submit)
    Set the value in "submit" attribute.

    Parameter:
    submit - Value to be set

    getForward

    public boolean getForward()
    Return the forward attibute value.

    Returns:
    Value

    setForward

    public void setForward(boolean forward)
    Set the value in "forward" attribute.

    Parameter:
    forward - Value to be set

    getEvent

    public java.lang.String getEvent()
    Return the event attribute value.

    Returns:
    Value

    setEvent

    public void setEvent(java.lang.String event)
    Set the value in "event" attribute.

    Parameter:
    event - Value to be set

    getResetIndex

    public boolean getResetIndex()
    Return the resetIndex attribute value.

    Returns:
    Value

    setResetIndex

    public void setResetIndex(boolean resetIndex)
    Set the value in "resetIndex" attribute.

    Parameter:
    resetIndex - Value to be set

    getCurrentPageIndex

    public java.lang.String getCurrentPageIndex()
    Return the currentPageIndex attribute value.

    Returns:
    Value

    setCurrentPageIndex

    public void setCurrentPageIndex(java.lang.String currentPageIndex)
    Set the value in "currentPageIndex" attribute.

    Parameter:
    currentPageIndex - Value to be set

    getTotalPageCount

    public java.lang.String getTotalPageCount()
    Return totalPageCount attribute value.

    Returns:
    Value

    setTotalPageCount

    public void setTotalPageCount(java.lang.String totalPageCount)
    Set the value in "totalPageCount" attribute.

    Parameter:
    totalPageCount - Value to be set

    doStartTag

    public int doStartTag()
                   throws javax.servlet.jsp.JspException
    Method which is called while starting the tag evaluation.

    Specified by:
    doStartTag in interface javax.servlet.jsp.tagext.Tag
    Overrides:
    doStartTag in class javax.servlet.jsp.tagext.TagSupport
    Returns:
    Process control instructions
    Exception:
    javax.servlet.jsp.JspException - JSP exception

    defineHtml

    protected void defineHtml(int row,
                              int startIndex,
                              int totalCount)
                       throws javax.servlet.jsp.JspException
    Output HTML definition.

    Parameter:
    row - Display lines
    startIndex - Display starting index
    totalCount - All records
    Exception:
    javax.servlet.jsp.JspException - JSP exception

    addPrevSubmit

    protected void addPrevSubmit(java.lang.StringBuilder sb,
                                 int row,
                                 int startIndex,
                                 int totalCount)
    Add the link to navigte to previous page in the StringBuilder of argument.

    Parameter:
    sb - StringBuilder to be added
    row - Display lines
    startIndex - Display starting index
    totalCount - All records of list information

    addDirectSubmit

    protected void addDirectSubmit(java.lang.StringBuilder sb,
                                   int row,
                                   int startIndex,
                                   int totalCount)
    Add page number link to StringBuilder of argument.

    Parameter:
    sb - StringBuilder to be added
    row - Display lines
    startIndex - Display starting index
    totalCount - All records of list information

    addNextSubmit

    protected void addNextSubmit(java.lang.StringBuilder sb,
                                 int row,
                                 int startIndex,
                                 int totalCount)
    Add the link to navigate to next page in the StringBuilder of argument.

    Parameter:
    sb - StringBuilder to be added
    row - Display lines
    startIndex - Display starting index
    totalCount - All records of list information

    addPrevLink

    protected void addPrevLink(java.lang.StringBuilder sb,
                               int row,
                               int startIndex,
                               int totalCount)
    Add the link to navigate to previous page in the StringBuilder of argument.

    Parameter:
    sb - StringBuilder to be added
    row - Display lines
    startIndex - Display starting index
    totalCount - All records of list information

    addDirectLink

    protected void addDirectLink(java.lang.StringBuilder sb,
                                 int row,
                                 int startIndex,
                                 int totalCount)
    Add the page number link to StringBuilder of argument.

    Parameter:
    sb - StringBuilder to be added
    row - Display lines
    startIndex - Display starting index
    totalCount - All records of list information

    addNextLink

    protected void addNextLink(java.lang.StringBuilder sb,
                               int row,
                               int startIndex,
                               int totalCount)
    Add the link to navigate to next page in the StringBuilder of argument.

    Parameter:
    sb - StringBuilder to be added
    row - Display lines
    startIndex - Display starting index
    totalCount - All records of list information

    getLinkProperty

    private void getLinkProperty()
    Fetch link definition for page julp which is defined in property file. Store it in fetched class variable.


    getPageIndex

    protected int getPageIndex(int row,
                               int startIndex)
    Calculate the display page number and return.

    Parameter:
    row - Display lines
    startIndex - Display starting index of currently displayed page
    Returns:
    Display pagenumber which is calculated

    getPageCount

    protected int getPageCount(int row,
                               int totalCount)
    Clalculate page count and return.

    Parameter:
    row - Display lines
    totalCount - All records
    Returns:
    Calculated page count

    getPageContextFlg

    protected boolean getPageContextFlg(javax.servlet.jsp.PageContext pageContext,
                                        java.lang.String key)
    Convert the value fetched by the specified KEY into true value and return. When argument key is null, IllegalArgumentException occurs.

    Parameter:
    pageContext - Page context
    key - KEY that fetches FLG
    Returns:
    Output status flag fetched by specified KEY

    setPageContextFlg

    protected void setPageContextFlg(javax.servlet.jsp.PageContext pageContext,
                                     java.lang.String key)
    Set the flag of specified KEY for page context. When argument key is null,IllegalArgumentException occurs.

    Parameter:
    pageContext - Page context
    key - KEY that sets FLG

    lookup

    protected java.lang.Object lookup(javax.servlet.jsp.PageContext pageContext,
                                      java.lang.String name,
                                      java.lang.String property,
                                      java.lang.String scope)
                               throws javax.servlet.jsp.JspException
    Fetch the value of property directly when name is not specified.

    Parameter:
    pageContext - Page context
    name - Bean name that retains property
    property - Property
    scope - Scope
    Returns:
    Fetched value
    Exception:
    javax.servlet.jsp.JspException - JSP exception

    getInt

    protected int getInt(java.lang.Object obj)
                  throws javax.servlet.jsp.JspException
    Convert the pbject of argument into int and convert.

    Parameter:
    obj - Object to be converted into int
    Returns:
    Fetched value
    Exception:
    javax.servlet.jsp.JspException - JSP exception

    attributePageCount

    protected void attributePageCount(int now,
                                      int total)
    Store the current page number and total page count into page context.

    Parameter:
    now - Current page count
    total - Total page count

    release

    public void release()
    Release all allocated resources.

    Definition:
    Interface release in javax.servlet.jsp.tagext.Tag
    Override:
    Class release in javax.servlet.jsp.tagext.TagSupport