Re: Comparison Issue

Daniel Dekany <[email protected]> Wed, 3 Feb 2016 22:28:02 +0100
Newsgroups gmane.comp.web.freemarker.devel
Message-ID <[email protected]>
It's the browser that does those things (interpreting HTML and CSS),
so it's not related to FreeMarker. The HTML that you generate with
FreeMarker must differ from the one that has worked in some relevant
way. If you generate the same HTML with FreeMarker, it will look
exactly the same.


Wednesday, February 3, 2016, 5:14:19 PM, MG 2016 wrote:

> Hi Daniel,
>
> I sorted the integer issue out but this one is driving me crazy! I
> can't see to get two divs floating across each other and show text.
> This code works fine in normal html pages but not using free marker!
> Any ideas? The text Test is not displayed.
>
> <?xml version=3D"1.0" ?>
> <!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
> <pdf>
> =C2  =C2  <head>
> =C2  =C2  =C2  =C2 <style type=3D"text/css">
> =C2  #details {
> =C2  =C2  background-color: lightblue;
> =C2  =C2  width: 50%;
> =C2  =C2  height: 100px;
> =C2  }
> =C2 =C2 =

> =C2  #summary {
> =C2  =C2  background-color: red;
> =C2  =C2  width: 50%;
> =C2  =C2  height: 100px;
> =C2  }
>
> </style>
> </head>
>
> <body>
> =C2  <div id=3D"details" style=3D"float:left; display:inline"> <span>test=
</span> </div>
> =C2  <div id=3D"summary" style=3D"float:left; display:inline"> <span>test=
</span> </div>
> =C2  =C2  </body>
> </pdf>
>
> On Thu, Jan 28, 2016 at 1:18 AM, Daniel Dekany [via FreeMarker] <[hidden =
email]> wrote:
> If it's a number then you need "record.quantity =3D=3D 14". The others =

> (?size an ?length) should give you an error, as number has no size or =

> length. Do they not? Something strange is going on there... do they =

> suppress FreeMarker errors and output nothing? If quantity is a string
> that looks like a number, then you should also get an error (for =

> comparing a string to a number), but then you could use =

> "record.quantity?number =3D=3D 14". (BTW, you can easily try these =

> scenarios on http://freemarker-online.kenshoo.com/) =

>
>
> Wednesday, January 27, 2016, 11:17:05 PM, MG 2016 wrote: =

>
>> Thanks for getting back. =

>> =

>> I am still trying to work out the exact type of quantity. I assumed it w=
as =

>> an int because the out put on the form is always an int. I am trying to =

>> generate a PDF within NetSuite ERP. =

>> =

>> None of these seem to work for me. But I can see the text if I use !=3D =

>> =

>> <#if record.quantity?size =3D=3D14>TEST</#if> =

>> <#if record.quantity?length=3D=3D14>TEST</#if> =

>> <#if record.quantity =3D=3D14>TEST</#if> =


-- =

Thanks,
 Daniel Dekany


---------------------------------------------------------------------------=
---
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=3D272487151&iu=3D/4140