org.apache.cocoon.forms.formmodel
Class EnhancedRepeater

java.lang.Object
  extended byorg.apache.cocoon.forms.formmodel.AbstractWidget
      extended byorg.apache.cocoon.forms.formmodel.Repeater
          extended byorg.apache.cocoon.forms.formmodel.EnhancedRepeater
All Implemented Interfaces:
org.apache.cocoon.util.location.Locatable, ValidationErrorAware, Widget

public class EnhancedRepeater
extends Repeater


Nested Class Summary
 
Nested classes inherited from class org.apache.cocoon.forms.formmodel.Repeater
Repeater.RepeaterRow
 
Field Summary
 
Fields inherited from class org.apache.cocoon.forms.formmodel.Repeater
definition, rows, validationError
 
Fields inherited from class org.apache.cocoon.forms.formmodel.AbstractWidget
wasValid
 
Fields inherited from interface org.apache.cocoon.forms.formmodel.Widget
PATH_SEPARATOR
 
Constructor Summary
EnhancedRepeater(RepeaterDefinition repeaterDefinition)
           
 
Method Summary
 void doPageLoad()
           
 void doPageSave()
          save current page to cache-collections (updatedRows, deleted rows, insertedRows)
 RepeaterJXPathCollection getCollection()
           
 int getCurrentPage()
           
 int getCustomPageWidgetValue()
           
 int getDisplayableCurrentPage()
           
 int getDisplayableLastPage()
           
 int getMaxPage()
           
 int getPageSize()
           
 org.apache.cocoon.xml.AttributesImpl getXMLElementAttributes()
          Adds @size attribute
 void goToPage(int page)
           
 void initialize()
          Called after widget's environment has been setup, to allow for any contextual initalization, such as looking up case widgets for union widgets.
 boolean isEnhanced()
           
 boolean isFirstPage()
           
 boolean isLastPage()
           
 void refreshPage()
           
 void setCollection(RepeaterJXPathCollection collection)
           
 void setFilter(String field, Object value)
           
 void setPageSize(int pageSize)
           
 void sortBy(String field)
           
 
Methods inherited from class org.apache.cocoon.forms.formmodel.Repeater
addRepeaterListener, addRow, addRow, broadcastEvent, clear, generateDisplayData, generateItemSaxFragment, generateSize, generateWidgetLabel, getChild, getDefinition, getMaxSize, getMinSize, getParentRow, getRow, getSize, getValidationError, getWidget, getXMLElementName, hasRepeaterListeners, indexOf, moveRow, moveRow2, moveRowLeft, moveRowRight, readFromRequest, removeRepeaterListener, removeRow, removeRows, setValidationError, validate
 
Methods inherited from class org.apache.cocoon.forms.formmodel.AbstractWidget
addValidator, generateLabel, generateSaxFragment, getAttribute, getCombinedState, getForm, getFullName, getId, getLocation, getName, getParent, getRequestParameterName, getState, getValue, getWidget, isRequired, isValid, lookupWidget, removeAttribute, removeValidator, setAttribute, setParent, setState, setValue, toString, widgetNameChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnhancedRepeater

public EnhancedRepeater(RepeaterDefinition repeaterDefinition)
Method Detail

doPageLoad

public void doPageLoad()
                throws BindingException
Throws:
BindingException

doPageSave

public void doPageSave()
                throws BindingException
save current page to cache-collections (updatedRows, deleted rows, insertedRows)

Throws:
BindingException

getMaxPage

public int getMaxPage()

getCustomPageWidgetValue

public int getCustomPageWidgetValue()

getCurrentPage

public int getCurrentPage()

getDisplayableCurrentPage

public int getDisplayableCurrentPage()

getDisplayableLastPage

public int getDisplayableLastPage()

isFirstPage

public boolean isFirstPage()

isLastPage

public boolean isLastPage()

getPageSize

public int getPageSize()

setPageSize

public void setPageSize(int pageSize)

isEnhanced

public boolean isEnhanced()

getXMLElementAttributes

public org.apache.cocoon.xml.AttributesImpl getXMLElementAttributes()
Description copied from class: Repeater
Adds @size attribute

Overrides:
getXMLElementAttributes in class Repeater

setCollection

public void setCollection(RepeaterJXPathCollection collection)

initialize

public void initialize()
Description copied from class: AbstractWidget
Called after widget's environment has been setup, to allow for any contextual initalization, such as looking up case widgets for union widgets.

Specified by:
initialize in interface Widget
Overrides:
initialize in class Repeater

getCollection

public RepeaterJXPathCollection getCollection()

refreshPage

public void refreshPage()
                 throws BindingException
Throws:
BindingException

goToPage

public void goToPage(int page)
              throws BindingException
Throws:
BindingException

sortBy

public void sortBy(String field)
            throws BindingException
Throws:
BindingException

setFilter

public void setFilter(String field,
                      Object value)
               throws BindingException
Throws:
BindingException


Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.