Menu item to modal dialog on the same page (webwork1 + dialog2)

I’m trying to show modal dialog on the same page (like standard “Clone” or “Link” actions).
But it opens new page instead of the same.
What I do -

webwork definition

<webwork1 key="link-safe-clone" name="Safe Clone">
            <action name="com.openwaygroup.jira.action.SafeClone" alias="SafeClone">
                <view name="input">/templates/actions/safeclone.vm</view>
                <view name="success">/templates/actions/safeclone.vm</view>

and the template

<section id="static-dialog" class="aui-dialog2 aui-dialog2-medium" role="dialog">
   some aui/html/js

I would very appreciate any recommendations, thanks in advance!


Hi, I would start with classStyle attribute set to trigger-dialog in atlassian-plugin.xml.
For example:

<web-item i18n-name-key="somenamekey"
              section="section-to-place-webitem" weight="1">
        <description key="somedescriptionkey"/>
        <label key="somelabelkey"/>
        <link linkId="id-of-a-html-element-for-link">