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:
  • Constructor Details

    • UiUtil

      public UiUtil()
      Constructor.
  • Method Details

    • 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 context
      field - field of object
      row - 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 context
      field - field of object
      row - 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 context
      field - field of object
      row - 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 context
      field - field of object
      row - index in list (nullable)
      Returns:
      Name in vueData
    • indexOf

      public static int indexOf(List<?> uiList, UiObject<?> uiObject)
      Parameters:
      uiList - List du context
      uiObject - 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 boolean
      value - Valeur à formater
      Returns:
      rendu du champs boolean
    • getMinValue

      public static Double getMinValue(String fieldPath)
    • getMaxValue

      public static Double getMaxValue(String fieldPath)
    • getUiDatetimeFormat

      public static String getUiDatetimeFormat(String fieldPath)
    • getStep

      public static Double getStep(Double minValue, Double maxValue)
    • 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
    • compileVueJsTemplate

      public static String compileVueJsTemplate(String template)