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); } }
public static void setUpdateContainerID(WORequest request, String updateContainerID) { if (updateContainerID != null) { ERXWOContext.contextDictionary().setObjectForKey(updateContainerID, ERXAjaxApplication.KEY_UPDATE_CONTAINER_ID); } }
/** * 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 static boolean isAjaxUpdatePass(WORequest request) { return ERXWOContext.contextDictionary().valueForKey(AjaxResponse.AJAX_UPDATE_PASS) != null; }
public static String updateContainerID(WORequest request) { return (String) ERXWOContext.contextDictionary().objectForKey(ERXAjaxApplication.KEY_UPDATE_CONTAINER_ID); }
public static String currentUpdateContainerID() { return (String) ERXWOContext.contextDictionary().objectForKey(AjaxUpdateContainer.CURRENT_UPDATE_CONTAINER_ID_KEY); }
/** * @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; }
/** * Stash this dialog instance in the context so we can access it from the static methods. If there is one AMD * nested in another (a rather dubious thing to do that we warn about but it may have its uses), we need to remember * the outer one while processing this inner one * @see #popDialog() */ protected void pushDialog() { outerDialog = (AjaxModalDialog) ERXWOContext.contextDictionary().objectForKey(AjaxModalDialog.class.getName()); ERXWOContext.contextDictionary().setObjectForKey(this, AjaxModalDialog.class.getName()); if ( ! hasWarnedOnNesting && outerDialog != null) { hasWarnedOnNesting = true; if (! ERXComponentUtilities.booleanValueForBinding(this, "ignoreNesting", false)) { log.warn("AjaxModalDialog {} is nested inside of {}. Are you sure you want to do this?", id(), outerDialog.id()); } } }
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; }
public static final void highlight(Object obj, boolean isNew) { if (obj != null) { NSMutableDictionary highlightedObjects = (NSMutableDictionary) ERXWOContext.contextDictionary().valueForKey(AjaxHighlight.HIGHLIGHTED_KEY); if (highlightedObjects == null) { highlightedObjects = new NSMutableDictionary(); ERXWOContext.contextDictionary().takeValueForKey(highlightedObjects, AjaxHighlight.HIGHLIGHTED_KEY); } highlightedObjects.setObjectForKey(new HighlightMetadata(isNew), highlightedValue(obj)); } }
CharSequence originalContent = _content; _content = new StringBuilder(); NSMutableDictionary userInfo = ERXWOContext.contextDictionary(); userInfo.setObjectForKey(Boolean.TRUE, AjaxResponse.AJAX_UPDATE_PASS); WOActionResults woactionresults = WOApplication.application().invokeAction(_request, _context);
if (isLocalSharedList) { String varName = (String) valueForBinding("localSharedVarName"); NSMutableDictionary userInfo = ERXWOContext.contextDictionary(); if (userInfo.objectForKey(varName) == null) { String ljs = listeJS();
addScriptResourceInHead(res, "jsonrpc.js"); NSMutableDictionary userInfo = ERXWOContext.contextDictionary(); String name = (String) valueForBinding("name"); String key = "JSONRPC_" + name;
NSMutableDictionary userInfo = ERXWOContext.contextDictionary(); if (!userInfo.containsKey("er.ajax.AjaxModalContainer.init")) { AjaxUtils.appendScriptHeader(response);