private string GetValidatorDeclarationElement() { NameValueCollection properties = new NameValueCollection(); addValidatorDeclarationProperties(properties); string arrayElement = ""; foreach (string propertyName in properties.Keys) { if (arrayElement != String.Empty) { arrayElement += ", "; } arrayElement += propertyName + ": \"" + BuiltInFunction.EncodeJavascript(properties[propertyName]) + "\""; } return("{" + arrayElement + "}"); }
public static string osAjaxNotifyWidget(string widgetId, string message) { // include "parent." since this script is to be executed within the Iframe. return("OsNotifyWidget('" + widgetId + "', '" + BuiltInFunction.EncodeJavascript(message) + "');"); }
public static string GetInvalidInputJS(string clientID, string message) { return("<script language=\"JavaScript\">outsystems.internal.$(function(){OsValidatorShowInvalidInput('" + BuiltInFunction.EncodeJavascript(clientID) + "', '" + BuiltInFunction.EncodeJavascript(message) + "');});</script>"); }
/// <summary> /// Action <code>ActionFeedback_Message</code> that represents the Service Studio user action /// <code>Feedback_Message</code> <p> Description: Sets the message to be displayed on th /// e Feedback_Message widget.</p> /// </summary> public static void ActionFeedback_Message(HeContext heContext, string inParamMessageText, int inParamMessageType) { lcvFeedback_Message localVars = new lcvFeedback_Message(inParamMessageText, inParamMessageType); if (heContext != null && heContext.RequestTracer != null) { heContext.RequestTracer.RegisterInternalCall("fc+L2jF4cECkDhtRvmNRTQ", "Feedback_Message", "X0RMeX3yYU+0eg2nFEDfaA", "ContactManager"); } // Set Message // Feedback_Message.Feedback_Message.MessageText = MessageText RCFeedback_MessageRecord CompID_Aux_0 = ((RCFeedback_MessageRecord)Global.App.OsContext.Session["ContactManager.Feedback_Message"]); CompID_Aux_0.ssSTFeedback_Message.ssMessageText = localVars.inParamMessageText; Global.App.OsContext.Session["ContactManager.Feedback_Message"] = CompID_Aux_0; // Feedback_Message.Feedback_Message.MessageType = MessageType RCFeedback_MessageRecord CompID_Aux_1 = ((RCFeedback_MessageRecord)Global.App.OsContext.Session["ContactManager.Feedback_Message"]); CompID_Aux_1.ssSTFeedback_Message.ssMessageType = localVars.inParamMessageType; Global.App.OsContext.Session["ContactManager.Feedback_Message"] = CompID_Aux_1; if ((Functions.rssextensionhttprequesthandler_ActionIsAjaxRequest(heContext))) { // resetLoadedFromBrowserCache // JS = "if (typeof(osjs.resetLoadedFromBrowserCache)=='undefined') {osjs.loadedFromBrowserCache = false;osjs.resetLoadedFromBrowserCache = true;}" localVars.varLcJS = "if (typeof(osjs.resetLoadedFromBrowserCache)==\'undefined\') {osjs.loadedFromBrowserCache = false;osjs.resetLoadedFromBrowserCache = true;}"; } // JS = JS + "if ((function(obj, prop){var a = false; // try { // a = typeof(obj) != 'undefined' && (obj[prop]===obj[prop]); // } catch (ex) { a = false; } // return a;})(parent,'RichWidgets_Feedback_Message_notifyWidget') && parent.RichWidgets_Feedback_Message_notifyWidget) { // parent.OsNotifyWidget(parent.RichWidgets_Feedback_Message_notifyWidget,'" + Feedback_Message.Feedback_Message.MessageType + " " + EncodeJavaScript + "'); // } else // OsNotifyWidget(RichWidgets_Feedback_Message_notifyWidget,'" + Feedback_Message.Feedback_Message.MessageType + " " + EncodeJavaScript + "'); // " localVars.varLcJS = (((((((((localVars.varLcJS + "if ((function(obj, prop){var a = false;\r\n try {\r\n a = typeof(obj) != \'undefined\' && (obj[prop]===obj[prop]);\r\n } catch (ex) { a = false; }\r\n return a;})(parent,\'RichWidgets_Feedback_Message_notifyWidget\') && parent.RichWidgets_Feedback_Message_notifyWidget) {\r\n parent.OsNotifyWidget(parent.RichWidgets_Feedback_Message_notifyWidget,\'") + Convert.ToString(((RCFeedback_MessageRecord)Global.App.OsContext.Session["ContactManager.Feedback_Message"]).ssSTFeedback_Message.ssMessageType)) + " ") + BuiltInFunction.EncodeJavascript(localVars.inParamMessageText)) + "\');\r\n} else\r\n OsNotifyWidget(RichWidgets_Feedback_Message_notifyWidget,\'") + Convert.ToString(((RCFeedback_MessageRecord)Global.App.OsContext.Session["ContactManager.Feedback_Message"]).ssSTFeedback_Message.ssMessageType)) + " ") + BuiltInFunction.EncodeJavascript(localVars.inParamMessageText)) + "\');\r\n"); // JSNotifyFeedback Actions.ActionRunJavaScript(heContext, localVars.varLcJS); }