Sean Radford a écrit : > The problem seems to stem from the fact that the DocumentModel returned > from the NXQL has no associated Session ID. So when trying to locate the > session on rendering the new start-page, there is none. A new one is > attempted to be created but DocumentModelFunctions passes null (as the > HashMap) into the CoreInstance open() method, which results in the > IllegalArgumentException. > > If you change the null to an empty HashMap, the page is displayed with > the correct document. > > Would this be a 'correct' code change to DocumentModelFunctions?
Your analysis is correct, the ResultDocumentModel do not fully implement the behaviour of DocumentModelImpl and we have side effects such as the one you describe. IMO we should improve the ResultDocumentModel implementation to make it transparently fetch a new CoreSession when necessary instead of working around the problem in DocumentModelFunctions. But I am not 100% sure this a the good solution. In then mean time, you can do something such as: DocumentModel theTrueWorkspace = documentManager.getDocument(resultModel.getRef()); in your startup bean. Could you please open a JIRA issue on the Query/Search component to expose your problem with the details of your use case (use cases helps bug resolvers understand why to fix a bug in a particular way or not)? Please also open a ticket for the buggy session creation code of the current DocumentModelfunctions implementation. If you have a patch that works for you, please attach it to the issue. > This is not the end of my problem though, as the tab that is opened is > TAB_RELATIONS when I would like it to be TAB_CONTENT. More investigation > on this tomorrow... I don't have the reply at end right now, but the task list of the dashboard must have a example of tab directed navigation that works. Best, -- Olivier _______________________________________________ ECM mailing list [email protected] http://lists.nuxeo.com/mailman/listinfo/ecm
