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">
        <actions>
            <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>
            </action>
        </actions>
    </webwork1>

and the template

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

I would very appreciate any recommendations, thanks in advance!

Mike

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

<web-item i18n-name-key="somenamekey"
              key="somekey"
              section="section-to-place-webitem" weight="1">
        <description key="somedescriptionkey"/>
        <label key="somelabelkey"/>
        <link linkId="id-of-a-html-element-for-link">
            /secure/SomeAction!default.jspa?issueId=${issueId}
        </link>
        <styleClass>trigger-dialog</styleClass>
    </web-item>