Relation between web-work action and web-item link

AbrahamA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 3, 2013

Hello

I have a action

<webwork1 key="newactions" name="New actions" class="java.lang.Object">
    <actions>
        <action name="com.mycomp.consulting.plugin.mycomponent.webwork.myComponentAction" alias="my_components">
          <view name="success">/templates/com/mycomp/plugin/webwork/myComponentAction.vm</view>
          <view name="error">/templates/com/mycomp/plugin/webwork/myComponentAction.vm</view>
          <view name="input">/templates/com/mycomp/plugin/webwork/myComponentAction.vm</view>
        </action>

I have a link defined in web-item

<link linkId="my-component-link">/secure/admin/my_components.jspa?projectId=$helper.project.id</link>

Questions:

1. Is my understanding that action alias "my_components" is used in link as my_components.jspa to invoke com.mycomp.consulting.plugin.mycomponent.webwork.myComponentAction?

2. what function will be called when the link is clicked, within the class myComponentAction

I tried reading books written for jira plugin development and I could not find clear answer, is there a place where you can point me which explains these concepts.

Thanks very much to users of this forum for answering my questions.

Abe

1 answer

1 accepted

0 votes
Answer accepted
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2013

1. Yes

2. doExecute(). You can call other functions by using "!commandName". For example, my_components!default.jspa will invoke doDefault() method. It is explained in the "There's more..." section on Page 67 in JIRA 5.x Development Cookbook.

AbrahamA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2013

Thanks Jobin

Time to get new version of book.

AbrahamA
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2013

Got the latest edition from Packt, looks great. Thanks for writing the book.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 4, 2013

Glad you like it :)

Suggest an answer

Log in or Sign up to answer