Package com.webmethods.caf.faces.el
Class CAFFunctions
java.lang.Object
com.webmethods.caf.faces.el.CAFFunctions
CAF functions exposed as expression-language functions under the "caf" namespace.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Creates client-side control id from server-side id.static String
Creates selector safe client-side control id from server-side id.static Boolean
Validates that the specified value is a boolean.static String
Escapes the specified string to be safe for use in html or html-attribute content.static String
Escapes the specified string to be safe for use in a javascript string.static Number
Validates that the specified value is a number.static String
Validates that the specified url starts with a safe url scheme.static String
Escapes the specified string to be safe for use in a url-parameter name or value.
-
Field Details
-
PREFIX
Standard prefix for CAF functions ("caf").- See Also:
-
-
Constructor Details
-
CAFFunctions
public CAFFunctions()
-
-
Method Details
-
cid
Creates client-side control id from server-side id.- Parameters:
id
- Server-side id.- Returns:
- Client-side id.
-
scid
Creates selector safe client-side control id from server-side id. The colon ':' character is reserved for the CSS/JS selector so this function will escape all of the colon characters by placing two backslashes in front of them.- Parameters:
id
- Server-side id.- Returns:
- Client-side id.
-
xh
Escapes the specified string to be safe for use in html or html-attribute content.- Parameters:
s
- String to escape.- Returns:
- Escaped string.
-
xu
Escapes the specified string to be safe for use in a url-parameter name or value.- Parameters:
s
- String to escape.- Returns:
- Escaped string.
-
xs
Validates that the specified url starts with a safe url scheme.- Parameters:
s
- URL to validate.- Returns:
- URL if its scheme is safe; empty-string ("") if its scheme is not safe.
-
xj
Escapes the specified string to be safe for use in a javascript string.- Parameters:
s
- String to escape.- Returns:
- Escaped string.
-
xb
Validates that the specified value is a boolean.- Parameters:
o
- Value to validate.- Returns:
- Boolean true if the value is true; false if the value is false or not a boolean value.
-
xn
Validates that the specified value is a number.- Parameters:
o
- Value to validate.- Returns:
- The number if the value is a number; 0 if the value is not a number.
-