Rearranged statement whitespace in Velocity macros
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
* by user config.
|
||||
*#
|
||||
#macro( springBind $path )
|
||||
#if ("$!springHtmlEscape" != "")
|
||||
#if("$!springHtmlEscape"!="")
|
||||
#set( $status = $springMacroRequestContext.getBindStatus($path, $springHtmlEscape) )
|
||||
#else
|
||||
#set( $status = $springMacroRequestContext.getBindStatus($path) )
|
||||
@@ -171,7 +171,7 @@
|
||||
* from a list of options.
|
||||
*
|
||||
* The null check for $status.value leverages Velocity's 'quiet' notation rather
|
||||
* than the more common #if ($status.value) since this method evaluates to the
|
||||
* than the more common #if($status.value) since this method evaluates to the
|
||||
* boolean 'false' if the content of $status.value is the String "false" - not
|
||||
* what we want.
|
||||
*
|
||||
@@ -185,7 +185,7 @@
|
||||
<select id="#springXmlId(${status.expression})" name="${status.expression}" ${attributes}>
|
||||
#foreach($option in $options.keySet())
|
||||
<option value="${option}"
|
||||
#if ("$!status.value" == "$option") selected="selected" #end>
|
||||
#if("$!status.value"=="$option") selected="selected" #end>
|
||||
${options.get($option)}</option>
|
||||
#end
|
||||
</select>
|
||||
@@ -208,7 +208,7 @@
|
||||
#foreach($option in $options.keySet())
|
||||
<option value="${option}"
|
||||
#foreach($item in $status.actualValue)
|
||||
#if ($item == $option) selected="selected" #end
|
||||
#if($item==$option) selected="selected" #end
|
||||
#end
|
||||
>${options.get($option)}</option>
|
||||
#end
|
||||
@@ -231,7 +231,7 @@
|
||||
#springBind($path)
|
||||
#foreach($option in $options.keySet())
|
||||
<input type="radio" name="${status.expression}" value="${option}"
|
||||
#if ("$!status.value" == "$option") checked="checked" #end
|
||||
#if("$!status.value"=="$option") checked="checked" #end
|
||||
${attributes}
|
||||
#springCloseTag()
|
||||
${options.get($option)} ${separator}
|
||||
@@ -255,7 +255,7 @@
|
||||
#foreach($option in $options.keySet())
|
||||
<input type="checkbox" name="${status.expression}" value="${option}"
|
||||
#foreach($item in $status.actualValue)
|
||||
#if ($item == $option) checked="checked" #end
|
||||
#if($item==$option) checked="checked" #end
|
||||
#end
|
||||
${attributes} #springCloseTag()
|
||||
${options.get($option)} ${separator}
|
||||
@@ -275,7 +275,7 @@
|
||||
#macro( springFormCheckbox $path $attributes )
|
||||
#springBind($path)
|
||||
<input type="hidden" name="_#springXmlId(${status.expression})" value="on"/>
|
||||
<input type="checkbox" id="#springXmlId(${status.expression})" name="${status.expression}"#if ("$!{status.value}"=="true") checked="checked"#end ${attributes}/>
|
||||
<input type="checkbox" id="#springXmlId(${status.expression})" name="${status.expression}"#if("$!{status.value}"=="true") checked="checked"#end ${attributes}/>
|
||||
#end
|
||||
|
||||
#**
|
||||
@@ -293,10 +293,10 @@
|
||||
*#
|
||||
#macro( springShowErrors $separator $classOrStyle )
|
||||
#foreach($error in $status.errorMessages)
|
||||
#if ($classOrStyle == "")
|
||||
#if($classOrStyle=="")
|
||||
<b>${error}</b>
|
||||
#else
|
||||
#if ($classOrStyle.indexOf(":") == -1)
|
||||
#if($classOrStyle.indexOf(":")==-1)
|
||||
#set($attr="class")
|
||||
#else
|
||||
#set($attr="style")
|
||||
@@ -314,9 +314,6 @@
|
||||
* depending on the value of a 'springXhtmlCompliant' variable in the
|
||||
* template context.
|
||||
*#
|
||||
#macro( springCloseTag )#if ($springXhtmlCompliant)/>#else>#end #end
|
||||
#macro( springCloseTag )#if($springXhtmlCompliant)/>#else>#end#end
|
||||
|
||||
#macro( springXmlId $id)#if($id)$id.replaceAll("\[","").replaceAll("\]","")#else$id#end#end
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user