Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7444445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:31:01+00:00 2026-05-29T11:31:01+00:00

I am using alfresco 3.4 d. I have written document library action to validate

  • 0

I am using alfresco 3.4 d. I have written document library action to validate the xml file. Now I want to show the action only if my file extension is .xml . Can somebody tell me the steps to achieve this. I was searching this from 2 days. still not found any solution.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T11:31:04+00:00Added an answer on May 29, 2026 at 11:31 am

    There is not an easy way to do this in 3.4.d but it can be done if you are willing to dive into Alfresco’s client-side components and then extend them with your own custom code. To do it I think you’ll have to subclass the client-side JavaScript component that is responsible for building the action list. That is Alfresco.DocumentActions and it lives in /components/document-details/document-actions.js. If you use a client-side debugging tool, you should be able to find where the action list component iterates over the list of actions. You could extend this component such that when you come across your action, you’ll look at the mimetype of the current object to decide whether or not to show the action. You’ll have to look at the data that component knows about the current object to see whether or not the mimetype is in there. If it isn’t, you’ll have to extend the web scripts to expose that.

    You may want to seriously consider whether or not it is worth the effort, though, because in 4.0 this is much easier. In 4, when actions are declared in the share form config, you can specify an evaluator that determines whether or not to show the action. There is already an evaluator based on mimetype called evaluator.doclib.action.isMimetype. So you could configure that to look for text/xml, then go into share-form-config-custom.xml to specify the evaluator in your action declaration.

    So in 3.4, it is possible with a good deal of hacking and custom code. In 4.0, it is 100% config.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using TortoiseSVN against VisualSVN I delete a source file that I should not have
Using the variables extension, I want to change the background color of a cell
Background We're using Alfresco to replace SharePoint. The primary use is document sharing and
Using restlet, I want to make a post to android's c2dm service. I have
I'm writing a WebScript in Alfresco using JS controller and I want to make
When attempting a file upload to an Alfresco Server using ssl the server logs
I'm using Java for accessing Alfresco content server via it's web service API for
I'm making call to Alfresco Webscripts which return JSON. I do this using GET
Using online interfaces to a version control system is a nice way to have
I'm implementing a WebScript using Alfresco's JavaScript. l'm trying to insert string to a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.