Definition of context

I have created a new action bean class, which I use in a changed “single-tasks-widget-template.xhtml” file. It is very similar to the JbpmActionsBean class used in the “manage-task-widget-template.xhtml” file. Both classes use returnToCurrentDocOrHome() function, but for my class it returns to “/nuxeo/view_documents.faces” and for the JbpmActionsBean class it returns to “/nuxeo/view_home.faces”.

It depends on a seam context for a navigationContext variable, but where the context is defined?

0 votes

0 answers

545 views

ANSWER

More precisely, how to force the following code

        navigationContext.setCurrentDocument(null);
        return navigationContext.goHome();

to go to the view_home path.

12/23/2012

Hi,

I see that in JbpmActionsBean#returnToCurrentDocOrHome, it returns to home page if there is an exception. Are you sure that this code is executed in your custom bean?

Note that in NavigationContext#goHome, main context variables are reset (currentDocument included).

12/26/2012

Hi, I have repleaced the TaskActionBean.java from the nuxeo-platform-task-web bundle, because it returned an access error when an user had a temporary permission to the document and I have to use more then two transitions. The problem is that the context is different for JbpmActionsBean and TaskActionBean and NavigationContext#goHome behaves differently for both beans. Best regards
12/26/2012

any ideas how to solve this problem ?
01/04/2013