Custom tag : layout : hide a container or a widget when "no task for current user"

hello,

I wanted to hide to user a widget if no workflow task was current for him.

I found this very good documentation about displaying things depending on “workflow or not workflow in process”

http://doc.nuxeo.com/pages/viewpage.action?pageId=12912851

That said this exemple to “not display when no process” :

#{routingActions.getRelatedRoute() != null?'view':'hidden'}

I try this 3 tests:

#{routingActions.isEditableRouteElement(currentDocument)?'view':'hidden'}
#{!routingActions.isEmptyFork(currentDocument)?'view':'hidden'}
#{routingActions.isEditableStep(currentDocument)?'view':'hidden'}

Nevertheless this was not enough for not displaying if current user has no task on this document to deal with.

0 votes

1 answers

969 views

ANSWER



hello,

So I read, this java class :

http://community.nuxeo.com/api/nuxeo/5.6/javadoc/org/nuxeo/ecm/platform/routing/web/DocumentRoutingActionsBean.html

To find this solution :

#{!empty routingActions.getCurrentRouteCurrentUserTasks()?'view':'hidden'}
0 votes