langs.html5ftl.header.vm Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jbpm-gwt-form-exporter-freemarker Show documentation
Show all versions of jbpm-gwt-form-exporter-freemarker Show documentation
jBPM Form Exporter for Freemarker (both HTML4 and HTML5) for form representational API
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 ($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 >
\#if>
\#if>
#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 printi18nheader 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
<\#if \$value??> $valueFormatted <\#else> $labelFormatted \#if>
\#macro>
#set ($oneventxParam = ${language.getOnEventParams($item)})
<@printi18nheader label="#if($value)$value#end" />