cancel
Showing results for 
Search instead for 
Did you mean: 

FreeMarker: listing all the properties of an aspect.

fbousson
Champ in-the-making
Champ in-the-making
Hi,

I'm currently developing custom views in FreeMarker which are used to create an overview / report.

Is it possible to list all the properties that are defined on an aspect using Freemarker? (doesn't matter if the user has filled in that property or not)

At the moment I'm having trouble with the following:

I have a folder with a custom FreeMarker view.
There is content in that folder. That content has one of my custom aspects.
This custom aspects has properties.

So far, I'm able to list which aspects are or the content.
If a value of a property of that aspect has been filled in, that property will be available on the content properties. (I thought it would be defined on the aspect…)

Is it possible to list all the properties defined on an aspect? I need this to generate a report which of the properties are filled in and which are still missing.

I have a lot of aspects with a lot of properties that I need to check if they're filled in. So hardcoding everything isn't really an option.

kind regards,
Frederick Bousson
2 REPLIES 2

fbousson
Champ in-the-making
Champ in-the-making
Hi,

I just wanted to rephrase the question to make it a bit more clear what I want to do:

I'm currently developing custom views in Alfresco using FreeMarker.
Is there a way , given the name of an aspect, to see which properties are defined for that aspect (in FreeMarker)?

What I would like to do is generate a report using FreeMarker  which shows which properties of a certain aspect are filled in and which aren't.
I want to do this as dynamically as possible.

It seems that when you assign an aspect to content, only the filled in properties of that aspects are available in the properties list of the content.



Kind regards,
Frederick Bousson

fbousson
Champ in-the-making
Champ in-the-making
I've solved my problem by creating a custom FreeMarker service which uses the ISO9075 utility class for coding and decoding.