Inherited by AjaxGridExampleNavBar.

Public Member Functions | |
| AjaxGridNavBar (WOContext context) | |
| abstract NSArray | batchSizes () |
| void | batchSizeUpdated () |
| NSMutableDictionary | configurationData () |
| String | containerID () |
| int | currentBatchIndex () |
| String | currentBatchSize () |
| WODisplayGroup | displayGroup () |
| String | gridContainerID () |
| boolean | isStateless () |
| void | nextBatch () |
| void | previousBatch () |
| void | setCurrentBatchIndex (Number newValue) |
| String | tableID () |
| String | updateBatchSizeName () |
| String | updateBatchSizeOnChange () |
| String | updateGridContainer () |
Static Public Attributes | |
| static final String | CONFIGURATION_DATA_BINDING = "configurationData" |
| static final String | CONTAINER_ID_BINDING = "containerID" |
| static final String | DISPLAY_GROUP_BINDING = "displayGroup" |
This class has a symbiotic relationship with AjaxGrid. When this nav bar changes the data (e.g. batch size, batch displayed) it updates the grid's container not its own container. It needs to have the grid tell it to update after the grid has refreshed. This allows the AjaxGrid to make any needed changes to the display group before the contents of the nav bar are updated.
Grid: AjaxGrid { configurationData = configData; displayGroup = displayGroup; afterUpdate = "ajaxGridExampleNavBarUpdate();"; }
NavBar: AjaxGridExampleNavBar { containerID = "ajaxGridExampleNavBar"; displayGroup = displayGroup; configurationData = configData; }
<div class="ajaxGridNavBar">
<webobject name="NavUpdater">
<table><tr>
<td style="text-align:left;"><webobject name="PrevBatch"><<</webobject>
Page <b><span id="currentBatch"><webobject name="CurrentBatchIndex"/></span></b> of <b><webobject name="BatchCount"/></b>
<webobject name="NextBatch">>></webobject>
</td>
<td style="text-align:center;">
Number of lines per page: <webobject name="BatchSizes"/><webobject name="UpdateBatchSize"/>
</td>
<td style="text-align:right;">
Displaying <b><webobject name="FirstIndex"/></b> to <b><webobject name="LastIndex"/></b> of <b><webobject name="TotalCount"/></b> entries.
</td></tr></table>
<webobject name="BatchSlider"/>
</webobject name="NavUpdater">
</div>
NavUpdater: AjaxUpdateContainer { id = containerID; }
BatchCount: WOString {
value = displayGroup.batchCount;
}
BatchSlider: AjaxSlider { orientation = "horizontal"; value = currentBatchIndex; minimum = 1; maximum = displayGroup.batchCount; onChangeServer = updateGridContainer; onSlide = "function(v) { $('currentBatch').innerHTML = Math.round(v) }"; onChange = "function(v) { $('currentBatch').innerHTML = Math.round(v) }"; }
CurrentBatchIndex : WOString {
value = displayGroup.currentBatchIndex;
}
PrevBatch : AjaxUpdateLink { action = previousBatch; updateContainerID = gridContainerID; }
NextBatch : AjaxUpdateLink { action = nextBatch; updateContainerID = gridContainerID; }
BatchSizes: WOPopUpButton {
list = batchSizes;
item = batchSize;
selection = currentBatchSize;
onChange = updateBatchSizeOnChange;
}
FirstIndex: WOString {
value = displayGroup.indexOfFirstDisplayedObject;
}
LastIndex: WOString {
value = displayGroup.indexOfLastDisplayedObject;
}
TotalCount: WOString {
value = displayGroup.allObjects.count;
}
UpdateBatchSize: AjaxUpdateLink { action = batchSizeUpdated; functionName = updateBatchSizeName; updateContainerID = gridContainerID; }
displayGroup the same WODisplayGroup passed to AjaxGrid configurationData the same NSMutableDictionary passed to AjaxGrid containerID unique ID for the AjaxUpdateContainer in this component.
| AjaxGridNavBar | ( | WOContext | context | ) |
| abstract NSArray batchSizes | ( | ) | [pure virtual] |
| void batchSizeUpdated | ( | ) |
Ajax action method for updates to batch size. Grabs batch size from request and updates configuration.
| NSMutableDictionary configurationData | ( | ) |
| String containerID | ( | ) |
| int currentBatchIndex | ( | ) |
| String currentBatchSize | ( | ) |
| WODisplayGroup displayGroup | ( | ) |
| String gridContainerID | ( | ) |
| boolean isStateless | ( | ) |
| void nextBatch | ( | ) |
Ajax action method to select the next batch.
| void previousBatch | ( | ) |
Ajax action method to select the previous batch.
| void setCurrentBatchIndex | ( | Number | newValue | ) |
Intended to be bound to Ajax slider or selection of batch to display.
| newValue | new batch number from AjaxSlider |
| String tableID | ( | ) |
| String updateBatchSizeName | ( | ) |
| String updateBatchSizeOnChange | ( | ) |
| String updateGridContainer | ( | ) |
Returns JavaScript to update the AjaxUpdateContainer identified by gridContainerID(). This is intended for use as onChangeServer binding for a AjaxSlider.
final String CONFIGURATION_DATA_BINDING = "configurationData" [static] |
final String CONTAINER_ID_BINDING = "containerID" [static] |
final String DISPLAY_GROUP_BINDING = "displayGroup" [static] |
1.5.8