|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.indexdata.mkjsf.utils.UiUtils
@Named(value="pzui") @ApplicationScoped public class UiUtils
UI utilities
Constructor Summary | |
---|---|
UiUtils()
|
Method Summary | |
---|---|
static String |
concat(String... strings)
Concatenates a list of strings |
static String |
concatMaxLength(int maxTotalLength,
String... strings)
|
List<ResponseDataObject> |
getMaxElements(ResponseDataObject container,
String elementName,
int maxElements,
int maxTotalValueLength,
boolean hardLimit)
Gets at most maxElements data objects, up to a total string length of maxTotalValueLength |
static List<ResponseDataObject> |
getMaxNumElements(ResponseDataObject container,
String elementName,
int maxElements)
Gets at most maxElements elements of the given elementName |
static String |
maxLength(String string,
int maxLength)
|
static String |
maxLengthMoreLabel(String string,
int maxLength,
String moreLabel)
|
static String |
quote(String string)
Encloses a string with quotation marks |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UiUtils()
Method Detail |
---|
public static String concat(String... strings)
strings
-
public static String concatMaxLength(int maxTotalLength, String... strings)
public static String maxLength(String string, int maxLength)
public static String maxLengthMoreLabel(String string, int maxLength, String moreLabel)
public static String quote(String string)
string
-
public static List<ResponseDataObject> getMaxNumElements(ResponseDataObject container, String elementName, int maxElements)
container
- The parent element containing the elements to retrieveelementName
- The name of the element(s) to retrievemaxElements
- Maximum number of elements to retrieve
public List<ResponseDataObject> getMaxElements(ResponseDataObject container, String elementName, int maxElements, int maxTotalValueLength, boolean hardLimit)
container
- The parent element containing the elements to retrieveelementName
- The name of the element(s) to retrievemaxElements
- Maximum number of elements to retrievemaxTotalValueLength
- The maximum total string length of the values of the elements retrievedhardLimit
- If set to true, the list will be cut of at or below the total string length, if false, the list
will contain the first element that exceeds the length limit - for instance thus guaranteeing
that at least one of the elements will be returned, no matter it's length.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |