How to manage the custom models using model manager

cancel
Showing results for 
Search instead for 
Did you mean: 
udayakumar_p
Active Member

How to manage the custom models using model manager

Jump to solution

We have custom model defined, say commonModel.xml which has been placed into alfresco\extension\custom folder in the installation.

The model has several custom types defined. One of the property, say common:keywords has a list of allowed values. This list is defined with a constraint as below.

<constraints>
<constraint name="common:keywordsList" type="LIST">
<parameter name="allowedValues">
<list>
<value>contactus</value>
<value>mobile</value>
<value>newsletters</value>
<value>order_status</value>
<value>other</value>
</list>
</parameter>
</constraint>

This list keeps on growing and new keywords need to be added whenever we have requirement. Every time we have to go and modify this model and restart alfresco. Instead if we have a way to manage this model via share UI it would be easy to add the keywords whenever necessary. Even a business person can go and add the keywords.

Any approach to this?

1 Solution

Accepted Solutions
douglascrp
Advanced II

Re: How to manage the custom models using model manager

Jump to solution

Ok, reading the information provided into the project's page:

to build and install the artifact in your local Maven repository.

The output is one amp-file to be installed into the repository part of your Alfresco installation and one jar-file that is needed by Alfresco Share.

You have to put the amp file inside the amps folder (repository part).

For the jar:

otherwise drop the jar-file in to tomcat/shared/classes of your installation and install the amp with the mmt-tool.

Put the jar file in the mentioned path, <alfresco_install_folder>/tomcat/shared/classes

PS: I believe there must be something wrong with the latest instruction, as jars usually go inside the <alfresco_install_folder>/tomcat/shared/lib, but you should try the way the author tells you to do.

View solution in original post

12 Replies
cesarista
Customer

Re: How to manage the custom models using model manager

Jump to solution

Hi:

One option is to use a dynamic list, that can be managed by an Alfresco admin, in Share admin interface.

GitHub - Redpill-Linpro/alfresco-listmanager: Component used to manage custom list of values used in... 

Regards.

--C.

udayakumar_p
Active Member

Re: How to manage the custom models using model manager

Jump to solution

Thanks for the prompt response. Can it be used for multi select list? I see that the field control is mentioned as 

customselectone.ftl
cesarista
Customer

Re: How to manage the custom models using model manager

Jump to solution

Hi

I just used it with customselectone... but try it with other ftl component, surely it is not difficult to make it work.

Regards.

--C.

douglascrp
Advanced II

Re: How to manage the custom models using model manager

Jump to solution

We have been using our own addon for this kind of problem:

GitHub - dgcloud/alfresco-value-assistance: Configurable value assistance module for Alfresco Share ... 

With it, you can use the multi-select list.

udayakumar_p
Active Member

Re: How to manage the custom models using model manager

Jump to solution

Hi,

Thanks. Can you explain how to use this add-on? There is no mention of how to create a custom data list.

Also it seem to be useful for dynamic dropdown, how do we use it for multi select list?

douglascrp
Advanced II

Re: How to manage the custom models using model manager

Jump to solution

I believe all the information you need is available in the project's page.

In order to create the datalist driven the control, you have to use the normal Data Lists form inside the Share site.

There is nothing different on that.

If you want to use the multi-select component, all you have to do is to set the form control as dynamic-selectmany.ftl instead of dynamic-dropdown.ftl

udayakumar_p
Active Member

Re: How to manage the custom models using model manager

Jump to solution

Hi,

I have an issue using this list manager. I tried to get a response from the forum but nobody replied to it.  Here is the link to the issue.

Issue while creating list · Issue #10 · Redpill-Linpro/alfresco-listmanager · GitHub 

Do you have an idea?

Where should we place the amp file? into amps folder or amps_share folder?
Also where should the jar file be put? I put it under tomcat/shared/classes but the link does not appear in share UI.

douglascrp
Advanced II

Re: How to manage the custom models using model manager

Jump to solution

I don't know the addon, and I don't know what amp files you are talking about, but if it is following the way most of the addons are built, you must have 2 files, one named something with alfresco/repo and the other one as share.

For the first one, you have to put it inside the amps folder, and for the second one, inside the amps_share.

Usually, when the addon provides amps, there are no jars to be deployed. You use the amps or the jars.

But putting the amps files inside of those folders is not enough.

With the files in there, you have to stop your Alfresco server, and then use the apply_amps script you will find inside the <alfresco_install_folder>/bin

Execute it, and then start Alfresco again.

udayakumar_p
Active Member

Re: How to manage the custom models using model manager

Jump to solution

Hi,

Thanks. but for the mentioned add on there is only one amp file(listmanager-amp-1.5.2.amp) and one jar file. I put the amp file into amps_share and ran the apply_amps script as you mentioned.

We are able to see the list but we are not able to create anything.