
Public Member Functions | |
| String | actionClass () |
| String | actionName () |
| NSDictionary< String, Object > | additionalUrlParameters () |
| String | backString () |
| NSArray< NSDictionary< String, Object > > | batchNumbers () |
| Integer | batchSize () |
| String | containerCssClass () |
| Integer | currentBatchIndex () |
| ERXDirectActionBatchNavigationBar (WOContext context) | |
| String | forwardString () |
| boolean | hasMoreThanOneBatch () |
| boolean | isFirstBatch () |
| boolean | isLastBatch () |
| boolean | isSelected () |
| Integer | lastBatch () |
| ERXLocalizer | localizer () |
| Integer | nextBatch () |
| Integer | numberOfObjects () |
| Integer | previousBatch () |
| void | reset () |
| void | setActionClass (String className) |
| void | setActionName (String name) |
| void | setAdditionalUrlParameters (NSDictionary< String, Object > dict) |
| void | setBackString (String s) |
| void | setBatchSize (Integer size) |
| void | setContainerCssClass (String cssClass) |
| void | setCurrentBatchIndex (Integer index) |
| void | setForwardString (String s) |
| void | setNumberOfObjects (Integer n) |
| void | setShowBatchNavigationForSinglePage (Boolean flag) |
| void | setShowPageNumbers (Boolean flag) |
| void | setShowPageString (Boolean flag) |
| Boolean | showBatchNavigationForSinglePage () |
| boolean | showNavigationBar () |
| Boolean | showPageNumbers () |
| Boolean | showPageString () |
Public Attributes | |
| NSDictionary | dictInRepetition |
Private Member Functions | |
| int | numberOfBatches (int productCount, int sizeOfOneBatch) |
Private Attributes | |
| NSArray< NSDictionary< String, Object > > | batchNumbers |
Static Private Attributes | |
| static final String | ACTION_CLASS_KEY = "actionClass" |
| static final String | ACTION_NAME_KEY = "actionName" |
| static final String | ADDITIONAL_URL_PARAMETERS_KEY = "additionalUrlParameters" |
| static final String | BACK_STRING = "backString" |
| static final String | BATCH_SIZE_KEY = "batchSize" |
| static final String | CONTAINER_CSS_CLASS_KEY = "containerCssClass" |
| static final String | CURRENT_BATCH_INDEX_KEY = "currentBatchIndex" |
| static int | defaultBatchSize = 20 |
| static final String | FORWARD_STRING = "forwardString" |
| static final String | NUMBER_OF_OBJECTS_KEY = "numberOfObjects" |
| static final String | SHOW_BATCH_NAVIGATION_FOR_SINGLE_PAGE = "showBatchNavigationForSinglePage" |
| static final String | SHOW_PAGE_NUMBERS = "showPageNumbers" |
| static final String | SHOW_PAGE_STRING_KEY = "showPageString" |
Tip for this: ERXEOControlUtilities.objectsInRange is a really big help doing that!
actionName (String) - the name of the directAction to call actionClass (String) - the name of the class for the directAction call additionalUrlParameters (NSDictionary) - parameters that get added to navigation URLs batchsize (Integer) - the size of the batches currentBatchIndex (Integer) - the index of the current page numberOfObjects (Integer) - the number of objects to batch containerCssClass (String) - the css class to use for the surrounding div container backString (String) - the string to use for the "back" link (HTML enabled); default = back forwardString (String) - the string to use for the "forward" link (HTML enabled); default = back showPageNumbers (Boolean) - whether or not to show the page numbers (you might want to show only the back and forward links); default = true showPageString (Boolean) - whether or not to show the "Page:" string to the left of the nav (will be made more flexible); default = false showBatchNavigationForSinglePage (Boolean) - whether or not to show the the batch navigation if we have only a single page; default = true
| ERXDirectActionBatchNavigationBar | ( | WOContext | context | ) |
Standard constructor
| context |
| String actionClass | ( | ) |
Returns the name of the direct action class, if empty the default class is used (DirectAction)
| String actionName | ( | ) |
Returns the name of the direct action to call
| NSDictionary<String, Object> additionalUrlParameters | ( | ) |
The parameters to add to each link
| String backString | ( | ) |
the string for the "back" link
| NSArray<NSDictionary<String, Object> > batchNumbers | ( | ) |
Returns "batchNumber" objects which are dictionaries with key-value-pairs for the String to display.
| Integer batchSize | ( | ) |
The current batch size
| String containerCssClass | ( | ) |
The css class to use for the surrounding div
| Integer currentBatchIndex | ( | ) |
The current batch index
| String forwardString | ( | ) |
The string for the forward link
| boolean hasMoreThanOneBatch | ( | ) |
Returns whether we have more than one batch and should show the navigation at all
| boolean isFirstBatch | ( | ) |
Returns true if the currently displayed batch is the first one (for hiding the arrows on the left)
| boolean isLastBatch | ( | ) |
Returns true if the currently displayed batch is the last one (for hiding the arrows on the right)
| boolean isSelected | ( | ) |
Returns whether the currently generated item from the repetition is the selected one
| Integer lastBatch | ( | ) |
Returns the number of the last page
| ERXLocalizer localizer | ( | ) |
Convenience method to get the localizer.
Reimplemented from ERXComponent.
| Integer nextBatch | ( | ) |
Returns the number for the next batch
| int numberOfBatches | ( | int | productCount, | |
| int | sizeOfOneBatch | |||
| ) | [private] |
Returns the number of batches, the first batch has value 1. If the size of one batch is 0, the number of products will be returned, in order to avoid ArithmeticException. If the number of products is 0, it will return 0.
| productCount | number of products | |
| sizeOfOneBatch | size of one batch |
| Integer numberOfObjects | ( | ) |
The total number of objects for which we create the batches
| Integer previousBatch | ( | ) |
Returns the number for the previous batch
| void reset | ( | ) |
Reset the instance variables
Reimplemented from ERXStatelessComponent.
| void setActionClass | ( | String | className | ) |
Sets the name of the actionClass to use for the direct action call
| className | - name for the directAction class |
| void setActionName | ( | String | name | ) |
Sets the name of the direct action to call
| name | - a direct action name |
| void setAdditionalUrlParameters | ( | NSDictionary< String, Object > | dict | ) |
Set the parameters to add to each link
| dict |
| void setBackString | ( | String | s | ) |
Set the string for the "back" link
| s |
| void setBatchSize | ( | Integer | size | ) |
Set the size of the batches to create the pager
| size |
| void setContainerCssClass | ( | String | cssClass | ) |
Set the class name for the surrounding div
| cssClass |
| void setCurrentBatchIndex | ( | Integer | index | ) |
Set the current batch index
| index | - the index to set |
| void setForwardString | ( | String | s | ) |
Set the string for the "forward" link
| s |
| void setNumberOfObjects | ( | Integer | n | ) |
Set total number of objects for which we create the batches
| n |
| void setShowBatchNavigationForSinglePage | ( | Boolean | flag | ) |
Set the binding value for showBatchNavigationForSinglePage
| flag |
| void setShowPageNumbers | ( | Boolean | flag | ) |
Set whether to show the page numbers
| flag |
| void setShowPageString | ( | Boolean | flag | ) |
Set whether to show the string "Page:"
| flag |
| Boolean showBatchNavigationForSinglePage | ( | ) |
Return the value for the showBatchNavigationForSinglePage binding
| boolean showNavigationBar | ( | ) |
Should we show the batch navigation bar? Checks the binding "showBatchNavigationForSinglePage"
| Boolean showPageNumbers | ( | ) |
Returns whether to show the page numbers
| Boolean showPageString | ( | ) |
Returns whether or not to show the string for "Page:"
final String ACTION_CLASS_KEY = "actionClass" [static, private] |
key for the actionClass binding
final String ACTION_NAME_KEY = "actionName" [static, private] |
Key for the actionName binding
final String ADDITIONAL_URL_PARAMETERS_KEY = "additionalUrlParameters" [static, private] |
the key for the additionalUrlParameters binding
final String BACK_STRING = "backString" [static, private] |
the key for the "backString" binding
final String BATCH_SIZE_KEY = "batchSize" [static, private] |
key for the batchSize binding
NSArray<NSDictionary<String, Object> > batchNumbers [private] |
the batchnumbers to display, cached in this instance, resetted after completion
final String CONTAINER_CSS_CLASS_KEY = "containerCssClass" [static, private] |
the key for the surrounding div container class name
final String CURRENT_BATCH_INDEX_KEY = "currentBatchIndex" [static, private] |
key for the currentBatchIndex binding
int defaultBatchSize = 20 [static, private] |
the default batchSize, defaults to 20
| NSDictionary dictInRepetition |
The one used in the repetition
final String FORWARD_STRING = "forwardString" [static, private] |
the key for the "forwardString" binding
final String NUMBER_OF_OBJECTS_KEY = "numberOfObjects" [static, private] |
key for the numberOfObjects binding
final String SHOW_BATCH_NAVIGATION_FOR_SINGLE_PAGE = "showBatchNavigationForSinglePage" [static, private] |
key for showBatchNavigationForSinglePage binding
final String SHOW_PAGE_NUMBERS = "showPageNumbers" [static, private] |
the key for the "showPageNumbers" bindings
final String SHOW_PAGE_STRING_KEY = "showPageString" [static, private] |
the key for the showPageString binding
1.5.8