- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2018 08:29 AM
I know this must be something simple but I can't seem to find the solution.
I have a custom webscript which returns a html page accessible by going to a url like so:
The only argument the webscript needs is the nodeRef={nodeRef} argument.
What I want to do is create an entry in the Document Actions pane (available for every document) that will take me to the url with the nodeRef argument of the respective document. By document actions pane I mean this:
I'm guessing the solution lies with custom actions but I can't figure out how and where to define the action.
Btw, I used the alfresco maven sdk to create an all-in-one project. I plan to take the resulting amp files and install them into the production alfresco server.
Thank you!
// Edit
I managed to create an entry with an action of type:"link" and the following params:
<param name="href">/alfresco/s/sts/report?nodeRef={node.nodeRef}</param>
<param name="target">_blank</param>
The problem with this solution is it requires additional authentication for "/alfresco/s" (service). Is there a way to access my webscript from a share page so the user is already logged in?
For example: "localhost:8080/share/page/sts/report?nodeRef={node.nodeRef}"
- Labels:
-
Alfresco Content Services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2018 12:36 PM
If you would like to bypass an authentication from share you can use the proxy authentication URL.Using below url you can call any webscript from alfresco share and it will by pass the authentication..
http://localhost:8080/share/proxy +"alfresco webscript URL"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-22-2018 12:36 PM
If you would like to bypass an authentication from share you can use the proxy authentication URL.Using below url you can call any webscript from alfresco share and it will by pass the authentication..
http://localhost:8080/share/proxy +"alfresco webscript URL"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2018 02:28 AM
Unfortunately, this method is not working for me. I tried the following link:
http://localhost:8080/share/proxy/sts/report...
Anything I put after .../share/proxy/ gives me "Invalid EndPoint Id:" error
I want to mention I am using an all-in-one alfresco maven sdk project and I defined my webscript in the platform/repo module.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2018 02:41 AM
It should be
http://localhost:8080/share/proxy/alfresco/sts/..................
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-23-2018 03:01 AM
Yes, that was it!
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018 05:30 AM
So that how is your final action looks like? I am trying to do the same thing but I need to add a custom property value in the href any idea?
Something like this
<param name="href">www.google.com/{customModel:CustomProperty}</param>
<param name="target">_blank</param>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018 05:42 AM
You can use , [jsNode.properties.customModel_CustomProperty]..
Refer share-documentlibrary-config.xml for more details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018 08:50 AM
<action id="alfresco.tutorials.doclib.action.goToGoogle1" icon="google" type="link" label="alfresco.tutorials.doclib.action.goToGoogle.label">
<param name="href">http://www.google.com/[jsNode.properties.dpl_sa]</param>
<param name="target">_blank</param>
</action>
model prefix: dpl
property prefix/name: sa
By the way the model has been created by the share UI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018 08:54 AM
I mean {sNode.properties.customModel_CustomProperty}.....sorry for wrong bracket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2018 08:56 AM
sNode or jsNode xD? where can I find a document about this systax?
