Class UiUtil
- java.lang.Object
-
- io.vertigo.ui.impl.springmvc.util.UiUtil
-
- All Implemented Interfaces:
Serializable
public final class UiUtil extends Object implements Serializable
Class utilitaire pour le rendu des pages en jsp/ftl.- Author:
- npiedeloup
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UiUtil()
Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static String
compileVueJsTemplate(String template)
static String
contextGet(String object, String field, String row)
static String
contextKey(UiObject<?> uiObject)
Deprecated.not used : removed soonstatic String
contextKey(String object, String field, String row)
static String
formatBoolean(String fieldPath, Boolean value)
static String
generateComponentUID(String component, String object, String field, String row)
static String
getCurrentLocaleForQuasar()
Get the current locale tag (either the user's or the node (see LocaleManager javadoc) ex : fr, enUs, enGb, es, itstatic String
getCurrentLocalePrefixForQuasar()
Get the current locale prefix (either the user's or the node (see LocaleManager javadoc) ex : fr, en-us, en-gb, es, itstatic String
getDisplayField(String uiListKey)
static String
getIdField(String uiListKey)
static Double
getMaxValue(String fieldPath)
static Double
getMinValue(String fieldPath)
static Double
getStep(Double minValue, Double maxValue)
static int
indexOf(List<?> uiList, UiObject<?> uiObject)
static String
label(String fieldPath)
static boolean
required(String fieldPath)
static String
smartTypeAlign(String object, String fieldName, String overrideValue)
static String
smartTypeCss(String object, String fieldName, String overrideValue, String defaultValue)
static Integer
smartTypeMaxLength(String object, String fieldName)
static String
smartTypeUnit(String object, String fieldName, String overrideValue)
static String
vueDataKey(String object, String field, String row)
-
-
-
Method Detail
-
contextKey
@Deprecated public static String contextKey(UiObject<?> uiObject)
Deprecated.not used : removed soon- Parameters:
uiObject
- Object du context- Returns:
- Nom de l'object dans le context
-
generateComponentUID
public static String generateComponentUID(String component, String object, String field, String row)
- Parameters:
object
- Object in contextfield
- field of objectrow
- index in list (nullable)- Returns:
- Name in context (use for input name)
-
contextKey
public static String contextKey(String object, String field, String row)
- Parameters:
object
- Object in contextfield
- field of objectrow
- index in list (nullable)- Returns:
- Name in context (use for input name)
-
contextGet
public static String contextGet(String object, String field, String row)
- Parameters:
object
- Object in contextfield
- field of objectrow
- index in list (nullable)- Returns:
- Name in context (use for getting key)
-
vueDataKey
public static String vueDataKey(String object, String field, String row)
- Parameters:
object
- Object in contextfield
- field of objectrow
- index in list (nullable)- Returns:
- Name in vueData
-
indexOf
public static int indexOf(List<?> uiList, UiObject<?> uiObject)
- Parameters:
uiList
- List du contextuiObject
- Objet de la liste- Returns:
- index de l'objet dans sa liste
-
label
public static String label(String fieldPath)
- Parameters:
fieldPath
- Chemin du champ- Returns:
- Label du champs
-
smartTypeUnit
public static String smartTypeUnit(String object, String fieldName, String overrideValue)
- Parameters:
fieldPath
- Chemin du champ- Returns:
- unit of the field
-
smartTypeMaxLength
public static Integer smartTypeMaxLength(String object, String fieldName)
- Parameters:
fieldPath
- Chemin du champ- Returns:
- maxLength of the field
-
smartTypeCss
public static String smartTypeCss(String object, String fieldName, String overrideValue, String defaultValue)
- Parameters:
fieldPath
- Chemin du champ- Returns:
- css of the field
-
smartTypeAlign
public static String smartTypeAlign(String object, String fieldName, String overrideValue)
- Parameters:
fieldPath
- Chemin du champ- Returns:
- align direction of the field
-
formatBoolean
public static String formatBoolean(String fieldPath, Boolean value)
- Parameters:
fieldPath
- Chemin du champ booleanvalue
- Valeur à formater- Returns:
- rendu du champs boolean
-
required
public static boolean required(String fieldPath)
- Parameters:
fieldPath
- Chemin du champ- Returns:
- Si le champs est obligatoire
-
getDisplayField
public static String getDisplayField(String uiListKey)
- Parameters:
uiList
- liste du context- Returns:
- Nom du champ display de cette liste
-
getIdField
public static String getIdField(String uiListKey)
- Parameters:
uiList
- liste du context- Returns:
- Nom du champ de l'id de cette liste
-
getCurrentLocalePrefixForQuasar
public static String getCurrentLocalePrefixForQuasar()
Get the current locale prefix (either the user's or the node (see LocaleManager javadoc) ex : fr, en-us, en-gb, es, it- Returns:
- the locale (in the quasar's style) to download the right js file
-
getCurrentLocaleForQuasar
public static String getCurrentLocaleForQuasar()
Get the current locale tag (either the user's or the node (see LocaleManager javadoc) ex : fr, enUs, enGb, es, it- Returns:
- the locale (in the quasar's style) to select the right language in quasar
-
-