Questions tagged [soy-templates]

Soy or Closure Templates is a client- and server-side templating system to dynamically construct reusable HTML and UI components. See https://github.com/google/closure-templates

Soy or Closure Templates is a client- and server-side templating system to dynamically construct reusable HTML and UI components. See https://github.com/google/closure-templates

29 questions
10
votes
3 answers

How can live without inheritance in closure templates in big project?

We use closure library and closure compiler, and we want to use closure templates. But closure templates haven't got inheritance. That's really a problem for us. As I understand, the reason why closure templates don't have inheritance, is because…
3
votes
1 answer

Atlassian Confluence Blueprint wizard - Non existent soy template

I am building a confluence plugin including blueprint wizard dialog with blueprint. But when I try to load the wizard JS error appears in browser console, Uncaught error wizard points to a non-existent Soy template,…
3
votes
1 answer

How to declare and update variables in google closure templates(soy template)

Lets take 2 arrays arr1 = ['a', 'b', 'c'] and arr2 = ['1' , '2', '3']. When passed these arrays as params to a soy template, I want to iterate as shown below and print an index that indicates total items iterated so far. index: 0 //variable assigned…
Srikanth
  • 471
  • 2
  • 14
3
votes
1 answer

How to check for an empty Map in a Soy template?

I've read the docs for Google Soy/Closure templates, but can't find any way to check whether a Map is empty; I can only look up the map's value for a given key. Is there a way to find out the size of a Map? My current workaround is to replace any…
Andrew Swan
  • 13,427
  • 22
  • 69
  • 98
2
votes
1 answer

Custom Bitbucket Merge Check - dynamic fields render twice after submitting the configuration

I'm creating a custom Merge Check for Bitbucket. I started by following this tutorial: https://developer.atlassian.com/server/bitbucket/how-tos/hooks-merge-checks-guide/ I want the view to be dynamic, e.g. have button that creates multiple similar…
2
votes
0 answers

display soy variable value like alert in javascript

Do we have anything equivalent to javascript alert() in soy file to display variable values? I tried using javascript also in soy like below but didnt help (extendedFieldView is a List): <#assign extendedField =…
surm
  • 167
  • 2
  • 11
1
vote
1 answer

How can I render a tr with soy templates?

I've got this soy template {template .myRowTemplate} Hello {/template} and I want to do something like var myTable = goog.dom.createElement("table"); goog.dom.appendChild(myTable,…
Dave Aaron Smith
  • 4,517
  • 32
  • 37
1
vote
1 answer

Failed to load resource:soy template {Not all code is in Soy V 2 syntax (found file simple.soy not in Soy V2 syntax). }

I have two soy templates in my plugin one of them loads fine but other is not getting loaded with 500 Internal server error. I am attaching the error from console. Here is the code I have: {namespace…
user2900150
  • 433
  • 7
  • 13
1
vote
1 answer

Closure Templates: setting global variable from passed paramater in soy file

is there a way to set global variables in the .soy file to parameters passed in from .html? So that all templates would be able to access the global variables to avoid the redundancy of repassing the same parameters to each template. For example…
Emil A
  • 55
  • 7
0
votes
1 answer

Issue with Closure Template (soy templates) rendering via Javascript & jQuery

I'm using javascript along with jQuery to render the closure templates (soy templates). I'm follwing its hello world example. My jsfiddle here . As described in the example, the following code…
0
votes
1 answer

Closure templates - create a reusable alias for complicated `record` definition

I have a soy template that looks like {template .fullView} {@param people: list<[age:int, name:string]>} {call .headers} {param people: $queries /} {/call} {call .content} {param people: $queries /} {/call} {/template} {template…
user3875080
  • 63
  • 1
  • 5
0
votes
0 answers

How to embed a webcontent/portlet in the soy file - Liferay 7?

Is there a way to embed a web content or a portlet inside a soy file in Liferay? Can somebody share with me the codebase to proceed? Thanks much in advance!
Geek
  • 127
  • 1
  • 12
0
votes
1 answer

Closure Compiler (soy) - [JSC_BAD_JSDOC_ANNOTATION] Parse error. illegal use of unknown JSDoc tag "consistentIdGenerator"

After upgrading to the latest closure compiler jar I am getting this error: /home/users/****/js/lib/soyutils.js:1685: WARNING - [JSC_BAD_JSDOC_ANNOTATION] Parse error. illegal use of unknown JSDoc tag "consistentIdGenerator"; ignoring it *…
sanchez
  • 4,519
  • 3
  • 23
  • 53
0
votes
1 answer

What's the right way to create parameters in Soy V2?

Here is my code: {template .someTemplate} {@param? icon : string} /** CSS class that loads and styles the icon */ {@param? headlineHtml : any} /** Headline text with optional html for styling */ {@param? textHtml : any} /** Subtext with…
Reagankm
  • 4,780
  • 9
  • 27
  • 52
0
votes
1 answer

Strange error when delcall deltemplate in closure templates

I use some delegate templates in the project and I use same approach but in some case i have exception. This is the exception I got: Exception is com.google.template.soy.tofu.SoyTofuException: Found no active impl for delegate call to…
1
2