use of com.webobjects.foundation.NSMutableArray in project wonder-slim by undur.
the class AjaxModalDialogOpener method ajaxRequestOptions.
/**
* @return options for Ajax.Request that is made when the link is clicked
*/
protected NSMutableDictionary ajaxRequestOptions() {
NSMutableArray ajaxOptionsArray = new NSMutableArray();
ajaxOptionsArray.addObject(new AjaxConstantOption("asynchronous", Boolean.FALSE, AjaxOption.BOOLEAN));
ajaxOptionsArray.addObject(new AjaxConstantOption("evalScripts", Boolean.FALSE, AjaxOption.BOOLEAN));
ajaxOptionsArray.addObject(new AjaxOption("onFailure", AjaxOption.FUNCTION_1));
// onSuccess callback handler to open AMD
StringBuilder sb = new StringBuilder(500);
sb.append(AjaxModalDialog.openDialogFunctionName(modalDialogId()));
sb.append('(');
// Override for dialog name
if (hasBinding("title")) {
sb.append(AjaxValue.javaScriptEscaped(valueForBinding("title")));
}
sb.append(");");
ajaxOptionsArray.addObject(new AjaxConstantOption("onSuccess", sb.toString(), AjaxOption.FUNCTION_1));
return AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, this);
}
use of com.webobjects.foundation.NSMutableArray in project wonder-slim by undur.
the class AjaxAccordion method createAjaxOptions.
public NSDictionary createAjaxOptions() {
NSMutableArray ajaxOptionsArray = new NSMutableArray();
ajaxOptionsArray.addObject(new AjaxOption("expandedBg", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("hoverBg", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("collapsedBg", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("expandedTextColor", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("expandedFontWeight", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("hoverTextColor", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("collapsedTextColor", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("collapsedFontWeight", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("hoverTextColor", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("borderColor", AjaxOption.STRING));
ajaxOptionsArray.addObject(new AjaxOption("panelHeight", AjaxOption.NUMBER));
ajaxOptionsArray.addObject(new AjaxOption("onHideTab", AjaxOption.SCRIPT));
ajaxOptionsArray.addObject(new AjaxOption("onShowTab", AjaxOption.SCRIPT));
ajaxOptionsArray.addObject(new AjaxOption("onLoadShowTab", AjaxOption.SCRIPT));
NSMutableDictionary options = AjaxOption.createAjaxOptionsDictionary(ajaxOptionsArray, this);
return options;
}
use of com.webobjects.foundation.NSMutableArray in project wonder-slim by undur.
the class AjaxDatePicker method localizeStringArray.
private NSArray<String> localizeStringArray(NSArray<String> strings) {
NSMutableArray<String> localizedStrings = new NSMutableArray<>(strings.count());
ERXLocalizer l = ERXLocalizer.currentLocalizer();
for (String string : strings) localizedStrings.add(l.localizedStringForKeyWithDefault(string));
return localizedStrings.immutableClone();
}
use of com.webobjects.foundation.NSMutableArray in project wonder-slim by undur.
the class ERXSession method setLanguage.
/**
* Cover method to set the current localizer to the localizer for that
* language.
* <p>
* Also updates languages list with the new single language.
*
* @param language to set the current localizer for.
* @see #language
* @see #setLanguages
*/
public void setLanguage(String language) {
ERXLocalizer newLocalizer = ERXLocalizer.localizerForLanguage(language);
if (!newLocalizer.equals(_localizer)) {
if (_localizer == null && !WOApplication.application().isCachingEnabled())
observer().registerForLocalizationDidResetNotification();
_localizer = newLocalizer;
ERXLocalizer.setCurrentLocalizer(_localizer);
NSMutableArray languageList = new NSMutableArray(_localizer.language());
if (!languageList.containsObject("Nonlocalized"))
languageList.addObject("Nonlocalized");
setLanguages(languageList);
}
}
use of com.webobjects.foundation.NSMutableArray in project wonder-slim by undur.
the class ERXAjaxSession method _permanentPageCache.
/**
* Returns the permanent page cache. Initializes it if needed.
*/
protected NSMutableDictionary _permanentPageCache() {
if (_permanentPageCache == null) {
_permanentPageCache = new NSMutableDictionary(64);
_permanentContextIDArray = new NSMutableArray(64);
}
return _permanentPageCache;
}
Aggregations