Class Reference
IRIS for UNIX 2019.4
InterSystems: The power behind what matters   
Documentation  Search
  [%SYS] >  [%CSP] >  [DwxUtils]
Private  Storage   

abstract class %CSP.DwxUtils

This class is used internally by InterSystems IRIS. You should not make direct use of it within your applications. There is no guarantee made about either the behavior or future operation of this class.

This class provides utility methods for CSPBIND related tools.

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
22


Summary

Methods
EscapeStream GetElementChildren GetHTMLForField GetLogicalValue
GetMemberInfo GetPropertyCaption GetPropertyCollection GetPropertyMaxLen
GetPropertyParam GetPropertyType GetReferenceInfo GetSetCode
GetValueExpression HasD2L HasL2D IsMethod
IsPropertyReadOnly IsPropertyRequired IsPropertySearchable IsPropertyStream
ListToDisplay Test


Methods

• classmethod EscapeStream(stream As %AbstractStream, mode As %String = "HTML") as %String
Writes out the contents of the stream as quoted text.
mode can be HTML or JS.
• classmethod GetElementChildren(parent As %CSP.Element, ByRef children)
Recursively builds an array of orefs to all the children of element parent. Text atoms are not included.
• classmethod GetHTMLForField(class As %String, bind As %String, readonly As %Boolean = 0, precaption As %String = "", postcaption As %String = ":") as %String
Returns the HTML (as a table row) for a control for the specified binding. !!! pass in query/field for reference combo!
• classmethod GetLogicalValue(class As %String, member As %String, value As %String, varname As %String) as %String
Used by the csp:search tag to return a code snippet to retrieve the logical value of the specified class member. Constructs a command to convert the display value in the variable named varname to a logical value and save it in the variable named value.
• classmethod GetMemberInfo(class As %String, member As %String, ByRef mtype As %String) as %String
Returns information about what kind of member member is.

Upon return, mtype contains either a property type, in the case of a property, or a return type in the case of a method. Possible return values include:
LITERALA literal property
MULTIDIMA multidimensional property
PERSISTENTA reference property
SERIALA serial property
METHODA method
IDThe %Id() method
STREAMA stream attribute
BSTREAMA binary stream attribute
LISTA list of datatypes attribute
LISTOBJA list of objects attribute
""Not a member

• classmethod GetPropertyCaption(class As %String, prop As %String) as %String
Return a string containing the caption for property prop of class class.
• classmethod GetPropertyCollection(class As %String, prop As %String) as %String
Return a string indicating whether property prop of class class is a collection.
• classmethod GetPropertyMaxLen(class As %String, prop As %String) as %String
Return the value of the MAXLEN parameter (or "" if not defined) for property prop of class class.
• classmethod GetPropertyParam(class As %String, prop As %String, param As %String) as %String
Return a string containing value of parameter param for property prop of class class.
• classmethod GetPropertyType(class As %String, prop As %String) as %String
Return a string containing the data type (class name) for property prop of class class.
• classmethod GetReferenceInfo(class As %String, member As %String, ByRef mtype As %String, ByRef mname As %String, ByRef mcontainer As %String) as %String
This returns the same information as getMemberInfo except that the information pertains to the member referenced by member.

mname is the referenced member name.

mcontainer is name of the class containing the member. (equal to class if member is not an extended reference.

• classmethod GetSetCode(class As %String, member As %String, oref As %String, varname As %String, caption As %String, testcode As %String = "", listmode As %String = "") as %String
Used by form tag to return a code snippet containing a code snippet to set the value of the specified class member. oref is the name of the oref variable. varname is the name of the variable containing the value to set into the member. caption is name used in the generated error message.

As caption is used to create a JavaScript message, it needs to have any special characters quoted accordingly.

• classmethod GetValueExpression(class As %String, member As %String, oref As %String, mode As %String = "HTML", listmode As %String = "S", pagelanguage As %String = "cache", js As %Boolean = 0) as %String
Used by form tag to get the value of the VALUE attribute for an HTML control bound to this member. oref is the name of the oref variable.
• classmethod HasD2L(class As %String, prop As %String) as %Boolean
Returns true if property prop has a DisplayToLogical method.
• classmethod HasL2D(class As %String, prop As %String) as %Boolean
Returns true if property prop has a LogicalToDisplay method.
• classmethod IsMethod(class As %String, prop As %String) as %String
Does the string prop represent a method? If not return "", if so return the name of the method.
• classmethod IsPropertyReadOnly(class As %String, prop As %String) as %Boolean
Returns whether property prop of class class is read only.
• classmethod IsPropertyRequired(class As %String, prop As %String) as %Boolean
Returns whether property prop of class class is a required field.
• classmethod IsPropertySearchable(class As %String, prop As %String) as %Boolean
Returns whether property prop of class class has an index defined.
• classmethod IsPropertyStream(class As %String, prop As %String) as %Boolean
Returns whether property prop of class class is a stream.
• classmethod ListToDisplay(list As %Collection.ListOfDT, delim As %String = {$char(13, 10)}, mode As %String = "HTML") as %String
Gets the contents of a list of datatypes as a delimiter separated string
• classmethod Test()
Test method


Copyright (c) 2019 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.