public FocusTextField(String tagname, NSDictionary nsdictionary, WOElement woelement) { super(tagname, nsdictionary, woelement); _selectAll = _associations.removeObjectForKey("selectAll"); _focus = _associations.removeObjectForKey("focus"); _onEnter = _associations.removeObjectForKey("onEnter"); _onKeyPress = _associations.removeObjectForKey("onkeypress"); }
public FocusText(String tagname, NSDictionary<String, WOAssociation> nsdictionary, WOElement woelement) { super(tagname, nsdictionary, woelement); _selectAll = _associations.removeObjectForKey("selectAll"); _focus = _associations.removeObjectForKey("focus"); _onEnter = _associations.removeObjectForKey("onEnter"); _onKeyPress = _associations.removeObjectForKey("onkeypress"); }
@Override public void clearLock(String s) throws IOException { synchronized (locks) { locks.removeObjectForKey(s); } }
/** * Resets the given entity, removing any known rows and * clearing out any transactions. This is the equivalent * deleting all rows in a relational database table. Be * careful using this if you use single table inheritance. * * @param entity the entity to reset */ public void resetEntity(EOEntity entity) { _entityStores.removeObjectForKey(entity); if (_transactionEntityStores != null) { _transactionEntityStores.removeObjectForKey(entity); } }
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'."); } }
public static NSDictionary removeDefaultOptions(NSDictionary options) { // PROTOTYPE OPTIONS NSMutableDictionary mutableOptions = options.mutableClone(); if ("'get'".equals(mutableOptions.objectForKey("method"))) { mutableOptions.removeObjectForKey("method"); } if ("true".equals(mutableOptions.objectForKey("evalScripts"))) { mutableOptions.removeObjectForKey("evalScripts"); } if ("true".equals(mutableOptions.objectForKey("asynchronous"))) { mutableOptions.removeObjectForKey("asynchronous"); } return mutableOptions; }
/** * Remove this dialog instance from the context, replacing the previous one if any. * @see #pushDialog() */ protected void popDialog() { if (outerDialog != null) { ERXWOContext.contextDictionary().setObjectForKey(outerDialog, AjaxModalDialog.class.getName()); } else { ERXWOContext.contextDictionary().removeObjectForKey(AjaxModalDialog.class.getName()); } }
public AjaxFunctionLink(String aName, NSDictionary associations, WOElement template) { super("a", AjaxFunctionLink.processAssociations(associations), template); _action = _associations.removeObjectForKey("action"); _updateContainerID = _associations.removeObjectForKey("updateContainerID"); WOAssociation onclick = _associations.objectForKey("onclick"); if (onclick == null) { onclick = _associations.objectForKey("onClick"); } if (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'."); } }
public static void setCurrentUpdateContainerID(String updateContainerID) { if (updateContainerID == null) { ERXWOContext.contextDictionary().removeObjectForKey(AjaxUpdateContainer.CURRENT_UPDATE_CONTAINER_ID_KEY); } else { ERXWOContext.contextDictionary().setObjectForKey(updateContainerID, AjaxUpdateContainer.CURRENT_UPDATE_CONTAINER_ID_KEY); } }
/** * @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 void fillInAjaxOptions(IAjaxElement element, WOComponent component, String submitButtonName, NSMutableDictionary options) { String systemDefaultFormSerializer = "Form.serializeWithoutSubmits"; String defaultFormSerializer = ERXProperties.stringForKeyWithDefault("er.ajax.formSerializer", systemDefaultFormSerializer); String formSerializer = (String) element.valueForBinding("formSerializer", defaultFormSerializer, component); if (!defaultFormSerializer.equals(systemDefaultFormSerializer)) { // _fs = formSerializer (but short) options.setObjectForKey(formSerializer, "_fs"); } // _asbn = AJAX_SUBMIT_BUTTON_NAME (but short) options.setObjectForKey("'" + submitButtonName + "'", "_asbn"); // PROTOTYPE OPTIONS // default to true in javascript if ("true".equals(options.objectForKey("asynchronous"))) { options.removeObjectForKey("asynchronous"); } // PROTOTYPE OPTIONS // default to true in javascript if ("true".equals(options.objectForKey("evalScripts"))) { options.removeObjectForKey("evalScripts"); } AjaxUpdateContainer.expandInsertionFromOptions(options, element, component); }
/** * Unregister a progress object from the registry. * * @param session * the session * @param progress * the progress object to unregister */ public static void unregisterProgress(WOSession session, AjaxProgress progress) { NSMutableDictionary progresses = (NSMutableDictionary) session.objectForKey(AjaxProgressBar.AJAX_PROGRESSES_KEY); if (progresses != null && progress.id() != null) { progresses.removeObjectForKey(progress.id()); } }
public void _initIvars() { statsDict = WOApplication.application().statistics(); pagesDict = (NSDictionary)statsDict.objectForKey("Pages"); directActionsDict = (NSDictionary)statsDict.objectForKey("DirectActions"); detailsDict = (NSDictionary)statsDict.objectForKey("Details"); transactions = (NSDictionary)statsDict.objectForKey("Transactions"); memoryDict = (NSDictionary)statsDict.objectForKey("Memory"); sessionsDict = ((NSDictionary)statsDict.objectForKey("Sessions")).mutableClone(); sessionMemoryDict = new NSDictionary((Map)sessionsDict.removeObjectForKey("Avg. Memory Per Session"), true); sessionStats = (NSArray)sessionsDict.removeObjectForKey("Last Session's Statistics"); maxSessionsDate = (NSTimestamp) sessionsDict.removeObjectForKey("Peak Active Sessions Date"); maxPageCount = 0; maxActionCount = 0; maxPageCount = _maxServedForDictionary(pagesDict); maxActionCount = _maxServedForDictionary(directActionsDict); }
/** * Convenience setter for the displayGroup's qeryMin value * * @param obj */ public void setMinValue(Object obj) { if (obj != null) { displayGroup().queryMin().takeValueForKey(obj, propertyKey()); } else { displayGroup().queryMin().removeObjectForKey(propertyKey()); } }
/** * Convenience setter for the displayGroup's qeryMax value * * @param obj */ public void setMaxValue(Object obj) { if (obj != null) { displayGroup().queryMax().takeValueForKey(obj, propertyKey()); } else { displayGroup().queryMax().removeObjectForKey(propertyKey()); } }
protected NSDictionary serializeObject(EOEnterpriseObject eo) { NSMutableDictionary<String, Object> result = new NSMutableDictionary<>(); result.addEntriesFromDictionary(eo.snapshot()); for (Enumeration e = eo.snapshot().keyEnumerator(); e.hasMoreElements();) { String key = (String) e.nextElement(); Object value = result.objectForKey(key); if (value instanceof ERXConstant.Constant) { ERXConstant.Constant constant = (ERXConstant.Constant) value; result.setObjectForKey(constant.value(), key); } else if (value == NSKeyValueCoding.NullValue) { result.removeObjectForKey(key); } else if (value instanceof ERXGenericRecord) { ERXGenericRecord rec = (ERXGenericRecord) value; result.setObjectForKey(ERXKeyGlobalID.globalIDForGID(rec.permanentGlobalID()).asString(), key); } else if (value instanceof NSArray) { NSArray oldValue = (NSArray) value; NSMutableArray newValue = new NSMutableArray(oldValue.count()); for (Enumeration e1 = newValue.objectEnumerator(); e1.hasMoreElements();) { ERXGenericRecord rec = (ERXGenericRecord) e1.nextElement(); newValue.addObject(ERXKeyGlobalID.globalIDForGID(rec.permanentGlobalID()).asString()); } result.setObjectForKey(newValue, key); } } return result; }
public void updateSourceObject(Object anEO) { String masterKey = _localRelationshipKey(); Object aSourceObject = _localSourceObject(); boolean isDictionary = (aSourceObject instanceof NSMutableDictionary); NSMutableDictionary _dictionary = (isDictionary) ? (NSMutableDictionary)aSourceObject : null; EOEnterpriseObject _eo = !(isDictionary) ? (EOEnterpriseObject)aSourceObject : null; if (anEO != null) { if (isDictionary) { _dictionary.setObjectForKey(anEO, masterKey); } else if (_eo.valueForKey(masterKey) != anEO) { _eo.addObjectToBothSidesOfRelationshipWithKey((EOEnterpriseObject) anEO, masterKey); } } else { // remove if (isDictionary) { _dictionary.removeObjectForKey(masterKey); } else if (_eo.valueForKey(masterKey) != null) { _eo.removeObjectFromBothSidesOfRelationshipWithKey((EOEnterpriseObject) _eo.valueForKey(masterKey), masterKey); } } }
public static void appendToResponse(WOResponse response, WOContext context, AjaxDynamicElement element, String observeFieldID, boolean observeDescendentFields, String updateContainerID, boolean fullSubmit, NSMutableDictionary<String, String> options) { WOComponent component = context.component(); String submitButtonName = nameInContext(context, component, element); NSMutableDictionary<String, String> observerOptions = new NSMutableDictionary<>(); if (options != null) { observerOptions.addEntriesFromDictionary(options); } AjaxSubmitButton.fillInAjaxOptions(element, component, submitButtonName, observerOptions); String observeFieldFrequency = observerOptions.removeObjectForKey("observeFieldFrequency"); if (observeDescendentFields) { response.appendContentString("ASB.observeDescendentFields"); } else { response.appendContentString("ASB.observeField"); } String observeDelay = observerOptions.removeObjectForKey("observeDelay"); response.appendContentString("("); response.appendContentString(AjaxUtils.quote(updateContainerID)); response.appendContentString(", "); response.appendContentString(AjaxUtils.quote(observeFieldID)); response.appendContentString(", "); response.appendContentString(observeFieldFrequency); response.appendContentString(", "); response.appendContentString(String.valueOf(!fullSubmit)); response.appendContentString(", "); response.appendContentString(observeDelay); response.appendContentString(", "); AjaxOptions.appendToResponse(observerOptions, response, context); response.appendContentString(");"); }
sortOrder.removeObjectForKey(MANDATORY_SORT_ORDER_FLAG); sortOrder.setObjectForKey(SORT_ASCENDING, SORT_DIRECTION);