com.oktiva.mogno.additional
Class PageNavigator

java.lang.Object
  extended bycom.oktiva.mogno.Component
      extended bycom.oktiva.mogno.Visual
          extended bycom.oktiva.mogno.Container
              extended bycom.oktiva.mogno.html.Span
                  extended bycom.oktiva.mogno.additional.PageNavigator
All Implemented Interfaces:
java.lang.Cloneable

public class PageNavigator
extends Span


Field Summary
 java.lang.String applicationUrl
           
 boolean compact
           
 long currentPage
           
 boolean displayPrevNext
           
 java.lang.String evOnClick
           
 java.lang.String formSubmit
           
 int maxDisplayedPages
           
 java.lang.String nextLinkLabel
           
 long numRows
           
 java.lang.String origin
           
 java.lang.String prevLinkLabel
           
 int rowsPerPage
           
 
Fields inherited from class com.oktiva.mogno.html.Span
align, dir, lang, onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup
 
Fields inherited from class com.oktiva.mogno.Container
afterEnd, content
 
Fields inherited from class com.oktiva.mogno.Visual
evOnShow, evOnSyntaxError, gridHeight, gridWeightX, gridWeightY, gridWidth, id, lastError, left, parent, problematic, style, styleClass, title, top
 
Fields inherited from class com.oktiva.mogno.Component
bag, componentFiler, componentFilerParams, designing, eventQueue, evOnCreate, name, owned, ownedClasses, owner, tag, xmlFileName
 
Constructor Summary
PageNavigator()
          Creates a new instance of PageNavigator
 
Method Summary
 java.lang.String getApplicationUrl()
          Getter for property applicationUrl.
 long getCurrentPage()
          Getter for property currentPage.
 long getCurrentPageOffset()
           
 java.lang.String getEvOnClick()
          Getter for property evOnClick.
 java.lang.String getFormSubmit()
          Getter for property formSubmit.
 int getMaxDisplayedPages()
          The maximum number of displayed page links if isCompact()
 java.lang.String getNextLinkLabel()
          Getter for property nextLinkLabel.
 long getNumRows()
          Number of rows I should try do paginate.
 java.lang.String getOrigin()
          Getter for property origin.
 java.lang.String getPrevLinkLabel()
          Getter for property prevLinkLabel.
 int getRowsPerPage()
          Getter for property rowsPerPage.
 boolean isCompact()
          If this component should display no more than maxDisplayedPages.
 boolean isDisplayPrevNext()
          If this component should display a next and previus page link.
 java.util.Vector nonAttributeGetters()
          Method used to define what methods started with "get" or "is" are not component attributes getter methods.
 void receiveRequest(javax.servlet.http.HttpServletRequest request)
          Receive the request and rebuild the properties using the data that the user has filled in.
 void setApplicationUrl(java.lang.String applicationUrl)
          Setter for property applicationUrl.
 void setCompact(boolean compact)
          Set if this component should display no more than maxDisplayedPages.
 void setCurrentPage(long currentPage)
          Setter for property currentPage.
 void setDisplayPrevNext(boolean displayPrevNext)
          Sets if this component should display a next and previus page link.
 void setEvOnClick(java.lang.String evOnClick)
          Setter for property evOnClick.
 void setFormSubmit(java.lang.String formSubmit)
          If submitForm is set, the links will submit the form with the specified name when clicked.
 void setMaxDisplayedPages(int maxDisplayedPages)
          Setter for property maxDisplayedPages.
 void setNextLinkLabel(java.lang.String nextLinkLabel)
          Setter for property nextLinkLabel.
 void setNumRows(long numRows)
          Setter for property numRows.
 void setOrigin(java.lang.String origin)
          Setter for property origin.
 void setPrevLinkLabel(java.lang.String prevLinkLabel)
          Setter for property prevLinkLabel.
 void setRowsPerPage(int rowsPerPage)
          Setter for property rowsPerPage.
 java.lang.String show()
          Builds the HTML from the ordered childs list.
 
Methods inherited from class com.oktiva.mogno.html.Span
getAlign, getDir, getLang, getOnclick, getOndblclick, getOnkeydown, getOnkeypress, getOnkeyup, getOnmousedown, getOnmousemove, getOnmouseout, getOnmouseover, getOnmouseup, htmlAttributes, setAlign, setDir, setLang, setOnclick, setOndblclick, setOnkeydown, setOnkeypress, setOnkeyup, setOnmousedown, setOnmousemove, setOnmouseout, setOnmouseover, setOnmouseup
 
Methods inherited from class com.oktiva.mogno.Container
addChildsVector, betweenColumns, betweenRows, endColumn, endContainer, endRow, getChildsVector, getContent, getFullComponentsVector, getOrderedChildNames, getOrderedChildsVector, orderChildsVector, selectParentComponent, setContent, startColumn, startContainer, startRow
 
Methods inherited from class com.oktiva.mogno.Visual
buildHtmlAttributes, cellhalignHtmlAttributes, cellvalignHtmlAttributes, checkSyntax, coreHtmlAttributes, descendentOf, eventsHtmlAttributes, getEvOnShow, getEvOnSyntaxError, getGridHeight, getGridWeightX, getGridWeightY, getGridWidth, getId, getLastError, getLeft, getParent, getStyle, getStyleClass, getTitle, getTop, i18nHtmlAttributes, localizableAttributes, setEvOnShow, setEvOnSyntaxError, setGridHeight, setGridWeightX, setGridWeightY, setGridWidth, setId, setLastError, setLeft, setParent, setStyle, setStyleClass, setTitle, setTop, showHtmlAttributes
 
Methods inherited from class com.oktiva.mogno.Component
attribsHash, createOwnedComponents, dispatch, dispatchAll, dispatchFunction, eventParamTypes, eventParamValues, freeChild, getApplication, getAttrsTypes, getBag, getChild, getChildClass, getClone, getEvOnCreate, getFromBag, getName, getOwner, initialize, initialize, initialize, initialize, isDesigning, listChilds, putInBag, queue, registerChild, removeFromBag, serializedBag, setBag, setComponentFiler, setComponentFilerParams, setDesigning, setEvOnCreate, setName, setOwner, setProperties, store, unserializeBag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

compact

public boolean compact

displayPrevNext

public boolean displayPrevNext

maxDisplayedPages

public int maxDisplayedPages

numRows

public long numRows

rowsPerPage

public int rowsPerPage

currentPage

public long currentPage

evOnClick

public java.lang.String evOnClick

applicationUrl

public java.lang.String applicationUrl

prevLinkLabel

public java.lang.String prevLinkLabel

nextLinkLabel

public java.lang.String nextLinkLabel

origin

public java.lang.String origin

formSubmit

public java.lang.String formSubmit
Constructor Detail

PageNavigator

public PageNavigator()
Creates a new instance of PageNavigator

Method Detail

show

public java.lang.String show()
                      throws java.lang.Exception
Description copied from class: Container
Builds the HTML from the ordered childs list. When a component has gridWidth or gridHeight, the number of startColumns, endColumns, startRow and endRows called will still depend of the last top and left. Ex.: If you have a component with left 0 and gridWidth 2 and you have another component with left 2, there will be three calls to startColumn

Overrides:
show in class Container
Throws:
java.lang.Exception

receiveRequest

public void receiveRequest(javax.servlet.http.HttpServletRequest request)
Description copied from class: Visual
Receive the request and rebuild the properties using the data that the user has filled in. This is a stub method

Overrides:
receiveRequest in class Visual
Parameters:
request - HttpServletRequest

isCompact

public boolean isCompact()
If this component should display no more than maxDisplayedPages. or all links.

Returns:
Value of property compact.

setCompact

public void setCompact(boolean compact)
Set if this component should display no more than maxDisplayedPages. or all links.

Parameters:
compact - New value of property compact.

isDisplayPrevNext

public boolean isDisplayPrevNext()
If this component should display a next and previus page link.

Returns:
Value of property displayPrevNext.

setDisplayPrevNext

public void setDisplayPrevNext(boolean displayPrevNext)
Sets if this component should display a next and previus page link.

Parameters:
displayPrevNext - New value of property displayPrevNext.

getMaxDisplayedPages

public int getMaxDisplayedPages()
The maximum number of displayed page links if isCompact()

Returns:
Value of property maxDisplayedPages.

setMaxDisplayedPages

public void setMaxDisplayedPages(int maxDisplayedPages)
Setter for property maxDisplayedPages.

Parameters:
maxDisplayedPages - New value of property maxDisplayedPages.

getNumRows

public long getNumRows()
Number of rows I should try do paginate.

Returns:
Value of property numRows.

setNumRows

public void setNumRows(long numRows)
Setter for property numRows.

Parameters:
numRows - New value of property numRows.

getRowsPerPage

public int getRowsPerPage()
Getter for property rowsPerPage.

Returns:
Value of property rowsPerPage.

setRowsPerPage

public void setRowsPerPage(int rowsPerPage)
Setter for property rowsPerPage.

Parameters:
rowsPerPage - New value of property rowsPerPage.

getCurrentPage

public long getCurrentPage()
Getter for property currentPage.

Returns:
Value of property currentPage.

setCurrentPage

public void setCurrentPage(long currentPage)
Setter for property currentPage.

Parameters:
currentPage - New value of property currentPage.

getCurrentPageOffset

public long getCurrentPageOffset()

getEvOnClick

public java.lang.String getEvOnClick()
Getter for property evOnClick.

Returns:
Value of property evOnClick.

setEvOnClick

public void setEvOnClick(java.lang.String evOnClick)
Setter for property evOnClick.

Parameters:
evOnClick - New value of property evOnClick.

getApplicationUrl

public java.lang.String getApplicationUrl()
Getter for property applicationUrl.

Returns:
Value of property applicationUrl.

setApplicationUrl

public void setApplicationUrl(java.lang.String applicationUrl)
Setter for property applicationUrl.

Parameters:
applicationUrl - New value of property applicationUrl.

getPrevLinkLabel

public java.lang.String getPrevLinkLabel()
Getter for property prevLinkLabel.

Returns:
Value of property prevLinkLabel.

setPrevLinkLabel

public void setPrevLinkLabel(java.lang.String prevLinkLabel)
Setter for property prevLinkLabel.

Parameters:
prevLinkLabel - New value of property prevLinkLabel.

getNextLinkLabel

public java.lang.String getNextLinkLabel()
Getter for property nextLinkLabel.

Returns:
Value of property nextLinkLabel.

setNextLinkLabel

public void setNextLinkLabel(java.lang.String nextLinkLabel)
Setter for property nextLinkLabel.

Parameters:
nextLinkLabel - New value of property nextLinkLabel.

getOrigin

public java.lang.String getOrigin()
Getter for property origin.

Returns:
Value of property origin.

setOrigin

public void setOrigin(java.lang.String origin)
Setter for property origin.

Parameters:
origin - New value of property origin.

nonAttributeGetters

public java.util.Vector nonAttributeGetters()
Description copied from class: Component
Method used to define what methods started with "get" or "is" are not component attributes getter methods.
This method in all subclasses of Component must start with the following line:
Vector v = super.nonAttributeGetters();
and end with the following:
return v;

Overrides:
nonAttributeGetters in class Container

getFormSubmit

public java.lang.String getFormSubmit()
Getter for property formSubmit.

Returns:
Value of property formSubmit.

setFormSubmit

public void setFormSubmit(java.lang.String formSubmit)
If submitForm is set, the links will submit the form with the specified name when clicked.

Parameters:
formSubmit - New value of property formSubmit.