Show custom list property - Aikau

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

Show custom list property - Aikau

Jump to solution

Hello, 

I have property as List of values in external CSV file. There is a key;value map. 

 

1;value1

2;value2

3;value3

4;value2

 

I have java class which read this csv and send it to my list property. 

In Frontend (Alfresco share) I display this property in table grids where I edit file: documentlist-view-table.js and show "value1" by call rest api.

 

		YAHOO.Bubbling
		.fire(
				"registerRenderer",
				{
					propertyName : "suez:spolecnost",
					renderer : function datum_renderer(record, label) {

						var jsNode = record.jsNode, properties = jsNode.properties;
						var timestamp = new Date().getTime();
						
						var finalValue = properties['suez:spolecnost'];
						if (finalValue == null || finalValue == "") {
							return null;
						}

						var label = "";

						Alfresco.util.Ajax
								.jsonRequest({
									method : "GET",
									url : Alfresco.constants.PROXY_URI
											+ "/suez/rest/v1/listofvalues?type=spolecnost&value="
											+ finalValue,
									successCallback : {
										fn : function dlA_onActionDetails_refreshSuccess(
												response) {
									
											
											document.getElementById("spolecnost" + timestamp).innerHTML = response.json.label;
										},
										scope : this
									}
									
								});

						return '<div id="spolecnost' + timestamp + '" style="text-align: center">'
						+ finalValue + '</div>';
					}
				});

Snímek obrazovky 2020-06-17 v 8.40.40.png

 

Now I need this grid table at the aikau faceted-search.get.js Is there any way how i can call my webscript and display value? 

                               {
                                 name: 'alfresco/documentlibrary/views/layouts/Cell',
                                 config: {
                                    additionalCssClasses: 'mediumpad',
                                    widgets: [
                                       {
                                          name: 'alfresco/renderers/Property',
                                          config: {
                                            propertyToRender: 'node.properties.xx:spolecnost'
                                          }
                                       }
                                    ]
                                 }
                              },

Snímek obrazovky 2020-06-17 v 8.42.11.png

1 Solution

Accepted Solutions
EddieMay
Alfresco Employee

Re: Show custom list property - Aikau

Jump to solution

Hi @wity,

I presume you have seen the custom list tutorial? Is there anything there that might help? There's also this data list example.

HTH

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!

View solution in original post

1 Reply
EddieMay
Alfresco Employee

Re: Show custom list property - Aikau

Jump to solution

Hi @wity,

I presume you have seen the custom list tutorial? Is there anything there that might help? There's also this data list example.

HTH

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!