Can U explain about {action-alias-name}!iframe.jspa?decorator=none

I have tried to figure out other opensource…
In there, there is below code… I tried to figure it out by myself… but I could not…
If somebody knows about it… please explain about it…

for example …

<iframe class="portal-page-container" src="{contextPath()}/secure/PortalWelcomeAction!iframe.jspa?decorator=none"></iframe>

I’m going to assume that you seek to understand what the different components are of the link PortalWelcomeAction!iframe.jspa?decorator=none or {action-alias-name}!iframe.jspa?decorator=none.

The WebWork framework consists of Actions (the {action-alias-name} part) and Commands (the !iframe part.

In your code, the action is defined in the atlassian-plugin.xml like this (taken from https://developer.atlassian.com/server/jira/platform/webwork/):

<webwork1 key="qquserissue" name="Quick Create User Issue" class="java.lang.Object">
    <actions>
        <action name="com.atlassian.jira.toolkit.action.QuickCreateUserIssueAction" alias="QuickCreateUserIssue">
            <view name="createuserissue">/templates/quickcreateuser.vm</view>
        </action>
    </actions>
</webwork1>

Additional to actions, you can also specify commands (see https://developer.atlassian.com/server/jira/platform/jira-webwork-actions-4227099/).

Commands are best explained by this paragraph:

Command elements are optional, and are used when several interactions belong to the same Action.

A command name is specified on the URL like this: SomeAction!myCommand.jspa

The command is implemented in a method in the Action class with the corresponding name:
public String doMyCommand() {

// implement the command logic here

return “someview”;
}

The doExecute method is run when no command is requested i.e. the bare /path/to/MyAction.jspa.

I hope this helps!

2 Likes

Additionally, you can also check the WebWork sample project here https://bitbucket.org/mdoar/webwork-sample/

The most interesting parts (an action with commands) are found here:
https://bitbucket.org/mdoar/webwork-sample/src/82a89ef3b05a6b62b84bb22e31985d3e8a9bcfb7/src/main/resources/atlassian-plugin.xml#lines-36

https://bitbucket.org/mdoar/webwork-sample/src/82a89ef3b05a6b62b84bb22e31985d3e8a9bcfb7/src/main/java/com/consultingtoolsmiths/jira/samples/webwork/ActionBeta.java#lines-36

Thanks for your help. Your explanation is really good to me.

1 Like