cancel
Showing results for 
Search instead for 
Did you mean: 

Custom behavior when a node change type

drocco88
Champ in-the-making
Champ in-the-making
Hi there,

I'm in a need to check the new type of a content when it is changed (throw the "Change Type" action in the details view) and use that value to do something else.

Can you please point me to the right direction?

Many thanks,
Rocco
1 ACCEPTED ANSWER

afaust
Legendary Innovator
Legendary Innovator
Hello,

the OnSetNodeTypePolicy is your best bet here. Only in such a policy do you have access to the before and after type QName.

Regards
Axel

View answer in original post

5 REPLIES 5

afaust
Legendary Innovator
Legendary Innovator
Hello,

the OnSetNodeTypePolicy is your best bet here. Only in such a policy do you have access to the before and after type QName.

Regards
Axel

drocco88
Champ in-the-making
Champ in-the-making
Thanks Axel

drocco88
Champ in-the-making
Champ in-the-making
One more question:

What about showing the type in the detailed view? I was having a look at cm:type but is not the actual node type (is for the Dublin Core aspect).

Cheers

afaust
Legendary Innovator
Legendary Innovator
Hello,

as a type is not a property / association in itself, it can not be displayed directly using field declaration in Share forms. We previously added a form filter on the Alfresco repository tier to add a pseudo-field "type" that can be used in detail view forms (similiar to the pseudo fields "transitions", "packageItems" etc.). Such a modification requires a bit of Java programming.

Regards
Axel

drocco88
Champ in-the-making
Champ in-the-making
Thanks. I was also thinking of doing it throw a behavior that changes a custom "type" property.