/** @return value for KEY_PATH under MANDATORY_SORT, the path of the mandatory sort */ public String manadatorySortKeyPath() { NSMutableDictionary manadatorySortDictionary = (NSMutableDictionary) configurationData().objectForKey(MANDATORY_SORT); return (String) manadatorySortDictionary.objectForKey(KEY_PATH); }
/** * @return UPDATE_CONTAINER_ID from configurationData(), the update * container ID from the AjaxGrid */ public String gridContainerID() { return (String) configurationData().objectForKey(AjaxGrid.UPDATE_CONTAINER_ID); }
/** * @param context the current WOContext * @return the AjaxModalDialog currently being processed * @throws RuntimeException if no AjaxModalDialog is currently being processed */ public static AjaxModalDialog _currentDialog(WOContext context) { AjaxModalDialog currentDialog = (AjaxModalDialog) ERXWOContext.contextDictionary().objectForKey(AjaxModalDialog.class.getName()); if (currentDialog == null) { currentDialog = (AjaxModalDialog) ERXResponseRewriter.pageUserInfo(context).objectForKey(AjaxModalDialog.class.getName()); } return currentDialog; }
public void commitTransaction() { if (_hasTransaction) { _hasTransaction = false; for (String entityName : _transactionEntityStores.allKeys()) { EREntityStore transactionStore = _transactionEntityStores.objectForKey(entityName); EREntityStore entityStore = _entityStores.objectForKey(entityName); entityStore.commitFromTransactionStore(transactionStore); } _transactionEntityStores = null; } }
public boolean isAString() { //log.debug( "isAString: "+(masterCriteria.userInfo().objectForKey("IS_STRING"))); if (masterCriteria.userInfo().objectForKey("IS_STRING").equals("true")) { return true; } return false; }
/** * @return displayGroup().numberOfObjectsPerBatch() as a String for the * option input */ public String currentBatchSize() { return (String) configurationData().objectForKey(AjaxGrid.BATCH_SIZE); }
/** * @return the value for the DRAG_HEADER_ONLY configuration item with a default of false */ public String dragHeaderOnly() { String dragHeaderOnly = (String) configurationData().objectForKey(DRAG_HEADER_ONLY); return dragHeaderOnly == null ? "false" : dragHeaderOnly; }
public DRRecordGroup recordGroupForCoordinates(NSDictionary coordDict) { String coordKey = coordinateKey(coordDict); DRRecordGroup recordGroup = (DRRecordGroup)_registeredRecordGroups.objectForKey(coordKey); return recordGroup; } }
public boolean shouldTotal() { if (_userInfo == null) { return true; } if (ERXValueUtilities.booleanValue(_userInfo.objectForKey("SHOW_TOTAL"))) { return true; } return false; }
public boolean showTotal() { if (masterCriteria.userInfo().objectForKey("SHOW_TOTAL").equals("true")) { return true; } return false; }
/** * @return TABLE_ID from configurationData(), the table ID from the AjaxGrid */ public String tableID() { return (String) configurationData().objectForKey(AjaxGrid.TABLE_ID); }
@Override public WODeclaration createDeclaration(String elementName, String elementType, NSMutableDictionary associations) { String newElementType = "ERXWOConditional"; if (associations.objectForKey("negate") != null) { throw new IllegalArgumentException("You already specified a binding for 'negate' of " + associations.objectForKey("negate") + " on a wo:not."); } associations.setObjectForKey(new WOConstantValueAssociation(Boolean.TRUE), "negate"); return super.createDeclaration(elementName, newElementType, associations); } }
static public Format formatterForFormat(String calFormat) { synchronized(_calFormatDict) { if(calFormat == null) calFormat = _defaultCalendarFormatString; NSTimestampFormatter v = (NSTimestampFormatter)_calFormatDict.objectForKey(calFormat); if(v == null) { v = new NSTimestampFormatter(calFormat); setFormatterForFormat(v, calFormat); } return v; } } static public void setFormatterForFormat(Format formatter, String calFormat) {
/** * @return <code>true</code> if currentColumn() is part of the sort * ordering but is not the mandatory sort */ public boolean isCurrentColumnSorted() { return currentColumnSortOrder() != null && currentColumnSortOrder().objectForKey(MANDATORY_SORT_ORDER_FLAG) == null; }
/** * @return the sort order dictionary for currentColumn() or null if ! * isCurrentColumnSorted() */ public NSMutableDictionary currentColumnSortOrder() { return (NSMutableDictionary) sortOrdersByKeypath().objectForKey(currentSortPath()); }
/** * @return the configurationData */ public NSMutableDictionary configurationData() { NSMutableDictionary configurationData = (NSMutableDictionary) valueForBinding(CONFIGURATION_DATA_BINDING); if (configurationData.objectForKey(CONFIGURATION_UPDATED) != null) { clearCachedConfiguration(); configurationData.removeObjectForKey(CONFIGURATION_UPDATED); } return configurationData; }
public static HighlightMetadata highlightMetadataForObject(Object obj) { HighlightMetadata metadata = null; if (obj != null) { NSMutableDictionary highlightedObjects = (NSMutableDictionary) ERXWOContext.contextDictionary().valueForKey(AjaxHighlight.HIGHLIGHTED_KEY); if (highlightedObjects != null) { metadata = (HighlightMetadata) highlightedObjects.objectForKey(highlightedValue(obj)); } } return metadata; }
protected void handleUpdate(EOEditingContext ec, EOEnterpriseObject eo) { NSArray keys = configuration.objectForKey(eo.entityName()).keys; NSDictionary committedSnapshotForObject = ec.committedSnapshotForObject(eo); NSDictionary changes = eo.changesFromSnapshot(committedSnapshotForObject); for (Enumeration e1 = changes.keyEnumerator(); e1.hasMoreElements();) { String key = (String) e1.nextElement(); if (keys.containsObject(key)) { handleUpdate(ec, eo, key, committedSnapshotForObject.objectForKey(key), changes.objectForKey(key)); } } }
public AjaxToggleLink(String aName, NSDictionary<String, WOAssociation> associations, WOElement template) { super("a", AjaxToggleLink.processAssociations(associations), template); _effect = _associations.removeObjectForKey("effect"); _duration = _associations.removeObjectForKey("duration"); _toggleID = _associations.removeObjectForKey("toggleID"); if (_associations.objectForKey("onclick") != null) { throw new WODynamicElementCreationException("You cannot bind 'onclick' on AjaxToggleLink."); } if (_toggleID == null) { throw new WODynamicElementCreationException("You must bind 'toggleID'."); } }
public AjaxFunctionButton(String aName, NSDictionary associations, WOElement template) { super("input", AjaxFunctionButton.processAssociations(associations), template); _disabled = _associations.removeObjectForKey("disabled"); _action = _associations.removeObjectForKey("action"); _updateContainerID = _associations.removeObjectForKey("updateContainerID"); if (_associations.objectForKey("onclick") != null && _action != null) { throw new WODynamicElementCreationException("You cannot bind both 'action' and 'onclick' at the same time."); } if (_updateContainerID != null && _action == null) { throw new WODynamicElementCreationException("If you bind 'updateContainerID', you must also bind 'action'."); } }