cancel
Showing results for 
Search instead for 
Did you mean: 

Using node services in an Evaluator

vbaudry
Champ in-the-making
Champ in-the-making
Hi again !

I'm trying to implement my own evaluator, and I want it to have special behaviours when the parent node has certain names or properties.

But I can't find how to retrieve the parent node. Usually in wizards I use nodeService, but I can't use it with correct results here.

How do I need to initialize it ?

Actually I just do :

NodeService nodeService = new NodeServiceImpl();

I didn't find the answer in a doc.

Please help ! Thanks.
2 REPLIES 2

kevinr
Star Contributor
Star Contributor
Take a look at the code for the other evaluators, you will see this kind of pattern:

NodeService nodeService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getNodeService();
Most of the major service implementations can be retrieved via the ServiceRegistry in the web-client.

Thanks,

Kevin

vbaudry
Champ in-the-making
Champ in-the-making
Works fine ! Thanks !