I can't get the same result when I build FORMS App
shanna Feb 18, 2015 6:31 PMI pulled the FORMS app from GitHub, named it "IdeaForm", built an add-on wrapper around it and load it onto the Jive Sandbox. All that works well.
Next, I tried to build it locally with no changes and load it onto the Jive Sandbox and it didn't work. I noticed that the problem is with the "compile-soy" target. That target compiles the soy file in the template directory and create .js file in /target/soy. The /target/soy/fbldr.js file that came down from GitHub shows this (line 9):
jive.fbldr.soy.attachments = function(opt_data, opt_sb) { var output = opt_sb || new soy.StringBuilder(); output.append('<div class="fbldr-attachments"><div class="fbldr-attach-head"><p>Use the following form to upload file attachments and, optionally, include a variable to reference the uploaded file in the form\'s HTML source.</p><p>Multiple files may be attached, but only one at a time. Click "Finished" when all files have been attached.</p></div><div class="fbldr-attach-field"><label>Link to HTML Variable (optional) : </label></div><div class="fbldr-attach-field"><select id="fbldr-attach-link"><option value="" selected="selected">Select HTML variable...</option>'); var optionList34 = opt_data.variables; var optionListLen34 = optionList34.length; for (var optionIndex34 = 0; optionIndex34 < optionListLen34; optionIndex34++) { var optionData34 = optionList34[optionIndex34]; output.append('<option value="', soy.$$escapeHtml(optionData34), '">', soy.$$escapeHtml(optionData34), '</option>'); }
The /target/soy/fbldr.js file I got after running "compile-soy" shows:
jive.fbldr.soy.attachments = function(opt_data, opt_ignored) { var output = '<div class="fbldr-attachments"><div class="fbldr-attach-head"><p>Use the following form to upload file attachments and, optionally, include a variable to reference the uploaded file in the form\'s HTML source.</p><p>Multiple files may be attached, but only one at a time. Click "Finished" when all files have been attached.</p></div><div class="fbldr-attach-field"><label>Link to HTML Variable (optional) : </label></div><div class="fbldr-attach-field"><select id="fbldr-attach-link"><option value="" selected="selected">Select HTML variable...</option>'; var optionList34 = opt_data.variables; var optionListLen34 = optionList34.length; for (var optionIndex34 = 0; optionIndex34 < optionListLen34; optionIndex34++) { var optionData34 = optionList34[optionIndex34]; output += '<option value="' + soy.$$escapeHtml(optionData34) + '">' + soy.$$escapeHtml(optionData34) + '</option>'; }
Notice the second parameter of the function is opt_sb vs opt_ignored. The next line of code (var output) is completely different. I suspect there are other differences. What I don't understand is why. "compile-soy" depends on SoyToJsSrcCompiler.jar, is there a specific version of the jar I need?
With the files I built locally, the add-on loaded fine but the form UI is blank.