How does the ?string for boolean work
"Newman, John W" <[email protected]>
| Newsgroups | gmane.comp.web.freemarker.user |
|---|---|
| Message-ID | <EE3D0D387D01C8498EC1CED489DEAB2537F9BB40B0@msxmbxnsprd01.acct.upmchs.net> |
Hi,
Is the ?string built in like the ternary operator? I mean, does it evaluate the expression first and then process just one side, or does it process both sides first? I'm thinking it is the latter, and it should work the other way if possible.
Here's what I'm doing, I feel that it should work but it doesn't.
[#list 0..options?size - 1 as i]
[#assign current = options[i] /]
<div id="options.${current}.prev" class="hidden">${(i == 0)?string('', options[i - 1])}</div>
<div id="options.${current}.next" class="hidden">${(i == options?size - 1)?string('', options[i + 1])}</div>
[/#list]
The processing fails at evaluating options[i - 1] the first time, even though i == 0 and it should just dump out ''. So can that built in evaluate the expression before both the values? Does it and I'm doing something wrong? Thoughts?
The context of what I'm doing here is pretty out there, and if the IE team didn't take 4 years to fix a bug with their select widget I wouldn't be in this situation. All I need to do is hide options in a select widget.... They have known about this since 2004, rewrote the select widget to not use the shell32 one for IE7, but didn't add that functionality to the new widget (and lot of other standards compliant stuff was skipped). We won't see that until IE8 which is at least 2011 ... that's right it is going to take them 7+ years to do that!
I asked you guys about varargs support and within 2 weeks it was done and released! Yet the 'best' software company we have takes 7 years to support standards! crazy world...
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
FreeMarker-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freemarker-user