Questions tagged [freemarker]

Apache FreeMarker™ is a template engine: a Java library to generate text output (HTML web pages, e-mails, configuration files, source code, etc.) based on templates and changing data.

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 views

FreeMarker template evaluates all what is in expressions to null or missing

every help is appreciated. I cannot find mine's mistake I did. A template is not more processed by FreeMarker at first "${error}". I read documentation and compared with others. But it ends ...
ReMadWeb's user avatar
0 votes
1 answer
117 views

How to group and sort items in netsuite advanced pdf template?

In netsuite advanced pdf template to print sales order pdf, I am getting output for club type and club sub type as: Club Type Club Sub type Iron 5 Iron Putter 6 Putter Wood Wood 5 Wedge Wedge 2 ...
Maira S's user avatar
0 votes
1 answer
23 views

How to concatene 2 strings in Freemarker template

I try to concatane 2 strings in my Freemarker template. The first one it's a constant and the second one come from the data model and I use the concatened string to get a label in the resource bundle. ...
Ousmane MBINTE's user avatar
0 votes
0 answers
51 views

Freemarker get null during evaluation of spring message in the spring.ftl springMacroRequestContext function

When I try to display label from resource bundle in HTML Freemarker template using Spring MVC I get a null error on the springMacroRequestContext. I use the spring.ftl macros to have some commons util ...
Ousmane MBINTE's user avatar
-1 votes
0 answers
63 views

Spring Security 6 Session is null, access denied

I noticed the following error with migrating to SpringBoot 3 + Spring Security 6. I have Springboot mvc web-app with main page that must be allowed for not authenticated users. And I am using ...
Bohdan Hrytsai's user avatar
0 votes
0 answers
17 views

Liferay not refreshing the whole page when navigating in between pages

Liferay not refreshing the whole page when navigating in between pages. The image request is not firing in prod env but firing in IT env. The publishEvent("pageview", reportingData) Call ...
hariom gupta's user avatar
0 votes
1 answer
20 views

FileNotFoundException in loading spring.ftl using Freemarker in Spring application

I'm stuck in the integration of Freemarker in my Spring application. I have a lib responsible of the generation of html to pdf it which is inject in my webapp. The spring.ftl is in a templates folder ...
Ousmane MBINTE's user avatar
1 vote
0 answers
50 views

Don't know where to load template "spring.ftl" in Freemarker html template with Spring MVC

I use Freemarker templating in my Srping application to generate PDF files from HTML template. All template was encoded in Base64 and saved in database. So to generate my PDF file I load the Base64 ...
Ousmane MBINTE's user avatar
-1 votes
0 answers
55 views

No qualifying bean of type 'javax.persistence.EntityManagerFactory' available in Freemarker Junit test

I try to generate a pdf document using Spring and Freemarker templating solution. When I try run my document generation using Junit test I have an error regarding the context loading that say : No ...
Ousmane MBINTE's user avatar
0 votes
1 answer
9 views

FTL arithmetic operation

I'm facing a error like below : My Ftl was at first as below : { "U": ${num} + 1 } but output was { "U": 10 + 1 } so tried to change the string to Number: { "U": $...
Lan Aaroon Jabasundar's user avatar
0 votes
0 answers
39 views

Freemarker remove white space between html tags except for one macro

I have a html which has regular html tags with contents and then a user added custom content. I want to remove the white spaces between the html tags in the regular content but do not remove any white ...
CodeJack's user avatar
0 votes
1 answer
25 views

api is evaluated to null in freemaker

I'm testing the freemarker template injection issue, I created a springboot project with <dependency> <groupId>org.freemarker</groupId> <artifactId&...
daisy's user avatar
  • 22.7k
0 votes
2 answers
24 views

Freemarker - How to get unprocessed content of custom directive?

I need to create a Freemarker directive that will pass the unprocessed content of the tag to a java method. The purpose is to load default template fragments into a DB so they can be examined and ...
cmorris's user avatar
  • 591
0 votes
0 answers
29 views

Image background is cut in Java Freemarker pdf template

I have a pdf template made with Java Freemarker and I want to embed an image in base64 encoding like this: "img src="data:image/png;base64," + imgDataAsBase64" Users can upload an ...
B.Mat's user avatar
  • 85
0 votes
2 answers
46 views

Add Serif font to Advanced PDF in NetSuite

I am wanting to have one specific line in an Advanced PDF to show as serif font (Times New Roman to be specific). I have uploaded the .ttf file to the File Cabinet and have "Available without ...
Zachary Belles's user avatar
0 votes
0 answers
52 views

How to use SVG in FTL files

I have a requirement that i need to read the SVG image in FTL file.and i want to change the svg icon image color in HTML or CSS generally we to achieve this in angular we follow the following way. so ...
suri's user avatar
  • 415
0 votes
1 answer
26 views

Freemarker/Topdesk conditional content

I am trying to alter a step in one of our automated actions with freemarker, as the error is caused by a null value, which may be expected. The execution log in Topdesk shows the following: Error ...
Bokkie's user avatar
  • 13
0 votes
1 answer
77 views

Best templating engine to generate files with dynamic content from Spring Boot application

I have a requirement of generating text files with some dynamic content. Like I will generate some content like "Hello <>, how are you?", where name would be dynamic. My application is ...
Anirban's user avatar
  • 937
0 votes
1 answer
33 views

How to catch freemarker TemplateException in ControllerAdvice spring boot?

Trying to figure out how to catch TemplateException in ControllerAdvice to have a possibility to log the exceptions. Here is the configuration: @Configuration public class FreeMarkerConfig { @...
DrWebber's user avatar
0 votes
1 answer
40 views

How to unset link to <span> tagging in Advanced PDF/HTML Templates in NetSuite?

We're having some problems in our PDF Templates. We have a part/code of PDF Template, code below: <td style="font-size:8.0pt"><br />Regards,<br /><br /> ...
cristian cabacaba's user avatar
0 votes
1 answer
98 views

How can I disable/enable a login button in Keycloak?

I'm styling a Keycloak login page and I'm trying to implement logic with JavaScript so that the login button can only be activated if the person enters a username and password. I tested the logic in ...
Letícia's user avatar
0 votes
0 answers
32 views

How to add dynamic Header and Footer Data in PDF Generation using SuiteScript XML in NetSuite?

Is there a way to include specific data in both the header and footer of each page? When the document spans multiple pages, I want to display the sum of the previous page in the header of subsequent ...
Gio Guadalupe's user avatar
0 votes
1 answer
66 views

NetSuite Advanced PDF (Freemarker) source JSON from record and display values

In NetSuite Advanced PDF source JSON array of objects from custom field on Item fulfillment record and iterate and display the values on the PDF. Assigning the JSON does not work. <#assign array = ...
Morris S's user avatar
  • 2,387
0 votes
1 answer
48 views

Spring MVC - spring.ftl is causing double escaping of special characters

So I am using Spring 5.3.xx right now with a simple ftl file (i have simplified it for now) <#import "/spring.ftl" as spring/> <@spring.formInput path="${textInputName}" ...
Arham Ranjha's user avatar
0 votes
1 answer
57 views

Handle Null or Missing Values in FreeMarker

How to distinguish the null values from the missing one. I'm getting the following Java error: freemarker.core.InvalidReferenceException: The following has evaluated to null or missing Objective: I'm ...
abdellah elazzam's user avatar
0 votes
0 answers
10 views

Freemarker template for BAI2 format report

Below is my code for the expected output and am getting errors and I am stuck at this point as to how to solve the error. Code - <#if Records?has_content> <#assign record=Records[0] /> <...
Shivam Bhatt's user avatar
0 votes
0 answers
14 views

How do I get data from another ftl or file when I use ftl?

For example, I would like to know how to get the account balance value. Failed to get data from another file. I also want to know the difference between using ftl language and other languages. What ...
곽재호's user avatar
0 votes
0 answers
42 views

To display the image from the S3 bucket to the Freemarker PDF but I got an error

To display the image from the S3 bucket to the Freemarker PDF but I got an error. I created an API for generated PDFs using Freemarker and I need to display the images inside the PDF file and it ...
Erwin Ello's user avatar
0 votes
1 answer
25 views

the form is not processed in spring

It seems that my program does not process form action. Every time I click on the submit button, the page simply reloads, and there is no entry into the function in @PostMapping at all. Replacing the ...
kefirius's user avatar
0 votes
1 answer
226 views

In a Keycloak "multi-step authentication" process (using custom .ftl templates), how can I go back to a previous step via href?

I'm using Keycloak server development dependency v.21 Due to some specific authentication logic requirement, I created a user authentication process in Keycloak divided into 3 steps: An initial login ...
tony _008's user avatar
  • 657
0 votes
1 answer
231 views

How to force Keycloak to use the browsers default language?

I have setup a Keycloak Server with my own theme. The Keycloak should support multiple languages but I do not want to display a selector. Instead, the Keycloak should fall back to the default browser ...
telion's user avatar
  • 864
0 votes
1 answer
15 views

What is a good way to format a Duration object in freemarker?

I have a java Duration object that should be formatted as hh:mm:ss in xml. <Duration>${duration}</Duration> But it is rendered with the standard format. <Duration>PT30S</Duration&...
John Mercier's user avatar
  • 1,657
0 votes
1 answer
113 views

Group NetSuite Advanced PDF Customer Statement by the Memo field on Invoice

I am trying to group a customer statement by the memo field, and then have different subtotals per Memo. Attached is an image of where I am trying to get to. Effectively each subtotal will be grouped ...
beepboop's user avatar
1 vote
1 answer
42 views

Why does setting freemarkers' default encoding break reading template (everything is in utf-8)?

I have a spring boot project with gradle kts, and I am using the standalone freemarker library implementation("org.freemarker:freemarker:2.3.32") for templating texts for frontend. I put ...
milkamar's user avatar
  • 443
0 votes
0 answers
26 views

Responsys block with list directive breaks browser view

Data is coming in through an API and the payload contains items as a field with multiple properties such as Name, Quantity, Size, color. Here is the email block that uses the List directive: Name: ${...
Amar S's user avatar
  • 1
1 vote
1 answer
202 views

How to override specific portion of a FTL template (Keycloak pages)?

DISCLAIMER: KEYCLOAK NEWBIE HERE !!! I have a set of Keycloak pages that manage the user actions (login page, forgot password page, ...). Every page extends this template.ftl that it's a sort of "...
Ale TheFe's user avatar
  • 1,604
0 votes
0 answers
175 views

How to change subject of keyCloak "executeActions" email?

I would like to customize the subject of the emails sent using "execute-actions-email" REST endpoint depending on the required actions, e.g. : "Update your password" when the ...
Joao Victor Simonassi Farias's user avatar
0 votes
1 answer
79 views

How to use Locale in freemarker template

I am very new to free marker , I having an issue , I want to create a PDF using ftl , there I need to show the data as per locale ,data I want to format as per locale is (double)amount. e.g DataDto{...
The_new_coder's user avatar
0 votes
0 answers
35 views

How to working with list with custom component inside ? magnolia

So i have a list of magnolia code the code suppose to look like this , <ul> [#list cmsfn.children(content.accordionList, "mgnl:contentNode") as accordionList ] <div ...
Rick's user avatar
  • 1
0 votes
1 answer
75 views

The reference to entity "size" must end with the ';' delimiter

I don't understand what the problem might be, it gives the error [Fatal error] :94:69: The reference to the "size" object should end with a separator ';'. <#macro pager url page> &...
Display_name's user avatar
1 vote
1 answer
36 views

Freemarker: truncate_c is not working as expected

According to docs truncate_c should truncate the text at any given place: truncate_c will truncate at any character, not just at word ends. For example, longName?truncate_c(16) returns "This is ...
mipasov's user avatar
  • 303
1 vote
0 answers
30 views

QuillJS add custom blots for freemarker variables

So I have integrated the editor just fine and would like to use it as an online templating editor. On the backend we use freemarker to process the template and therefor I need to be able to have ...
David Fariña's user avatar
1 vote
1 answer
513 views

KeyCloak custom registration url

My Requirement is to append a custom request parameter in registration url of keylcloak and extract it into form My Attempt: Using keycloack.js adapter ,I am able to create a custom registration url ...
Vaibhav Kumar's user avatar
0 votes
1 answer
16 views

Get list of hashes and scalars used in current freemarker template

is there a possibility to get a list of all mentioned hashes and scalars used in my current loaded freemarker template. I have the problem that I have plenty of templates, changing every week, all ...
Holm's user avatar
  • 13
0 votes
1 answer
37 views

Check for freemarker variable set in child in the base template

I am using freemarker to render my frontend. This is an extract of my base.ftlh that I use in my pages as a layout. A lot of pages have a header in a similar style therefore they can set the banner ...
monamona's user avatar
  • 1,227
0 votes
1 answer
47 views

How Do I pass a value of a string variable inside a list directive in freemarker

<#assign currentTaskDefinitionId=" "> <#if taskHistory??> <#assign currentTaskActivitiId= taskHistory.taskActivitiId?number> <#list taskHistory....
Mandeep trekea's user avatar
0 votes
1 answer
46 views

ajax get does not works correctly in freemarker

I'm trying to display a user list on the screen using ajax. however, instead I get only an object. That is, the data in the ftlh file for some reason does not come. Help, why is this happening? and ...
ksushagolubeffa's user avatar
0 votes
0 answers
356 views

get current page url in keycloak email template

I want to get the current page url in keycloak email template. I have made a custom template for emails. If you check their repository especially this line, you can see link parameter. So the link ...
ErDevFy's user avatar
  • 105
0 votes
1 answer
51 views

Trying to join array of strings, such that they occur in next line using FTL template

Here is array of strings, myArray = ["green","blue","red"], I want to display each value in next line on html page "green" "blue" "red" I ...
raj's user avatar
  • 15
0 votes
0 answers
49 views

how to check if a particular xml tag is present or not in ftl file

I have an XML file which looks like below. <GetInventoryBalance xmlns="http://collab.safeway.com/it/architecture/info/default.aspx"> <InventoryBalanceData> <...
Abhishek Gupta's user avatar

1
2 3 4 5
62