Hello, I am creating a plugin for new page template and I want to pass some javascript into wizard screen, but for some reason it is not triggered.
Below is the piece of code which should do the trick also based on official documentation:
https://developer.atlassian.com/server/confluence/javascript-api-for-blueprint-wizards/
alert1 - works just fine and is triggered
alert2 - is not triggered as expected (the wizard page is visible just fine)
Confluence.Blueprint.setWizard('com.msd.devops.addons.confluence.sdlc-templates:sdlc-template', function(wizard) {
alert("aler1");
wizard.on('post-render.page1Form', function (e, state) {
alert("alert2");
});
});
sdlc-templates.soy
{namespace MyPlugin.Blueprints.Simple}
/**
* A form that accepts a person's name
*/
{template .page1Form}
<h3>Planning</h3>
{/template}
app attributes:
<groupId>com.msd.devops.addons.confluence</groupId>
<artifactId>sdlc-templates</artifactId>
atlassian-plugin.xml
<!-- SDLC Template Blueprint -->
<blueprint key="sdlc-template-blueprint" index-key="my-index" i18n-name-key="sdlc.create-link.title">
<content-template ref="rs-template" />
<content-template ref="qap-template" />
<dialog-wizard key="sdlc-templates-wizard">
<dialog-page id="page1Id" template-key="MyPlugin.Blueprints.Simple.page1Form" title-key="my.blueprint.wizard.page1.title" last="true"/>
</dialog-wizard>
</blueprint>
<!-- Add to the Create Menu -->
<web-item key="sdlc-template" i18n-name-key="sdlc.create-link.title" section="system.create.dialog/content">
<description key="sdlc.create-link.description" />
<resource name="icon" type="download" location="/images/icon.png" />
<param name="blueprintKey" value="sdlc-template-blueprint" />
</web-item>
Any idea, why the alert2 is not triggered (no javascript code I put there is triggered)?
Thank you, Miroslav
I was using soy template name instead of the dialog-page id. Fixed.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.