All Downloads are FREE. Search and download functionalities are using the official Maven repository.

langs.html5ftl.label.vm Maven / Gradle / Ivy

The newest version!
#set ($classParam = ${language.getParam("class", $item.cssName)})
#set ($width = ${language.getStyleParam("width", $item.width)})
#set ($height = ${language.getStyleParam("height", $item.height)})
#set ($idParam = ${language.getStyleParam("id", $item.id)})
#set ($sytle = "$width$height")
<#assign value="">
<\#if $locale??>
  <#assign $localeData=[
  #foreach ($entry in ${item.getI18n().entrySet()})
    "${entry.getKey()}" => "${entry.getValue()}",
  #end
    "LAST_ELEMENT_KEY", "LAST_ELEMENT_VALUE"
  ] >
  #set($i18nval = '$localeData[$locale]')
  <\#if ${i18nval}??>
    <#assign $value = $i18nval >
  

#set ($styleParam = ${language.getParam("style", $style)})
##TODO getItemValidations
#set ($value = $item.value) 
#if ($item.input)
  #if ($item.input.name)
    #set ($aux = ${item.input.name})
    #set ($value = ${language.asFtlVar($aux)})
  #end
#end 
<\#macro printi18nlabel label>
    #set($valueFormatted = '${value}')
    #set($labelFormatted = '${label}')
    #if ($item.format)
      #if ($item.format == "CURRENCY")
        #set ($valueFormatted = '${value?string.currency}')
        #set ($labelFormatted = '${label?string.currency}')
      #end
      #if ($item.format == "NUMBER")
        #set($valueFormatted = '${value?string.number}')
        #set($labelFormatted = '${label?string.number}')
      #end
      #if ($item.format == "DATE")
        #set($valueFormatted = '${value?string.short}')
        #set($labelFormatted = '${label?string.short}')
      #end
      #if ($item.format == "DATETIME")
        #set($valueFormatted = '${value?string.short_short}')
        #set($labelFormatted = '${label?string.short_short}')
      #end
      #if ($item.format == "PERCENT")
        #set($valueFormatted = '${value?string.percent}')
        #set($labelFormatted = '${label?string.percent}')
      #end
      #if ($item.format == "INTEGER")
        #set($valueFormatted = '${value?string("0")}')
        #set($labelFormatted = '${label?string("0")}')
      #end
    #end
      #set($__val = '$value??')
      <\#if $__val> $valueFormatted <\#else> $labelFormatted 

#set ($oneventxParam = ${language.getOnEventParams($item)})





© 2015 - 2024 Weber Informatics LLC | Privacy Policy