public abstract class AjaxGridNavBar extends WOComponent
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;
}
| Bindings | |
displayGroup | the same WODisplayGroup passed to AjaxGrid |
configurationData | the same NSMutableDictionary passed to AjaxGrid |
containerID | unique ID for the AjaxUpdateContainer in this component. |
WOComponent._EventLoggingEnabler, WOComponent.EventNSKeyValueCodingAdditions.DefaultImplementation, NSKeyValueCodingAdditions.UtilityNSKeyValueCoding._BooleanFieldBinding, NSKeyValueCoding._BooleanMethodBinding, NSKeyValueCoding._FieldBinding, NSKeyValueCoding._ForwardingBinding, NSKeyValueCoding._KeyBinding, NSKeyValueCoding._KeyBindingCreation, NSKeyValueCoding._MethodBinding, NSKeyValueCoding._NumberFieldBinding, NSKeyValueCoding._NumberMethodBinding, NSKeyValueCoding._ReflectionKeyBindingCreation, NSKeyValueCoding.ErrorHandling, NSKeyValueCoding.MapImplementation, NSKeyValueCoding.Null<T>, NSKeyValueCoding.UnknownKeyException, NSKeyValueCoding.ValueAccessorNSValidation._MethodBinding, NSValidation._ValidationBinding, NSValidation.DefaultImplementation, NSValidation.Utility, NSValidation.ValidationException| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONFIGURATION_DATA_BINDING |
static java.lang.String |
CONTAINER_ID_BINDING |
static java.lang.String |
DISPLAY_GROUP_BINDING |
_Extension, _IsEventLoggingEnabled, _keyAssociations_CLASS_CLASS, _KeyPathSeparatorChar, KeyPathSeparatorNullValue_CLASS| Constructor and Description |
|---|
AjaxGridNavBar(WOContext context) |
| Modifier and Type | Method and Description |
|---|---|
abstract NSArray |
batchSizes() |
void |
batchSizeUpdated()
Ajax action method for updates to batch size.
|
NSMutableDictionary |
configurationData() |
java.lang.String |
containerID() |
int |
currentBatchIndex() |
java.lang.String |
currentBatchSize() |
WODisplayGroup |
displayGroup() |
java.lang.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(java.lang.Number newValue)
Intended to be bound to Ajax slider or selection of batch to display.
|
java.lang.String |
tableID() |
java.lang.String |
updateBatchSizeName() |
java.lang.String |
updateBatchSizeOnChange() |
java.lang.String |
updateGridContainer()
Returns JavaScript to update the AjaxUpdateContainer identified by
gridContainerID().
|
__valueForBinding, _associationWithName, _awakeInContext, _childTemplate, _cleanUpStatelessComponent, _componentDefinition, _componentUnroll, _isPage, _setContext, _setIsPage, _setParent, _setSubcomponent, _sleepInContext, _subcomponentForElementWithID, _templateNameForClass, _unroll, appendToResponse, application, awake, baseURL, bindingKeys, canAccessFieldsDirectly, canGetValueForBinding, canSetValueForBinding, clone, context, debugString, descriptionForResponse, ensureAwakeInContext, frameworkName, generateResponse, handleQueryWithUnboundKey, handleTakeValueForUnboundKey, hasBinding, hasSession, invokeAction, isCachingEnabled, isEventLoggingEnabled, logString, name, pageWithName, parent, path, pathURL, performParentAction, pullValuesFromParent, pushValuesToParent, reset, session, set_componentUnroll, set_unroll, setCachingEnabled, setValueForBinding, setVariableValueForName, sleep, synchronizesVariablesWithBindings, takeValueForKey, takeValueForKeyPath, takeValuesFromRequest, template, templateWithHTMLString, templateWithHTMLString, templateWithHTMLString, templateWithName, toString, unableToSetNullForKey, validateTakeValueForKeyPath, validateValueForKey, validationFailedWithException, valueForBinding, valueForBooleanBinding, valueForIntegerBinding, valueForKey, valueForKeyPath, valueForNSArrayBindings, valueForNSDictionaryBindings, valueForNumberBinding, valueForStringBinding, variableValueForName, variableWithNamepublic static final java.lang.String CONTAINER_ID_BINDING
public static final java.lang.String DISPLAY_GROUP_BINDING
public static final java.lang.String CONFIGURATION_DATA_BINDING
public AjaxGridNavBar(WOContext context)
public boolean isStateless()
isStateless in class WOComponentpublic void nextBatch()
public void previousBatch()
public void setCurrentBatchIndex(java.lang.Number newValue)
newValue - new batch number from AjaxSliderpublic int currentBatchIndex()
public java.lang.String updateGridContainer()
public java.lang.String updateBatchSizeOnChange()
public java.lang.String updateBatchSizeName()
public void batchSizeUpdated()
public abstract NSArray batchSizes()
public java.lang.String currentBatchSize()
public java.lang.String gridContainerID()
public java.lang.String tableID()
public WODisplayGroup displayGroup()
public NSMutableDictionary configurationData()
public java.lang.String containerID()
Copyright © 2002 – 2022 Project Wonder.