[
https://issues.apache.org/jira/browse/OFBIZ-5057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14254660#comment-14254660
]
Deepak Dixit commented on OFBIZ-5057:
-------------------------------------
We can close this issue as its working fine for all the possible cases.
{code}
has_content :It is true if the variable exists (and isn't Java null) and is not
``empty'', otherwise it is false.
?? or exists: This operator tells if a value is missing or not. Depending on
that, the result is either true or false, if value exists with null then also
its return true.
{code}
http://freemarker.org/docs/ref_depr_builtin.html
> Image rendering issue on productdetail.ftl
> ------------------------------------------
>
> Key: OFBIZ-5057
> URL: https://issues.apache.org/jira/browse/OFBIZ-5057
> Project: OFBiz
> Issue Type: Bug
> Components: specialpurpose/ecommerce
> Affects Versions: Trunk
> Environment: FTL code, not relevant
> Reporter: Carsten Schinzer
> Priority: Minor
> Original Estimate: 0h
> Remaining Estimate: 0h
>
> Reference: Line 358
> ! <#if productImageList?has_content>
> A validation seems to have been introduced by rev. 1345532 where before on
> the FTL if clause, both checks (not null and hs content) were executed while
> now they are no longer. This leads to a failure to render of no related
> Content Images are on the Product but only attributed image URLs.
> 1 <#if productImageList?if_exists && productImageList?has_content>
> Does the trick, so would the earlier version:
> 2 <#if productImageList != null && productImageList?has_content>
> I also assume that with rev. 1345532 it was intended to put this here:
> 3 <#if productImageList?? && productImageList?has_content>
> I leave it to the FTL pros to comment and recommend for ca. 24 hours.
> If no comment by tomorrow, I shall propose to use the former code
> corresponding to [3] as this is what was the latest agreement made on
> OFBIZ-4916.
>
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)