PageLink Action using SDK 3.x

cancel
Showing results for 
Search instead for 
Did you mean: 
rstoops1
Member II

PageLink Action using SDK 3.x

For a client, we are attempting to create a PageLink action because of the complexity of the screen. We have done actions in the past but they have been javascript variety. Our targeted version of Alfresco is 5.2.x and we are using SDK 3.x.  I've looked at the following links and tried to extracted what I thought the information needed but nothing has worked.

Adding new actions to the Document Library | Alfresco Documentation 

Creating Custom Actions in Alfresco | ECMArchitect | Alfresco Developer Tutorials 

I have also looked at Alfresco code and attempted to follow that pattern also but again nothing has worked.

The outcome of the code that we have tried has either not produced the action in the list or had a action that when you clicked on it, it has done nothing.

What we are looking for is an example of creating a PageLink action using the SDK 3.x that can do something as simple as a print "Hello World" to the screen so we can extend it from there.

Thank for the help. 

5 Replies
douglascrp
Advanced II

Re: PageLink Action using SDK 3.x

Hello.

All the information you need is available at Adding new actions to the Document Library | Alfresco Documentation 

As you can see there, there are multiple types of actions you can create.

In the problem you described, you metioned 2 different ideas that should be addressed with the samples:

  • How to create a DocLib action that invokes a custom JavaScript function and displays a message (Show-Custom-Message)
  • How to create a DocLib action that navigates to an external web page (Go-To-Google)

Please, try those and let us know if you have specific doubts.

rstoops1
Member II

Re: PageLink Action using SDK 3.x

Thanks Doug,

Tried that; one of the links I referenced. The one example that is missing is PageLink which is the one I never found any examples for anywhere.

douglascrp
Advanced II

Re: PageLink Action using SDK 3.x

Are you sure you checked the link I sent to you?

The example is there:

<extension>
    <modules>
        <module>
            <id>Add Document Libarary Actions (Send-as-Email, Call WS, Show Msg, Go to Google)</id>
            <version>1.0</version>
            <auto-deploy>true</auto-deploy>
            <configurations>
                <config evaluator="string-compare" condition="DocLibActions">
                    <actions>
                    ...
                        
<action id="alfresco.tutorials.doclib.action.goToGoogle"
                                icon="google"
                                type="link"
                                label="alfresco.tutorials.doclib.action.goToGoogle.label">
                            <param name="href">http://www.google.com</param>
                            <param name="target">_blank</param>
                        </action>
                    </actions>
                </config>
            </configurations>
        </module>
    </modules>
</extension>
rstoops1
Member II

Re: PageLink Action using SDK 3.x

Doug, thanks again but we are looking to do a "PageLink" not a "Page".

douglascrp
Advanced II

Re: PageLink Action using SDK 3.x

Ah, right.

So in this case, you can check this page Alfresco Share Document Library web tier | Alfresco Documentation 

There you will find an example