com.wewebu.ow.server.dmsdialogs.views
Class OwPageSelectorComponent

java.lang.Object
  extended by com.wewebu.ow.server.dmsdialogs.views.OwPageSelectorComponent
Direct Known Subclasses:
OwNumberBlockPageSelectorComponent, OwSimplePageSelectorComponent, OwVicinityPageSelectorComponent

public abstract class OwPageSelectorComponent
extends Object

Base class for paging components.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com

Since:
2.5.2.0

Field Summary
protected  boolean isStickyFooterInUse
          Deprecated. since 4.1.1.0 This attribute is no longer used and will be soon removed.
protected static org.apache.log4j.Logger LOG
          Logger for this class
protected  Node m_configNode
          the config node
protected  OwPageableView m_view
          the view on this component apply to
 
Constructor Summary
OwPageSelectorComponent(OwPageableView view_p)
          Constructor.
 
Method Summary
protected  int getDisplayCurrentPageNumber()
          Get the number of current page (1 - based)
protected  int getHumanReadablePageNumber(int pageNumber_p)
          Returns the human readable page number (1 - based)
protected  int getLastPage()
          Get the last page number
 String getPageAbsolutURL(int iPage_p)
          Create an URL for the given page
 String getPageNextURL()
          Get the next page URL
 String getPagePrevURL()
          Get the previous page URL
 boolean hasPaging()
          check if page buttons should be rendered
 void init()
          Post creation hook for initialization component.
abstract  void render(Writer w_p)
          Render the component.
protected  void renderAccessibilityMark(Writer w_p)
          Render a mark for accessibility.
 void setConfigNode(Node configNode_p)
          Set the config node
protected  boolean shouldRenderComponent()
          Check if it make sense to display the paging component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.log4j.Logger LOG
Logger for this class


m_view

protected OwPageableView m_view
the view on this component apply to


m_configNode

protected Node m_configNode
the config node


isStickyFooterInUse

@Deprecated
protected boolean isStickyFooterInUse
Deprecated. since 4.1.1.0 This attribute is no longer used and will be soon removed.
Constructor Detail

OwPageSelectorComponent

public OwPageSelectorComponent(OwPageableView view_p)
Constructor.

Parameters:
view_p - - the view that needs this paging component
Method Detail

render

public abstract void render(Writer w_p)
                     throws Exception
Render the component.

Parameters:
w_p - - the writer
Throws:
Exception

getPageAbsolutURL

public String getPageAbsolutURL(int iPage_p)
Create an URL for the given page

Parameters:
iPage_p -
Returns:
the URL

hasPaging

public boolean hasPaging()
check if page buttons should be rendered

Returns:
true = render page buttons, false = no page buttons to render

getPagePrevURL

public String getPagePrevURL()
Get the previous page URL

Returns:
- the URL.

getPageNextURL

public String getPageNextURL()
Get the next page URL

Returns:
- the URL.

getDisplayCurrentPageNumber

protected int getDisplayCurrentPageNumber()
                                   throws Exception
Get the number of current page (1 - based)

Returns:
the number of the current page.
Throws:
Exception

getHumanReadablePageNumber

protected int getHumanReadablePageNumber(int pageNumber_p)
Returns the human readable page number (1 - based)

Parameters:
pageNumber_p - - the page number
Returns:
the page number + 1

getLastPage

protected int getLastPage()
                   throws Exception
Get the last page number

Returns:
the last page
Throws:
Exception

shouldRenderComponent

protected boolean shouldRenderComponent()
                                 throws Exception
Check if it make sense to display the paging component.

Returns:
true if component should be rendered.
Throws:
Exception

setConfigNode

public void setConfigNode(Node configNode_p)
Set the config node

Parameters:
configNode_p -

init

public void init()
          throws Exception
Post creation hook for initialization component. Use it when something is needed to be set from the corresponding configuration node

Throws:
Exception - - when the initialization fails.

renderAccessibilityMark

protected void renderAccessibilityMark(Writer w_p)
                                throws Exception
Render a mark for accessibility.

Parameters:
w_p - the Writer object
Throws:
Exception
Since:
3.0.0.0


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.