Skip to content

Commit 7bc9660

Browse files
committed
Rearranged statement whitespace in Velocity macros
1 parent d917b8a commit 7bc9660

File tree

1 file changed

+10
-13
lines changed
  • spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity

1 file changed

+10
-13
lines changed

spring-webmvc/src/main/java/org/springframework/web/servlet/view/velocity/spring.vm

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
* by user config.
8383
*#
8484
#macro( springBind $path )
85-
#if ("$!springHtmlEscape" != "")
85+
#if("$!springHtmlEscape"!="")
8686
#set( $status = $springMacroRequestContext.getBindStatus($path, $springHtmlEscape) )
8787
#else
8888
#set( $status = $springMacroRequestContext.getBindStatus($path) )
@@ -171,7 +171,7 @@
171171
* from a list of options.
172172
*
173173
* The null check for $status.value leverages Velocity's 'quiet' notation rather
174-
* than the more common #if ($status.value) since this method evaluates to the
174+
* than the more common #if($status.value) since this method evaluates to the
175175
* boolean 'false' if the content of $status.value is the String "false" - not
176176
* what we want.
177177
*
@@ -185,7 +185,7 @@
185185
<select id="#springXmlId(${status.expression})" name="${status.expression}" ${attributes}>
186186
#foreach($option in $options.keySet())
187187
<option value="${option}"
188-
#if ("$!status.value" == "$option") selected="selected" #end>
188+
#if("$!status.value"=="$option") selected="selected" #end>
189189
${options.get($option)}</option>
190190
#end
191191
</select>
@@ -208,7 +208,7 @@
208208
#foreach($option in $options.keySet())
209209
<option value="${option}"
210210
#foreach($item in $status.actualValue)
211-
#if ($item == $option) selected="selected" #end
211+
#if($item==$option) selected="selected" #end
212212
#end
213213
>${options.get($option)}</option>
214214
#end
@@ -231,7 +231,7 @@
231231
#springBind($path)
232232
#foreach($option in $options.keySet())
233233
<input type="radio" name="${status.expression}" value="${option}"
234-
#if ("$!status.value" == "$option") checked="checked" #end
234+
#if("$!status.value"=="$option") checked="checked" #end
235235
${attributes}
236236
#springCloseTag()
237237
${options.get($option)} ${separator}
@@ -255,7 +255,7 @@
255255
#foreach($option in $options.keySet())
256256
<input type="checkbox" name="${status.expression}" value="${option}"
257257
#foreach($item in $status.actualValue)
258-
#if ($item == $option) checked="checked" #end
258+
#if($item==$option) checked="checked" #end
259259
#end
260260
${attributes} #springCloseTag()
261261
${options.get($option)} ${separator}
@@ -275,7 +275,7 @@
275275
#macro( springFormCheckbox $path $attributes )
276276
#springBind($path)
277277
<input type="hidden" name="_#springXmlId(${status.expression})" value="on"/>
278-
<input type="checkbox" id="#springXmlId(${status.expression})" name="${status.expression}"#if ("$!{status.value}"=="true") checked="checked"#end ${attributes}/>
278+
<input type="checkbox" id="#springXmlId(${status.expression})" name="${status.expression}"#if("$!{status.value}"=="true") checked="checked"#end ${attributes}/>
279279
#end
280280

281281
#**
@@ -293,10 +293,10 @@
293293
*#
294294
#macro( springShowErrors $separator $classOrStyle )
295295
#foreach($error in $status.errorMessages)
296-
#if ($classOrStyle == "")
296+
#if($classOrStyle=="")
297297
<b>${error}</b>
298298
#else
299-
#if ($classOrStyle.indexOf(":") == -1)
299+
#if($classOrStyle.indexOf(":")==-1)
300300
#set($attr="class")
301301
#else
302302
#set($attr="style")
@@ -314,9 +314,6 @@
314314
* depending on the value of a 'springXhtmlCompliant' variable in the
315315
* template context.
316316
*#
317-
#macro( springCloseTag )#if ($springXhtmlCompliant)/>#else>#end #end
317+
#macro( springCloseTag )#if($springXhtmlCompliant)/>#else>#end#end
318318

319319
#macro( springXmlId $id)#if($id)$id.replaceAll("\[","").replaceAll("\]","")#else$id#end#end
320-
321-
322-

0 commit comments

Comments
 (0)