java.lang.String | abbreviate(java.lang.String, int) |
Abbreviate the given text on the given size limit with ellipsis.
|
java.lang.String | concat(java.lang.Object, java.lang.Object) |
Concatenate the string representation of the given objects. This is useful when you don't know
beforehand if one of the both hands is a string or is null , otherwise the new EL 2.2
#{bean.string1.concat(bean.string2)} can just be used.
|
java.lang.String | prettyURL(java.lang.String) |
URL-prettify the given string. It performs the following tasks:
- Lowercase the string.
- Remove combining diacritical marks.
- Replace non-alphanumeric characters by hyphens.
This is useful when populating links with dynamic paths obtained from user controlled variables, such
as blog titles.
|
java.lang.String | encodeURL(java.lang.String) |
URL-encode the given string using UTF-8. This is useful for cases where you can't use
<f:param> .
|
java.lang.String | escapeJS(java.lang.String) |
Escapes the given string according the JavaScript code rules. This escapes among others the special
characters, the whitespace, the quotes and the unicode characters. Useful whenever you want to use a
Java string variable as a JavaScript string variable.
|
java.lang.Object[] | createArray(int) |
Creates and returns a dummy object array of the given size. This is useful if you want to iterate
n times over an <ui:repeat> , which doesn't support EL in begin
and end attributes.
|
java.lang.int[] | createIntegerArray(int, int) |
Creates and an integer array which starts at the given integer and ends at the given integer, inclusive. This is
useful if you want to for example populate a <f:selectItems> which shows an integer range to
represent days and years.
|
boolean | contains(java.lang.Object[], java.lang.Object) |
Returns true if the string representation of an item of the given array equals to the
string representation of the given item. This returns false if either the array or the
item is null. This is useful if you want to for example check if #{paramValues.foo}
contains a certain value.
|
java.lang.String | formatBytes(java.lang.Long) |
Format the given bytes to nearest 10n with IEC binary unit (KiB, MiB, etc) with rounding
precision of 1 fraction. For example:
- 1023 bytes will appear as 1023 B
- 1024 bytes will appear as 1.0 KiB
- 500000 bytes will appear as 488.3 KiB
- 1048576 bytes will appear as 1.0 GiB
|
java.util.List | setToList(java.util.Set) |
Converts a Set<E> to a List<E> . Useful when you want to iterate
over a Set in for example <ui:repeat> .
|
java.util.List | mapToList(java.util.Map) |
Converts a Map<K, V> to a List<Map.Entry<K, V>> . Useful when
you want to iterate over a Map in for example <ui:repeat> . Each of the
entries has the usual getKey() and getValue() methods.
|
java.lang.String | printStackTrace(java.lang.Throwable) |
Print the stack trace of the given exception.
|
java.lang.String | formatDate(java.util.Date, java.lang.String) |
Format the given date in the given pattern and system default timezone. This is useful when you want to
format dates in for example the title attribute of an UI component, or the
itemLabel attribute of select item, or wherever you can't use the
<f:convertDateTime> tag.
|
java.lang.String | formatDateWithTimezone(java.util.Date, java.lang.String, java.lang.String) |
Format the given date in the given pattern with given timezone. This is useful when you want to format
dates in for example the title attribute of an UI component, or the itemLabel
attribute of select item, or wherever you can't use the <f:convertDateTime> tag.
|
java.util.Map | getMonths() |
Returns a mapping of month names by month numbers for the current locale. For example: "January=1", "February=2",
etc. This is useful if you want to for example populate a <f:selectItems> which shows all
months. The locale is obtained by Faces#getLocale(). The mapping is per locale stored in a local cache
to improve retrieving performance.
|
java.util.Map | getShortMonths() |
Returns a mapping of short month names by month numbers for the current locale. For example: "Jan=1", "Feb=2",
etc. This is useful if you want to for example populate a <f:selectItems> which shows all
short months. The locale is obtained by Faces#getLocale(). The mapping is per locale stored in a local
cache to improve retrieving performance.
|