|
82 | 82 | * by user config. |
83 | 83 | *# |
84 | 84 | #macro( springBind $path ) |
85 | | - #if ("$!springHtmlEscape" != "") |
| 85 | + #if("$!springHtmlEscape"!="") |
86 | 86 | #set( $status = $springMacroRequestContext.getBindStatus($path, $springHtmlEscape) ) |
87 | 87 | #else |
88 | 88 | #set( $status = $springMacroRequestContext.getBindStatus($path) ) |
|
171 | 171 | * from a list of options. |
172 | 172 | * |
173 | 173 | * 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 |
175 | 175 | * boolean 'false' if the content of $status.value is the String "false" - not |
176 | 176 | * what we want. |
177 | 177 | * |
|
185 | 185 | <select id="#springXmlId(${status.expression})" name="${status.expression}" ${attributes}> |
186 | 186 | #foreach($option in $options.keySet()) |
187 | 187 | <option value="${option}" |
188 | | - #if ("$!status.value" == "$option") selected="selected" #end> |
| 188 | + #if("$!status.value"=="$option") selected="selected" #end> |
189 | 189 | ${options.get($option)}</option> |
190 | 190 | #end |
191 | 191 | </select> |
|
208 | 208 | #foreach($option in $options.keySet()) |
209 | 209 | <option value="${option}" |
210 | 210 | #foreach($item in $status.actualValue) |
211 | | - #if ($item == $option) selected="selected" #end |
| 211 | + #if($item==$option) selected="selected" #end |
212 | 212 | #end |
213 | 213 | >${options.get($option)}</option> |
214 | 214 | #end |
|
231 | 231 | #springBind($path) |
232 | 232 | #foreach($option in $options.keySet()) |
233 | 233 | <input type="radio" name="${status.expression}" value="${option}" |
234 | | - #if ("$!status.value" == "$option") checked="checked" #end |
| 234 | + #if("$!status.value"=="$option") checked="checked" #end |
235 | 235 | ${attributes} |
236 | 236 | #springCloseTag() |
237 | 237 | ${options.get($option)} ${separator} |
|
255 | 255 | #foreach($option in $options.keySet()) |
256 | 256 | <input type="checkbox" name="${status.expression}" value="${option}" |
257 | 257 | #foreach($item in $status.actualValue) |
258 | | - #if ($item == $option) checked="checked" #end |
| 258 | + #if($item==$option) checked="checked" #end |
259 | 259 | #end |
260 | 260 | ${attributes} #springCloseTag() |
261 | 261 | ${options.get($option)} ${separator} |
|
275 | 275 | #macro( springFormCheckbox $path $attributes ) |
276 | 276 | #springBind($path) |
277 | 277 | <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}/> |
279 | 279 | #end |
280 | 280 |
|
281 | 281 | #** |
|
293 | 293 | *# |
294 | 294 | #macro( springShowErrors $separator $classOrStyle ) |
295 | 295 | #foreach($error in $status.errorMessages) |
296 | | - #if ($classOrStyle == "") |
| 296 | + #if($classOrStyle=="") |
297 | 297 | <b>${error}</b> |
298 | 298 | #else |
299 | | - #if ($classOrStyle.indexOf(":") == -1) |
| 299 | + #if($classOrStyle.indexOf(":")==-1) |
300 | 300 | #set($attr="class") |
301 | 301 | #else |
302 | 302 | #set($attr="style") |
|
314 | 314 | * depending on the value of a 'springXhtmlCompliant' variable in the |
315 | 315 | * template context. |
316 | 316 | *# |
317 | | -#macro( springCloseTag )#if ($springXhtmlCompliant)/>#else>#end #end |
| 317 | +#macro( springCloseTag )#if($springXhtmlCompliant)/>#else>#end#end |
318 | 318 |
|
319 | 319 | #macro( springXmlId $id)#if($id)$id.replaceAll("\[","").replaceAll("\]","")#else$id#end#end |
320 | | - |
321 | | - |
322 | | - |
0 commit comments