cancel
Showing results for 
Search instead for 
Did you mean: 

Show custom list property - Aikau

wity
Confirmed Champ
Confirmed Champ

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>';
					}
				});

image

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'
                                          }
                                       }
                                    ]
                                 }
                              },

image

1 ACCEPTED ANSWER

EddieMay
World-Class Innovator
World-Class Innovator

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 answer in original post

1 REPLY 1

EddieMay
World-Class Innovator
World-Class Innovator

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!