cancel
Showing results for 
Search instead for 
Did you mean: 

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

milonette_
Star Collaborator
Star Collaborator

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][1]

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. [1]: http://doc.nuxeo.com/pages/viewpage.action?pageId=12912851

1 ACCEPTED ANSWER

milonette_
Star Collaborator
Star Collaborator

hello,

So I read, this java class :

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

To find this solution :

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

View answer in original post

1 REPLY 1

milonette_
Star Collaborator
Star Collaborator

hello,

So I read, this java class :

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

To find this solution :

#{!empty routingActions.getCurrentRouteCurrentUserTasks()?'view':'hidden'}
Getting started

Attention: Blogs & Forums are in READ-ONLY mode from Oct 9-19 as we transition to our new platform. Learn more.

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.